/* =============================================
   아레아소프트 블로그 - 메인 스타일
   blog.areasoft.co.kr
   ============================================= */

/* 인라인 SVG 아이콘(icon() 헬퍼) 공통 정렬 */
.ic { display:inline-block; vertical-align:-0.14em; flex:none; }
.ic-live { color:#dc2626; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #1a56db;
  --primary-dark: #1440a8;
  --primary-light:#eff6ff;
  --accent:       #0e9f6e;
  --text:         #0f172a;
  --text-sub:     #374151;
  --muted:        #6b7280;
  --border:       #e8ebf0;
  --border-soft:  #eef1f5;
  --bg:           #f6f8fb;
  --card-bg:      #ffffff;
  --radius:       12px;
  --radius-lg:    18px;
  --shadow:       0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.07);
  --shadow-md:    0 6px 20px rgba(16,24,40,.08);
  --shadow-lg:    0 16px 40px rgba(16,24,40,.12);
  --grad:         linear-gradient(120deg, #1a56db 0%, #3b82f6 50%, #0e9f6e 100%);
}

/* -----------------------------------------------
   기본
----------------------------------------------- */
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(26,86,219,.16); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* -----------------------------------------------
   헤더
----------------------------------------------- */
.site-header {
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: -.03em;
}
.site-logo span { color: var(--text); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .875rem;
  color: var(--text-sub);
  font-weight: 500;
  transition: background .15s, color .15s;
}
.site-nav a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* 헤더 통합 검색 */
.site-search {
  position: relative;
  flex: 1 1 auto;
  max-width: 340px;
  margin: 0 8px 0 18px;
}
.site-search-ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; display: flex;
}
.site-search input {
  width: 100%; height: 40px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg);
  font-size: .9rem; font-family: inherit; color: var(--text);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.site-search input::placeholder { color: var(--muted); }
.site-search input:focus {
  outline: none; background: #fff; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}
.site-search input:focus + .site-search-ic, .site-search:focus-within .site-search-ic { color: var(--primary); }

/* 모바일 햄버거 (JS로 toggle) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle svg { display: block; }

/* -----------------------------------------------
   히어로 (홈 상단 배너)
----------------------------------------------- */
.hero {
  background: linear-gradient(135deg, #1a56db 0%, #0e9f6e 100%);
  color: #fff;
  padding: 56px 24px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -.03em;
}
.hero p {
  font-size: 1rem;
  opacity: .88;
  max-width: 520px;
  margin: 0 auto;
}

/* -----------------------------------------------
   메인 레이아웃 (목록 + 사이드바)
----------------------------------------------- */
.main-wrap {
  max-width: 1080px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* -----------------------------------------------
   글 카드
----------------------------------------------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  overflow: hidden;
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: #dbe3ef;
}

.post-card-thumb {
  flex-shrink: 0;
  width: 200px;
  overflow: hidden;
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-thumb.no-thumb {
  width: 200px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-card-thumb.no-thumb svg {
  width: 48px;
  height: 48px;
  opacity: .25;
}

.post-card-body {
  padding: 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-card-cat {
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.post-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title:hover { color: var(--primary); }
.post-card-excerpt {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  color: var(--muted);
  margin-top: 4px;
}
.post-card-meta svg { width: 13px; height: 13px; }

/* -----------------------------------------------
   사이드바
----------------------------------------------- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.widget-title {
  padding: 14px 18px;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.widget-body { padding: 14px 18px; }
.cat-list { list-style: none; }
.cat-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: .9rem;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
}
.cat-list li:last-child a { border-bottom: none; }
.cat-list li a:hover { color: var(--primary); }
.cat-count {
  background: var(--bg);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: .75rem;
  color: var(--muted);
}
.widget-more {
  display: inline-block; margin-top: 10px; font-size: .85rem;
  font-weight: 600; color: var(--primary);
}
.widget-more:hover { text-decoration: underline; }

/* -----------------------------------------------
   페이지네이션
----------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  color: var(--text-sub);
  background: #fff;
  transition: all .15s;
}
.pagination a:hover,
.pagination a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* -----------------------------------------------
   글 상세
----------------------------------------------- */
.post-wrap {
  max-width: 1080px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

.post-detail {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.post-header {
  padding: 38px 40px 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--card-bg) 100%);
}
.post-cat-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}
.post-title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .82rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.post-meta-bar svg { width: 14px; height: 14px; }

.post-thumb-wrap {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
}
.post-thumb-wrap img { width: 100%; height: 420px; object-fit: cover; }

.post-body {
  padding: 36px 40px;
  font-size: 1rem;
  line-height: 1.95;
  color: var(--text-sub);
}
.post-body h2 {
  font-size: 1.38rem;
  font-weight: 700;
  color: var(--text);
  margin: 44px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.post-body h3 {
  font-size: 1.13rem;
  font-weight: 700;
  color: var(--text);
  margin: 30px 0 10px;
}
.post-body p { margin-bottom: 18px; }
/* 첫 문단(리드) 강조 */
.post-body > p:first-of-type { font-size: 1.1rem; color: var(--text); line-height: 1.9; }
.post-body strong { color: var(--text); font-weight: 700; }
.post-body em { font-style: italic; color: var(--text-sub); }
/* 형광펜 하이라이트 (==강조==) */
.post-body mark {
  background: linear-gradient(180deg, transparent 55%, #fde68a 55%);
  color: inherit; padding: 0 2px; border-radius: 2px;
}
.post-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--primary-dark); }
/* 인용 — 에디토리얼 풀쿼트 (사람이 쓴 느낌) */
.post-body blockquote {
  position: relative;
  margin: 36px 0;
  padding: 8px 8px 8px 0;
  text-align: center;
  font-family: 'Nanum Myeongjo', 'Noto Serif KR', serif;
  font-size: clamp(1.5rem, 3.6vw, 1.8rem);   /* 크게 + 반응형 */
  font-weight: 700;                          /* 굵게 — 명조체 ㄷ/ㄴ 가독성 개선 */
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: var(--text);
  word-break: keep-all;                      /* 단어 단위 줄바꿈으로 가독성 향상 */
}
.post-body blockquote::before {
  content: "\201C";
  display: block;
  font-family: Georgia, 'Nanum Myeongjo', serif;
  font-size: 3.2rem;
  line-height: .9;
  color: var(--primary);
  margin-bottom: 6px;
}
.post-body blockquote p { margin: 0; }
.post-body blockquote em { display:block; font-size: .92rem; color: var(--muted); margin-top: 12px; font-style: normal; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }
.post-body img.post-img {
  border-radius: var(--radius);
  margin: 20px 0;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
}

/* 코드 블록 */
.post-body pre {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 22px 0;
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.6;
}
.post-body pre code {
  font-family: 'D2Coding', 'Consolas', 'Menlo', 'Monaco', monospace;
  background: none;
  padding: 0;
  color: #e6edf3;
  white-space: pre;
  word-break: normal;
}
/* 인라인 코드 */
.post-body code.inline-code {
  font-family: 'D2Coding', 'Consolas', 'Menlo', monospace;
  background: #eef2f6;
  color: #d6336c;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
}
/* 표 */
.post-body .table-wrap {
  overflow-x: auto;
  margin: 26px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.post-body table.post-table {
  border-collapse: collapse;
  width: 100%;
  font-size: .93rem;
  background: var(--card-bg);
}
.post-body table.post-table th,
.post-body table.post-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.post-body table.post-table thead th {
  background: #3b4049;        /* 관리자 에디터와 동일한 차콜 그레이 */
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: none;
}
.post-body table.post-table thead th:not(:last-child) { border-right: 1px solid rgba(255,255,255,.18); }
.post-body table.post-table tbody td:first-child { font-weight: 600; color: var(--text); }
.post-body table.post-table tbody tr:nth-child(even) { background: #f7f9fc; }
.post-body table.post-table tbody tr:hover { background: var(--primary-light); }
.post-body table.post-table tbody tr:last-child td { border-bottom: none; }
/* 목록 */
.post-body ul, .post-body ol { margin: 0 0 20px 0; padding-left: 0; list-style: none; }
.post-body ul li, .post-body ol li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.post-body ul li::before {
  content: "";
  position: absolute; left: 6px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
}
.post-body ol { counter-reset: li; }
.post-body ol li { counter-increment: li; }
.post-body ol li::before {
  content: counter(li);
  position: absolute; left: 0; top: .05em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-size: .78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* -----------------------------------------------
   글 하단 (출처·태그·이전/다음 글)
----------------------------------------------- */
.post-footer {
  padding: 24px 40px 34px;
  border-top: 1px solid var(--border);
}
.post-source {
  font-size: .85rem; color: var(--muted); margin-bottom: 16px;
}
.post-source a { color: var(--primary); word-break: break-all; }
.post-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}
.post-tags a {
  display: inline-block; padding: 5px 12px; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: .82rem; color: var(--text-sub); transition: all .15s;
}
.post-tags a:hover {
  background: var(--primary-light); border-color: var(--primary); color: var(--primary);
}
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.post-nav-link {
  display: block; padding: 14px 18px; border: 1px solid var(--border);
  border-radius: var(--radius); transition: border-color .15s, background .15s;
}
.post-nav-link:hover { border-color: var(--primary); background: var(--primary-light); }
.post-nav-label { font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
.post-nav-title { color: var(--text); font-weight: 600; line-height: 1.4; font-size: .9rem; }
.post-nav-link.next { text-align: right; }

/* ===== 글 상세 (요즘IT 아티클 레이아웃) — 본문 + 좌우 레일 ===== */
/* 헤더(.inner, 최대 1080)와 동일 폭 정렬 */
.article-layout {
  max-width: 1120px; margin: 44px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: 60px minmax(0, 1fr) 200px;
  gap: 24px; align-items: start;
}
.article { max-width: 740px; margin: 0; padding: 0; min-width: 0; }
.article-layout .article { max-width: none; }

/* 좌우 레일 — 컬럼 안에서만 표시(영역 이탈 방지) */
.rail { min-width: 0; }
.rail-box {
  position: sticky; top: 124px;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--card-bg); padding: 16px 14px;
  display: flex; flex-direction: column; gap: 8px; text-align: center;
  max-width: 100%; overflow-wrap: anywhere;
}
.rail-left .rail-box { align-items: center; }
.rail-ph-title { font-size: .82rem; font-weight: 700; color: var(--text-sub); }
.rail-ph { font-size: .76rem; color: var(--muted); line-height: 1.5; }

/* 공유 버튼 */
.share-rail { position: sticky; top: 124px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.share-rail-label { font-size: .74rem; font-weight: 600; color: var(--muted); }
.share-bar { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.share-bar-row { flex-direction: row; flex-wrap: wrap; }
.share-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  color: var(--text-sub); font-weight: 800; cursor: pointer; text-decoration: none; transition: all .15s;
}
.share-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.share-btn .sb-txt { font-size: 1.02rem; line-height: 1; }
.share-btn.copied { border-color: var(--primary); color: var(--primary); }
.share-btn.copied::after {
  content: "복사됨"; position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%);
  background: var(--text); color: #fff; font-size: .68rem; font-weight: 500; padding: 3px 8px; border-radius: 6px; white-space: nowrap; z-index: 5;
}
/* 본문 하단 공유: 좌측 레일이 있는 데스크톱에선 숨기고, 레일이 사라지는 폭에서 표시 */
.article-share { display: none; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); align-items: center; gap: 14px; }
.article-share .share-rail-label { font-size: .85rem; font-weight: 700; color: var(--text-sub); }

@media (max-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 200px; }
  .rail-left { display: none; }
  .article-share { display: flex; }
}
@media (max-width: 820px) {
  .article-layout { grid-template-columns: 1fr; }
  .rail-right { display: none; }
}
/* 모바일: 좌우 여백 축소 + 본문 폰트 약 3px씩 축소 */
@media (max-width: 640px) {
  .article-layout { padding: 0 14px; margin-top: 28px; }
  .article-cat { font-size: .74rem; }
  .article-title { font-size: 1.4rem; line-height: 1.36; }
  .article-meta { font-size: .76rem; }
  .article-body { font-size: .9rem; line-height: 1.8; }
  .article-body > p:first-of-type { font-size: .96rem; }
  .article-body h2 { font-size: 1.16rem; margin: 32px 0 12px; }
  .article-body h3 { font-size: .98rem; }
  .article-body blockquote { font-size: 1.22rem; }
  .article-body pre, .article-body pre code { font-size: .8rem; }
  .article-body table.post-table { font-size: .8rem; }
  .article-related { padding: 28px 14px 0; }
  .related-title { font-size: 1.12rem; }
}
.article-head { margin-bottom: 22px; }
.article-cat { font-size: .82rem; font-weight: 700; color: var(--primary); }
.article-title { font-size: clamp(1.6rem, 4vw, 2.25rem); font-weight: 800; line-height: 1.34; letter-spacing: -.03em; color: var(--text); margin: 12px 0 16px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); }
.article-meta .dot { color: #cbd5e1; }
.article-cover { margin: 6px 0 36px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.article-cover img { width: 100%; height: auto; display: block; }
/* 본문: 카드 패딩 제거, 가독성 위해 본문 폭 안에서 표시 */
.article-body { padding: 0; font-size: 1.06rem; line-height: 1.9; }
/* 제휴(쿠팡 파트너스) 공정위 표기 */
.affiliate-notice {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 0 0 22px; padding: 10px 14px;
  background: #f8fafc; border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: 8px; font-size: .82rem; color: var(--muted); line-height: 1.5;
}
.article-foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.article .post-nav { margin-top: 24px; }

/* 관련 글 */
.article-related { max-width: 1120px; margin: 60px auto 0; padding: 36px 24px 0; border-top: 1px solid var(--border); }
.related-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 22px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 720px) {
  .related-grid { grid-template-columns: 1fr; gap: 28px; }
  .article-cover { margin-bottom: 26px; }
}

/* ===== 상단 네비: 웹툴 | 정보 드롭다운 ===== */
.site-nav .nav-top {
  padding: 6px 12px; border-radius: 6px; font-size: .875rem;
  color: var(--text-sub); font-weight: 600; background: none; border: none;
  cursor: pointer; font-family: inherit;
}
.site-nav .nav-top:hover { background: var(--primary-light); color: var(--primary); }
.nav-dropdown { position: relative; }
.nav-drop-menu {
  display: none; position: absolute; right: 0; top: 100%; margin-top: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-md); padding: 6px; min-width: 170px; z-index: 50;
}
.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown.open .nav-drop-menu { display: block; }
.nav-drop-menu a { display: block; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }

/* ===== 웹툴 페이지 ===== */
.tool-wrap { max-width: 1080px; margin: 36px auto; padding: 0 24px; }
.tool-hero { text-align: center; margin-bottom: 28px; }
.tool-hero h1 { font-size: 1.8rem; color: var(--text); margin-bottom: 8px; }
.tool-hero p { color: var(--muted); }
.tool-group { margin-bottom: 32px; }
.tool-group-title { position: relative; font-size: 1.2rem; font-weight: 800; margin-bottom: 16px; padding-left: 16px; }
.tool-group-title::before { content:""; position:absolute; left:0; top:50%; transform:translateY(-50%); width:5px; height:1.05em; border-radius:4px; background: var(--grad); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 16px; }
.tool-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .2s, transform .2s, box-shadow .25s; }
.tool-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tool-card-name { font-weight: 700; color: var(--text); }
.tool-card-desc { font-size: .85rem; color: var(--muted); line-height: 1.5; }
.tool-breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.tool-breadcrumb a { color: var(--primary); }
.tool-detail { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 32px; }
.tool-detail-head h1 { font-size: 1.5rem; margin-bottom: 6px; }
.tool-detail-head p { color: var(--muted); margin-bottom: 20px; }

/* 툴 UI 공통 */
.tool-ui { display: flex; flex-direction: column; gap: 14px; }
.tool-input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: .95rem; font-family: inherit; resize: vertical; }
.tool-input.mono, .tool-result.mono { font-family: 'D2Coding','Consolas',monospace; }
.tool-text { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .95rem; font-family: inherit; }
.tool-text.sm { width: 110px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tool-btn { padding: 9px 16px; border: 1px solid var(--border); background: #fff; border-radius: 8px; font-size: .9rem; font-weight: 600; cursor: pointer; color: var(--text-sub); text-decoration: none; }
.tool-btn:hover { border-color: var(--primary); color: var(--primary); }
.tool-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.tool-btn.primary:hover { background: var(--primary-dark); color:#fff; }
.tool-check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--text-sub); }
.tool-fields { display: flex; flex-wrap: wrap; gap: 16px; }
.tool-field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--text-sub); }
.tool-range { width: 220px; }
.tool-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(88px,1fr)); gap: 10px; }
.tool-stat { background: var(--primary-light); border-radius: 10px; padding: 14px; text-align: center; }
.tool-stat .num { display: block; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.tool-stat .lbl { font-size: .8rem; color: var(--muted); }
.tool-result { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 18px; text-align: center; font-size: 1.05rem; }
.tool-result strong { font-size: 1.4rem; color: var(--primary); }
.tool-result .sub { font-size: .9rem; color: var(--muted); }
.tool-note { font-size: .8rem; color: var(--muted); }
.tool-msg { font-size: .85rem; min-height: 1.1em; }
.tool-msg.ok { color: #15803d; }
.tool-msg.err { color: #dc2626; }
.tool-calc-block { background: var(--bg); border:1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 4px; }
.tool-calc-block h3 { font-size: .95rem; margin-bottom: 10px; }
.tool-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tool-inline .eq { color: var(--muted); }
.tool-out { color: var(--primary); font-size: 1.1rem; }
.tool-qrbox { display: flex; justify-content: center; padding: 10px; }
.tool-qrbox img, .tool-qrbox canvas { border: 1px solid var(--border); border-radius: 8px; }
.tool-lotto { display: flex; flex-direction: column; gap: 10px; }
.lt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lt-ball { width: 38px; height: 38px; border-radius: 50%; color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center; font-size: .95rem; }

/* 후원(커피 선물하기) 버튼 */
.donate-btn {
  display: inline-block; padding: 9px 18px; border-radius: 24px;
  background: #ffdd57; color: #3d2b00 !important; font-weight: 700; font-size: .9rem;
  border: 1px solid #f5c518; transition: transform .1s, box-shadow .15s;
}
.donate-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,197,24,.4); }

/* ===== 후원 CTA (본문 아래 · 부담 없는 연한 카드) ===== */
.donate-cta { max-width: 1120px; margin: 0 auto; padding: 40px 24px 0; }
.donate-cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 24px;
}
.donate-cta-copy { display: flex; flex-direction: column; gap: 3px; }
.donate-cta-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.donate-cta-text { font-size: .88rem; color: var(--muted); margin: 0; }
.donate-cta-btn { flex: none; }   /* 기본 donate-btn(연노랑 커피 버튼) 그대로 — 강렬하지 않게 */

@media (max-width: 600px) {
  .donate-cta { padding-top: 32px; }
  .donate-cta-inner { flex-direction: column; text-align: center; gap: 14px; padding: 22px 18px; }
  .donate-cta-copy { align-items: center; }
  .donate-cta-btn { width: 100%; max-width: 300px; justify-content: center; }
}

/* ===== 푸터 ===== */
.site-footer {
  margin-top: 72px;   /* 본문과 푸터 사이 여백 */
  background: linear-gradient(165deg, #111827 0%, #1e293b 100%);
  color: #cbd5e1;
  position: relative;
}
.site-footer::before {
  content: ""; display: block; height: 3px; background: var(--grad);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 48px;
  padding: 52px 24px 40px;
}
.footer-brand { max-width: 360px; }
.footer-logo { font-size: 1.4rem; font-weight: 800; color: #fff; letter-spacing: -.03em; }
.footer-desc { margin-top: 12px; font-size: .9rem; line-height: 1.75; color: #94a3b8; }
.footer-donate { margin-top: 20px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.footer-col h4 {
  font-size: .82rem; font-weight: 700; color: #fff; letter-spacing: .04em;
  margin-bottom: 14px; text-transform: uppercase;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col li a {
  font-size: .9rem; color: #94a3b8; transition: color .15s, padding-left .15s;
}
.footer-col li a:hover { color: #fff; padding-left: 3px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0;
  font-size: .82rem; color: #7c8aa0;
}
.footer-bottom .container {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.footer-bottom-links { display: inline-flex; gap: 16px; }
.footer-bottom-links a { color: #94a3b8; transition: color .15s; }
.footer-bottom-links a:hover { color: #fff; }

@media (max-width: 760px) {
  /* 모바일: 링크 컬럼(바로가기·카테고리·소식) 숨기고 핵심만 간결하게 */
  .footer-cols { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 0; padding: 28px 24px 22px; text-align: center; }
  .footer-brand { max-width: none; margin: 0 auto; }
  .footer-logo { font-size: 1.25rem; }
  .footer-desc { font-size: .85rem; margin-top: 8px; }
  .footer-donate { margin-top: 16px; }
  .footer-bottom { padding: 14px 0; }
  .footer-bottom .container { flex-direction: column; gap: 8px; justify-content: center; text-align: center; }
}

/* ===== 메인 랜딩 ===== */
.home-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 12% 0%, rgba(14,159,110,.55) 0%, transparent 45%),
    radial-gradient(130% 140% at 100% 100%, rgba(99,102,241,.5) 0%, transparent 50%),
    linear-gradient(135deg, #1640b5 0%, #1a56db 55%, #0e7490 100%);
  color: #fff; padding: 74px 24px 78px; text-align: center;
}
/* 은은한 도트 패턴 오버레이 */
.home-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 75%);
}
.home-hero > .container { position: relative; z-index: 1; }
.home-hero-eyebrow {
  display: inline-block; margin-bottom: 16px; padding: 5px 14px; border-radius: 24px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.32);
  font-size: .76rem; font-weight: 600; letter-spacing: .04em; backdrop-filter: blur(4px);
}
.home-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; margin-bottom: 14px; letter-spacing: -.04em; line-height: 1.18; text-shadow: 0 2px 20px rgba(0,0,0,.18); }
.home-hero p { opacity: .94; max-width: 560px; margin: 0 auto 26px; font-size: 1.05rem; line-height: 1.7; }
.home-hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hbtn {
  display: inline-flex; align-items: center; gap: 7px; padding: 12px 26px; border-radius: 26px; font-weight: 700; font-size: .95rem;
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.45);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.hbtn.primary { background: #fff; color: var(--primary); border-color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.hbtn.primary:hover { box-shadow: 0 12px 30px rgba(0,0,0,.24); }
.hbtn:hover { transform: translateY(-2px); background: rgba(255,255,255,.26); }
.hbtn.primary:hover { background: #fff; }

.home-sections { margin: 52px auto; display: flex; flex-direction: column; gap: 52px; }
.home-section .home-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.home-sec-head h2 {
  position: relative; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; padding-left: 16px;
}
.home-sec-head h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 1.05em; border-radius: 4px; background: var(--grad);
}
.home-sec-head a {
  display: inline-flex; align-items: center; gap: 4px; font-size: .86rem; color: var(--muted); font-weight: 600;
  padding: 5px 12px; border-radius: 20px; transition: background .15s, color .15s;
}
.home-sec-head a:hover { background: var(--primary-light); color: var(--primary); }

.home-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 20px; }
.home-post {
  display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .25s, transform .25s, border-color .25s;
}
.home-post:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: #dbe3ef; }
.home-post-thumb { height: 168px; overflow: hidden; background: linear-gradient(135deg,#eef4ff,#dbeafe); }
.home-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.home-post:hover .home-post-thumb img { transform: scale(1.06); }
.home-post-thumb.no-thumb { position: relative; }
.home-post-thumb.no-thumb::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 50% 30%, rgba(26,86,219,.10), transparent),
    repeating-linear-gradient(45deg, rgba(26,86,219,.05) 0 12px, transparent 12px 24px);
}
.home-post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.home-post-cat {
  align-self: flex-start; font-size: .7rem; font-weight: 700; color: var(--primary); letter-spacing: .04em;
  background: var(--primary-light); padding: 3px 9px; border-radius: 14px;
}
.home-post-title {
  font-weight: 700; line-height: 1.45; color: var(--text); font-size: 1rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home-post:hover .home-post-title { color: var(--primary); }
.home-post-date { font-size: .78rem; color: var(--muted); margin-top: auto; }

.home-cat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.home-cat-chips a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 24px;
  background: var(--card-bg); border: 1px solid var(--border); font-size: .9rem; font-weight: 600; color: var(--text-sub);
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s, color .15s, box-shadow .2s;
}
.home-cat-chips a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.home-cat-chips a span { background: var(--primary-light); color: var(--primary); border-radius: 12px; padding: 1px 9px; font-size: .76rem; font-weight: 700; }

/* ===== 통합 검색 페이지 ===== */
.search-wrap { max-width: 820px; }
.search-head { margin-bottom: 28px; }
.search-head h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 16px; }
.search-page-form { display: flex; gap: 10px; }
.search-page-form input {
  flex: 1; height: 50px; padding: 0 18px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; font-size: 1rem; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.search-page-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.search-page-form button {
  display: inline-flex; align-items: center; gap: 7px; padding: 0 22px; height: 50px;
  background: var(--primary); color: #fff; border: none; border-radius: 12px; font-size: .95rem; font-weight: 700; cursor: pointer;
  transition: background .15s; white-space: nowrap;
}
.search-page-form button:hover { background: var(--primary-dark); }
.search-summary { margin-top: 16px; color: var(--muted); font-size: .92rem; }
.search-summary strong { color: var(--text); }

.search-empty { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 40px 28px; text-align: center; margin-top: 8px; }
.search-empty p { margin-bottom: 8px; }

.search-section { margin-bottom: 32px; }
.search-section > h2 {
  display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 800;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border);
}
.search-section > h2 span {
  background: var(--primary-light); color: var(--primary); font-size: .8rem; font-weight: 700;
  border-radius: 12px; padding: 1px 10px; margin-left: 2px;
}
.search-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.search-list li a {
  display: block; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px; transition: border-color .15s, box-shadow .2s, transform .15s;
}
.search-list li a:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.search-list .s-title { display: block; font-weight: 700; color: var(--text); font-size: 1rem; }
.search-list li a:hover .s-title { color: var(--primary); }
.search-list .s-meta { display: block; font-size: .78rem; color: var(--primary); font-weight: 600; margin-top: 3px; }
.search-list .s-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .86rem; color: var(--muted); line-height: 1.55; margin-top: 5px;
}

/* ===== 매거진형 홈 (요즘IT 스타일) ===== */
/* 카테고리 탭바 */
.cat-bar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 64px; z-index: 60; }
.cat-bar-inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; scroll-padding-right: 24px; }
.cat-bar-inner::-webkit-scrollbar { display: none; }
/* 마지막 탭이 컨테이너 끝에 붙어 잘려 보이지 않도록 우측 여백 */
.cat-bar-inner::after { content: ""; flex: none; width: 8px; }
.cat-bar-link {
  flex: none; padding: 14px 11px; font-size: .9rem; font-weight: 600; color: var(--text-sub);
  border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s, border-color .15s;
}
.cat-bar-link:hover { color: var(--primary); }
.cat-bar-link.active { color: var(--primary); border-bottom-color: var(--primary); }

.home-main { margin: 36px auto 8px; }

/* 공통 메타/카테고리 라벨 */
.m-cat { align-self: flex-start; font-size: .74rem; font-weight: 700; color: var(--primary); }
.m-meta { font-size: .78rem; color: var(--muted); }

/* 대표 글 + 사이드 */
.feature { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; margin-bottom: 52px; }
.feature-main { display: flex; flex-direction: column; }
.feature-thumb { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(135deg,#eef4ff,#dbeafe); }
.feature-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.feature-main:hover .feature-thumb img { transform: scale(1.04); }
.feature-thumb.no-thumb { position: relative; }
.feature-thumb.no-thumb::after { content:""; position:absolute; inset:0; background: radial-gradient(60% 80% at 50% 35%, rgba(26,86,219,.10), transparent), repeating-linear-gradient(45deg, rgba(26,86,219,.05) 0 14px, transparent 14px 28px); }
.feature-body { padding: 16px 2px 0; display: flex; flex-direction: column; gap: 10px; }
.feature-title { font-size: 1.5rem; font-weight: 800; line-height: 1.35; letter-spacing: -.02em; color: var(--text); }
.feature-main:hover .feature-title { color: var(--primary); }
.feature-excerpt { color: var(--muted); font-size: .95rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.feature-side { list-style: none; display: flex; flex-direction: column; }
.feature-side li { border-bottom: 1px solid var(--border-soft); }
.feature-side li:last-child { border-bottom: none; }
.feature-side li a { display: flex; gap: 14px; padding: 16px 4px; align-items: flex-start; }
.fs-no { flex: none; font-size: 1.15rem; font-weight: 800; color: var(--primary); width: 22px; line-height: 1.4; }
.fs-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fs-cat { font-size: .72rem; font-weight: 700; color: var(--primary); }
.fs-title { font-weight: 700; font-size: .96rem; line-height: 1.45; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feature-side li a:hover .fs-title { color: var(--primary); }

/* 본문 그리드 + 사이드바 */
.home-grid-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.home-grid-main { min-width: 0; }

.mag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 20px; }
.mag-card { display: flex; flex-direction: column; }
.mag-thumb { width: 100%; aspect-ratio: 16/10; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg,#eef4ff,#dbeafe); }
.mag-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.mag-card:hover .mag-thumb img { transform: scale(1.05); }
.mag-thumb.no-thumb { position: relative; }
.mag-thumb.no-thumb::after { content:""; position:absolute; inset:0; background: radial-gradient(60% 80% at 50% 35%, rgba(26,86,219,.09), transparent), repeating-linear-gradient(45deg, rgba(26,86,219,.045) 0 12px, transparent 12px 24px); }
.mag-body { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 7px; }
.mag-title { font-weight: 700; font-size: 1rem; line-height: 1.45; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mag-card:hover .mag-title { color: var(--primary); }

/* 사이드바 */
.home-aside { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 124px; }
.aside-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px; }
.aside-title { font-size: 1rem; font-weight: 800; margin-bottom: 14px; padding-left: 12px; position: relative; }
.aside-title::before { content:""; position:absolute; left:0; top:50%; transform:translateY(-50%); width:4px; height:1em; border-radius:3px; background: var(--grad); }
.rank-mini { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.rank-mini li a { display: flex; gap: 12px; align-items: flex-start; }
.rm-no { flex: none; width: 22px; font-weight: 800; color: var(--primary); }
.rm-title { font-size: .9rem; line-height: 1.45; color: var(--text-sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-mini li a:hover .rm-title { color: var(--primary); }
.aside-tools { display: flex; flex-direction: column; gap: 4px; }
.aside-tools a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; font-size: .9rem; color: var(--text-sub); font-weight: 500; transition: background .15s, color .15s; }
.aside-tools a:hover { background: var(--primary-light); color: var(--primary); }
.aside-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: .85rem; font-weight: 700; color: var(--primary); }

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 22px; }
  .home-grid-wrap { grid-template-columns: 1fr; }
  .home-aside { position: static; }
}
@media (max-width: 420px) {
  .mag-grid { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
  .feature-title { font-size: 1.25rem; }
}

/* ===== 목록 페이지 (요즘IT 리스트 스타일) ===== */
.list-page { margin: 36px auto 16px; }
.list-head { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.list-head h1 { display: inline-block; font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.list-count { margin-left: 9px; font-size: .88rem; color: var(--muted); font-weight: 600; }
@media (max-width: 600px) {
  .list-head h1 { font-size: 1.18rem; }
  .list-count { font-size: .82rem; margin-left: 7px; }
}

/* ===== 정적 페이지(소개·문의) ===== */
.page-wrap { max-width: 820px; margin: 40px auto 24px; padding: 0 24px; }
.page-head { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.page-sub { margin-top: 8px; color: var(--muted); font-size: .95rem; }
.page-body { font-size: 1rem; line-height: 1.85; color: var(--text-sub); }
.page-body h2 { font-size: 1.2rem; font-weight: 800; color: var(--text); margin: 30px 0 12px; }
.page-body p { margin-bottom: 16px; }
.page-body ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.page-body ul li { position: relative; padding-left: 18px; margin-bottom: 9px; }
.page-body ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.page-body strong { color: var(--text); font-weight: 700; }
.page-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.page-cta { margin-top: 24px; }

/* 문의 폼 */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-row { display: flex; gap: 14px; flex-wrap: wrap; }
.contact-row .contact-field { flex: 1; min-width: 200px; }
.contact-field { display: flex; flex-direction: column; gap: 6px; }
.contact-field label { font-size: .88rem; font-weight: 600; color: var(--text-sub); }
.contact-field label small { font-weight: 400; color: var(--muted); }
.contact-field .required { color: #dc2626; }
.contact-field .tool-text, .contact-field .tool-input { width: 100%; }
.contact-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.contact-or { font-size: .86rem; color: var(--muted); }
.contact-done { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 32px 26px; text-align: center; line-height: 1.7; }
.contact-done-title { font-size: 1.1rem; font-weight: 800; color: #15803d; margin-bottom: 8px; }
.flash-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 10px 14px; border-radius: 8px; font-size: .9rem; margin-bottom: 16px; }
.list-desc { margin-top: 10px; color: var(--muted); font-size: .95rem; line-height: 1.6; }
.mag-excerpt { font-size: .86rem; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 가로 행(row) 리스트 — 텍스트 좌 / 썸네일 우 */
.post-rows { display: flex; flex-direction: column; }
.post-row {
  display: flex; gap: 28px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--border);
}
.post-row:first-child { border-top: 1px solid var(--border); }
.pr-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.pr-body .m-cat { font-size: .76rem; }
.pr-title {
  font-size: 1.3rem; font-weight: 800; line-height: 1.4; letter-spacing: -.02em; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .15s;
}
.post-row:hover .pr-title { color: var(--primary); }
.pr-excerpt {
  font-size: .95rem; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pr-thumb { flex: none; width: 220px; aspect-ratio: 16/10; border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.post-row:hover .pr-thumb img { transform: scale(1.05); }

@media (max-width: 600px) {
  .post-row { gap: 16px; padding: 18px 0; align-items: flex-start; }
  .pr-title { font-size: 1.05rem; }
  .pr-excerpt { display: none; }
  .pr-thumb { width: 116px; border-radius: 10px; }
}

/* ===== 랭킹 ===== */
.rank-updated { font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rank-item { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); }
.rank-item:hover { border-color: var(--primary); }
.rank-no { flex-shrink: 0; width: 30px; text-align: center; font-weight: 800; font-size: 1.1rem; color: var(--primary); }
.rank-thumb { flex-shrink: 0; width: 120px; }
.rank-thumb img { width: 120px; height: 68px; object-fit: cover; border-radius: 6px; display: block; }
.rank-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rank-title { font-weight: 600; color: var(--text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-title:hover { color: var(--primary); }
.rank-meta { font-size: .8rem; color: var(--muted); }
@media (max-width: 520px) {
  .rank-thumb, .rank-thumb img { width: 92px; }
  .rank-thumb img { height: 52px; }
  .rank-channels .rank-thumb, .rank-channels .rank-thumb img { width: 54px; height: 54px; }
}
/* 채널(아바타) 변형 */
.rank-channels .rank-thumb { width: 64px; }
.rank-channels .rank-thumb img { width: 64px; height: 64px; border-radius: 50%; }

/* =============================================
   반응형 (태블릿 / 모바일)
   ============================================= */
@media (max-width: 900px) {
  .main-wrap, .post-wrap { grid-template-columns: 1fr; gap: 28px; }
  .sidebar { order: 2; }
}
@media (max-width: 720px) {
  /* 모바일 네비: 햄버거 토글 */
  .nav-toggle { display: block; color: var(--text); }
  .site-nav {
    display: none; position: absolute; top: 64px; right: 12px; left: 12px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: var(--shadow-lg); padding: 8px; z-index: 90;
  }
  .site-nav.open { display: flex; }
  .site-nav a, .site-nav .nav-top { width: 100%; padding: 11px 14px; border-radius: 8px; font-size: .95rem; }
  .nav-dropdown { position: static; }
  .nav-drop-menu { position: static; display: block; box-shadow: none; border: none; padding: 0 0 4px 10px; margin: 0; min-width: 0; }
  .nav-drop-toggle { pointer-events: none; opacity: .6; font-size: .8rem; }

  /* 헤더 검색: 로고와 햄버거 사이에서 유연하게 */
  .site-search { margin: 0 8px; max-width: none; min-width: 0; }
  .site-search input { height: 38px; }

  .home-hero { padding: 52px 20px 56px; }
  .home-sections { margin: 36px auto; gap: 40px; }
  .home-sec-head h2 { font-size: 1.25rem; }

  /* 글 카드: 세로 스택 */
  .post-card { flex-direction: column; }
  .post-card-thumb, .post-card-thumb.no-thumb { width: 100%; height: 180px; }
  .post-header { padding: 26px 22px 20px; }
  .post-body { padding: 24px 22px; }
  .post-footer { padding: 20px 22px 28px; }
  .post-nav { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .home-post-grid { grid-template-columns: 1fr; }
  .hbtn { width: 100%; justify-content: center; }
  .search-page-form { flex-direction: column; }
  .search-page-form button { width: 100%; justify-content: center; }
  .site-logo { font-size: 1.1rem; }
}
