/*
Theme Name: 프레스런 제휴마케팅 테마
Theme URI: https://presslearn.co.kr
Author: 로알남
Author URI: https://presslearn.co.kr
Description: 쿠팡파트너스 제휴마케팅에 최적화된 상품 허브 테마. 상품 1개 = 글 1개로 관리하고, 가격·링크만 넣으면 상품 카드와 상세 페이지가 자동으로 만들어집니다. 허브 꾸미기 페이지 하나로 디자인이 끝납니다.
Version: 2.0.5
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: presslearn-theme-affiliate
*/

:root {
  --ink: #17202c;
  --ink-soft: #4b5563;
  --ink-muted: #8b95a1;
  --line: #e6e9ef;
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --price: #e03131;
  --cta: #2b5ce6;
  --cta-dark: #1e46bd;
  --good-bg: #eef7ee;
  --good-text: #23662b;
  --bad-bg: #fdeeee;
  --bad-text: #9c2b2b;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- header ---------- */
.site-header {
  position: relative; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-sticky { position: sticky; }
.site-header.is-sticky.is-stuck { box-shadow: 0 2px 10px rgba(15,23,42,.07); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 62px;
}
.site-logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 18px; letter-spacing: -.01em;
  min-width: 0; flex-shrink: 0;
}
.site-logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-logo img { width: 28px; height: 28px; flex-shrink: 0; border-radius: 7px; }

.header-search { flex: 1; max-width: 420px; }
.header-search form { display: flex; }
.header-search input[type="search"] {
  flex: 1; min-width: 0;
  font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-right: none;
  border-radius: 999px 0 0 999px;
  padding: 9px 18px; outline: none; background: var(--bg-alt);
}
.header-search input[type="search"]:focus { border-color: var(--cta); background: #fff; }
.header-search button {
  font: inherit; font-size: 14px; font-weight: 600; color: #fff;
  background: var(--cta); border: none; cursor: pointer;
  padding: 0 18px; border-radius: 0 999px 999px 0;
}
.header-search button:hover { background: var(--cta-dark); }

/* ---------- home hero ---------- */
.home-hero { padding: 44px 0 10px; text-align: center; }
.home-hero h1 { font-size: 30px; letter-spacing: -.02em; }
.home-hero p { margin-top: 8px; font-size: 16px; color: var(--ink-soft); }

.cat-chips {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding-top: 22px; padding-bottom: 6px;
}
.cat-chips a {
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; background: #fff;
  transition: all .12s ease;
}
.cat-chips a:hover, .cat-chips a.active {
  border-color: var(--cta); color: var(--cta); background: #eaf0fe;
}

/* ---------- product grid ---------- */
.archive-title { padding: 34px 0 0; font-size: 22px; }
.grid-section { padding: 26px 0 50px; }
.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.product-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff;
  transition: box-shadow .15s ease, transform .15s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: 0 8px 24px rgba(23,32,44,.08); transform: translateY(-2px); }
.card-thumb { aspect-ratio: 1 / 1; background: var(--bg-alt); position: relative; }
.card-thumb img { width: 100%; height: 100%; object-fit: contain; }
.card-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 12px; font-weight: 700; color: var(--cta);
  background: #eaf0fe; padding: 3px 10px; border-radius: 999px;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: 12px; color: var(--ink-muted); }
.card-title {
  font-size: 15px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-rating { font-size: 13px; color: var(--ink-soft); }
.card-rating .stars { color: #f5a623; }
.card-price { margin-top: auto; padding-top: 6px; font-size: 17px; font-weight: 800; color: var(--price); }
.card-price small { font-size: 13px; font-weight: 600; }
.card-price .dc { color: var(--price); margin-right: 4px; }

.no-posts { padding: 60px 0; text-align: center; color: var(--ink-soft); }

/* pagination */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 6px 0 20px; }
.pagination .page-numbers {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; font-size: 14px; padding: 0 10px;
}
.pagination .page-numbers.current { background: var(--cta); border-color: var(--cta); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--cta); color: var(--cta); }

/* ---------- single product ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 22px 0 0; font-size: 14px; color: var(--ink-soft);
}
.back-link:hover { color: var(--cta); }

.product-top {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
  padding-top: 24px; padding-bottom: 40px; align-items: start;
}
.pt-media { position: sticky; top: 82px; min-width: 0; }
.pt-figure {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; aspect-ratio: 1 / 1; margin: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pt-figure img { width: 100%; height: 100%; object-fit: contain; }
.pt-thumbs .pt-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pt-info .badge {
  display: inline-block; font-size: 13px; font-weight: 700;
  color: var(--cta); background: #eaf0fe;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.pt-info h1 { font-size: 26px; line-height: 1.4; letter-spacing: -.02em; margin: 12px 0 0; }
.pt-info .subtitle { margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.pt-info .rating { margin-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-soft); }
.pt-info .rating .stars { color: #f5a623; letter-spacing: 2px; margin-right: 6px; }
.pt-info .rating strong { color: var(--ink); }

.price-box { margin-top: 16px; }
.price-original { font-size: 14px; color: var(--ink-muted); text-decoration: line-through; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.discount { font-size: 22px; font-weight: 800; color: var(--price); }
.price-label { font-size: 14px; color: var(--ink-soft); }
.price { font-size: 32px; font-weight: 800; color: var(--price); letter-spacing: -.02em; }
.price small { font-size: 19px; font-weight: 700; }

.cta-btn {
  display: block; margin-top: 20px;
  background: var(--cta); color: #fff; text-align: center;
  font-size: 17px; font-weight: 700; padding: 16px 20px;
  border-radius: var(--radius);
  transition: background .15s ease, transform .1s ease;
}
.cta-btn:hover { background: var(--cta-dark); }
.cta-btn:active { transform: scale(.985); }
.top-disclosure {
  display: block; margin: 14px 0 0;
  font-size: 13px; color: var(--ink-soft); line-height: 1.7;
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px;
}
.cta-note { margin-top: 12px; font-size: 13px; color: var(--ink-muted); line-height: 1.8; }


/* ---------- single sections ---------- */
.section { padding: 36px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }
.section h2 {
  font-size: 20px; letter-spacing: -.01em; margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.section h2::before {
  content: ""; width: 4px; height: 17px; border-radius: 2px; background: var(--cta);
}

.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; table-layout: fixed; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table th {
  text-align: left; font-weight: 500; color: var(--ink-soft);
  padding: 11px 8px; width: 30%; overflow-wrap: break-word;
}
.spec-table td { padding: 11px 8px; font-weight: 600; overflow-wrap: break-word; }

.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pc-card { border-radius: var(--radius); padding: 20px; font-size: 15px; }
.pc-card.good { background: var(--good-bg); }
.pc-card.bad { background: var(--bad-bg); }
.pc-card h3 { font-size: 15px; margin-bottom: 12px; }
.pc-card.good h3 { color: var(--good-text); }
.pc-card.bad h3 { color: var(--bad-text); }
.pc-card ul { list-style: none; }
.pc-card li { padding: 4px 0 4px 22px; position: relative; }
.pc-card.good li::before { content: "✓"; position: absolute; left: 0; color: var(--good-text); font-weight: 700; }
.pc-card.bad li::before { content: "✕"; position: absolute; left: 0; color: var(--bad-text); font-weight: 700; }

.review-body { font-size: 16px; color: #2c3540; }
.review-body p { margin-bottom: 1.1em; }
.review-body h2, .review-body h3 { margin: 1.6em 0 .6em; }
.review-body h2 { font-size: 20px; }
.review-body h3 { font-size: 18px; }
.review-body img { border-radius: 12px; margin: 1em 0; }
.review-body ul, .review-body ol { padding-left: 1.4em; margin-bottom: 1.1em; }

.final-cta { text-align: center; padding: 44px 0 52px; }
.final-cta p.lead { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.final-cta p.sub { font-size: 15px; color: var(--ink-soft); margin-bottom: 4px; }
.final-cta .cta-btn { max-width: 480px; margin-left: auto; margin-right: auto; }

/* generic page */
.page-body { padding: 40px 0 60px; }
.page-body h1 { font-size: 26px; margin-bottom: 20px; }
.page-content { font-size: 16px; }
.page-content p { margin-bottom: 1.1em; }
.page-content h2 { font-size: 20px; margin: 1.6em 0 .6em; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-alt);
  padding: 30px 0; text-align: center;
}
.footer-menu { display: flex; gap: 18px; justify-content: center; margin-bottom: 14px; font-size: 14px; color: var(--ink-soft); }
.footer-menu a:hover { color: var(--cta); }
.disclosure {
  font-size: 13px; color: var(--ink-soft); background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; display: inline-block; margin-bottom: 14px;
}
.copyright { font-size: 12px; color: var(--ink-muted); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-top { grid-template-columns: 1fr; gap: 22px; padding-top: 16px; }
  .pt-media { position: static; max-width: 440px; margin: 0 auto; width: 100%; }
  .home-hero h1 { font-size: 24px; }
  .header-search { display: none; }
  .mobile-search { display: block; padding: 14px 0 0; }
  .pc-grid { grid-template-columns: 1fr; }
}
@media (min-width: 721px) {
  .mobile-search { display: none; }
}
@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .card-body { padding: 10px 12px 12px; }
  .card-title { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-card, .cta-btn { transition: none; }
}

.site-logo-img { height: 28px; width: auto; display: block; }

/* ---------- v1.1: 신규 기능 ---------- */
/* 홈 섹션 제목 / 인기 상품 */
.home-section-title { font-size: 20px; font-weight: 800; margin: 26px 0 14px; }
.popular-products { padding-top: 6px; }
.product-grid.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .product-grid.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 정렬 탭 */
.pdm-sort-tabs { display: flex; gap: 6px; margin: 0 0 16px; }
.pdm-sort-tab { font-size: 13.5px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); }
.pdm-sort-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

/* 가격 기준일 */
.price-date { font-size: 12px; color: var(--ink-muted); margin-bottom: 2px; }

/* 광고 슬롯 */
.pdm-slot { margin: 22px auto; }

/* 관련 상품 */
.related-products { border-top: 1px solid var(--line); }
.related-products h2 { font-size: 20px; font-weight: 800; margin-bottom: 16px; }

/* 모바일 하단 고정 구매 버튼 */
.pdm-sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.pdm-sticky-cta .sc-price { font-size: 14px; white-space: nowrap; }
.pdm-sticky-cta .sc-price strong { color: var(--price); font-size: 17px; }
.pdm-sticky-cta .cta-btn { flex: 1; margin: 0; padding: 12px 10px; font-size: 15px; text-align: center; }
@media (max-width: 768px) {
  .pdm-sticky-cta { display: flex; }
  body.single { padding-bottom: 74px; }
}

/* ---------- v1.2: 페이지 구성 ---------- */
/* 상단 배치 */
.product-top.pt-layout-right .pt-media { order: 2; }
.product-top.pt-layout-right .pt-info { order: 1; }
.product-top.pt-layout-stack { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; gap: 20px; }
.product-top.pt-layout-stack .pt-media { max-width: 440px; margin: 0 auto; width: 100%; position: static; }
.product-top.pt-layout-stack .pt-info { text-align: center; }
.product-top.pt-layout-stack .pt-info .price-row { justify-content: center; }
.product-top.pt-layout-stack .pt-info .cta-btn { max-width: 480px; margin-left: auto; margin-right: auto; }
.product-top.pt-layout-stack .pt-thumbs { justify-content: center; }

/* 카드 열 수 */
.product-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .product-grid.cols-3, .product-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .product-grid, .product-grid.cols-2 { grid-template-columns: 1fr; } }



/* ---------- v1.6: 상품 이미지 갤러리 ---------- */
#pdm-main-img { transition: opacity .15s ease; }
.pt-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pt-thumb {
  width: 64px; height: 64px; padding: 0; border: 2px solid var(--line); border-radius: 10px;
  overflow: hidden; cursor: pointer; background: #fff; flex: none;
}
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-thumb.is-active { border-color: var(--cta); }
.pt-thumb:hover { border-color: var(--cta-dark); }
@media (max-width: 560px) { .pt-thumb { width: 56px; height: 56px; } }

/* ---------- v1.7.1: 모바일 상단 정보 간격 ---------- */
@media (max-width: 768px) {
  .pt-info { padding-top: 10px; }
  .pt-info h1 { font-size: 22px; line-height: 1.45; margin-top: 14px; }
  .pt-info .subtitle { margin-top: 10px; }
  .pt-info .rating { margin-top: 18px; padding-bottom: 18px; }
  .price-box { margin-top: 18px; }
  .price-row { margin-top: 6px; }
  .pt-info .cta-btn { margin-top: 18px; }
  .top-disclosure { margin-top: 10px; font-size: 12.5px; line-height: 1.6; }
  .pt-thumbs { margin-top: 12px; }
}

/* ---------- v1.7.3: 레이아웃 안정화 (광고·긴 텍스트 오버플로 방어) ---------- */
main#content { overflow-x: clip; }
.pt-info { min-width: 0; }
.pt-info h1, .pt-info .subtitle { overflow-wrap: break-word; }

/* 광고 슬롯: 컨테이너보다 큰 광고 단위가 페이지를 밀어내지 않도록 */
.pdm-slot { min-width: 0; max-width: 100%; overflow-x: hidden; text-align: center; }
.pdm-slot iframe, .pdm-slot ins { max-width: 100%; }

/* 본문(리뷰): 광고·임베드·긴 문자열·표 방어 */
.review-body { min-width: 0; overflow-wrap: break-word; }
.review-body iframe, .review-body ins, .review-body embed, .review-body object, .review-body video { max-width: 100%; }
.review-body table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }

/* 장단점 카드: 그리드 자식 최소폭 해제 + 긴 문장 줄바꿈 */
.pc-card { min-width: 0; overflow-wrap: break-word; }

/* =====================================================
 * v1.9.0 — 일반 글 · 목차 · 브레드크럼 · 카테고리 · 빈 화면
 * ===================================================== */

/* ---------- 브레드크럼 (현재 위치) ---------- */
.pdm-breadcrumb {
  margin: 22px 0 0; font-size: 13.5px; color: var(--ink-muted);
  overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
}
.pdm-breadcrumb a { color: var(--ink-soft); }
.pdm-breadcrumb a:hover { color: var(--cta); }
.pdm-breadcrumb span[aria-current] { color: var(--ink); font-weight: 600; }
.pdm-bc-sep { margin: 0 4px; color: var(--line); }

/* ---------- 카테고리 화면 머리 ---------- */
.pdm-archive-head .archive-title { padding-top: 10px; }
.pdm-archive-desc { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-soft); }

.section h2[id] { scroll-margin-top: 76px; }

/* ---------- 일반 글 화면 ---------- */
.pdm-article { padding-bottom: 40px; }
.pdm-article-head { margin-top: 22px; }
.pdm-article-cat {
  display: inline-block; margin-bottom: 10px; padding: 4px 12px;
  border-radius: 99px; background: var(--bg-alt); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-soft);
}
.pdm-article-cat:hover { color: var(--cta); border-color: var(--cta); }
.pdm-article-head h1 { font-size: 28px; line-height: 1.35; letter-spacing: -0.02em; }
.pdm-article-meta { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-muted); }
.pdm-article-thumb { margin: 22px 0 0; }
.pdm-article-thumb img { width: 100%; height: auto; border-radius: var(--radius); }
.pdm-article-body { margin-top: 26px; }
.pdm-article-body h2[id], .pdm-article-body h3[id] { scroll-margin-top: 76px; }
.pdm-page-links { margin: 20px 0 0; font-size: 14px; color: var(--ink-soft); }
.pdm-page-links a { display: inline-block; margin: 0 2px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 6px; }
.pdm-page-links a:hover { border-color: var(--cta); color: var(--cta); }
@media (max-width: 640px) {
  .pdm-article-head h1 { font-size: 23px; }
}

/* ---------- 자동 목차 ---------- */
.pdm-toc {
  margin: 0 0 28px; padding: 18px 22px;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
}
.pdm-toc-title { margin: 0 0 8px; font-weight: 700; font-size: 15px; color: var(--ink); }
.pdm-toc ol { margin: 0; padding-left: 1.3em; }
.pdm-toc li { margin: 4px 0; font-size: 14.5px; }
.pdm-toc li.is-sub { margin-left: 1.1em; list-style-type: circle; }
.pdm-toc a { color: var(--ink-soft); }
.pdm-toc a:hover { color: var(--cta); text-decoration: underline; }

/* ---------- 빈 화면 (404 · 검색 결과 없음) ---------- */
.pdm-empty { padding: 70px 20px 40px; text-align: center; }
.pdm-empty-icon { color: var(--ink-muted); margin-bottom: 14px; }
.pdm-empty h1 { font-size: 22px; margin-bottom: 8px; word-break: keep-all; }
.pdm-empty p { color: var(--ink-soft); font-size: 15px; }
.pdm-empty-search {
  display: flex; max-width: 420px; margin: 22px auto 0;
}
.pdm-empty-home { margin-top: 16px; }
.pdm-empty-home a { font-size: 14px; color: var(--ink-soft); }
.pdm-empty-home a:hover { color: var(--cta); }

/* ---------- 푸터 메뉴 (외모 > 메뉴 사용 시) ---------- */
.footer-menu ul { display: contents; list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin: 0; }
.footer-menu { flex-wrap: wrap; }

/* =========================================================
   v2.0.0 — 헤더 · 글 화면 · 푸터
   ========================================================= */

/* ---------- 글자 크기 · 모서리 · 줄 간격 ---------- */
body.pdm-font-small { font-size: 15px; }
body.pdm-font-normal { font-size: 16px; }
body.pdm-font-big { font-size: 17.5px; }
body.pdm-font-xl { font-size: 19px; }
body.pdm-corner-square { --radius: 0px; }
body.pdm-corner-soft { --radius: 6px; }
body.pdm-corner-xround { --radius: 22px; }
body.pdm-line-wide .review-body,
body.pdm-line-wide .pdm-article-body { line-height: 1.95; }
body.pdm-noselect { -webkit-user-select: none; user-select: none; }
body.pdm-noselect input,
body.pdm-noselect textarea { -webkit-user-select: text; user-select: text; }

/* ---------- 공지 바 ---------- */
.pdm-notice-bar { background: var(--cta); color: #fff; font-size: 14px; }
.pdm-notice-bar .wrap { padding-top: 9px; padding-bottom: 9px; text-align: center; }
.pdm-notice-bar a { text-decoration: underline; }

/* ---------- 헤더 도구 ---------- */
.header-tools { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; min-width: 0; }
.header-tools .header-search { flex: 1; }
.site-header.align-center .wrap { flex-direction: column; height: auto; padding-top: 14px; padding-bottom: 14px; gap: 10px; }
.site-header.align-center .header-tools { width: 100%; justify-content: center; }
/* 오른쪽 정렬: 로고가 오른쪽으로 가고 검색창은 왼쪽으로 이동한다 */
.site-header.align-right .wrap { flex-direction: row-reverse; }
.site-header.align-right .header-tools { flex-direction: row-reverse; }
.site-logo-img.is-custom { width: auto; max-height: 34px; border-radius: 0; }

.site-tagline { border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); }
.site-tagline .wrap { display: block; padding-top: 8px; padding-bottom: 8px; }

/* ---------- 헤더 카테고리 줄 ---------- */
.pdm-headerbar { border-top: 1px solid var(--line); background: var(--bg); }
.pdm-headerbar .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: none; }
.pdm-headerbar .wrap::-webkit-scrollbar { display: none; }
.pdm-headerbar.is-center .wrap { justify-content: center; }
.pdm-headerbar.is-right .wrap { justify-content: flex-end; }
.pdm-headerbar a {
  flex-shrink: 0; font-size: 14px; color: var(--ink-soft);
  padding: 5px 12px; border-radius: 999px;
}
.pdm-headerbar a:hover { background: var(--bg-alt); color: var(--ink); }
.pdm-headerbar a.is-current { background: var(--cta); color: #fff; }

/* ---------- 읽기 진행 바 · 맨 위로 ---------- */
.pdm-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; background: transparent; }
.pdm-progress-fill { display: block; height: 100%; width: 0; background: var(--cta); transition: width .1s linear; }
.pdm-top-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .2s;
  box-shadow: 0 2px 10px rgba(15,23,42,.12);
}
.pdm-top-btn.is-on { opacity: 1; visibility: visible; }
.pdm-top-btn:hover { color: var(--cta); border-color: var(--cta); }
body.single .pdm-sticky-cta ~ .pdm-top-btn,
.pdm-sticky-cta ~ .pdm-top-btn { bottom: 82px; }

/* ---------- 글 화면 부가 요소 ---------- */
.pdm-article-tools { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; }
.pdm-font-btn {
  border: 1px solid var(--line); background: var(--bg-alt); color: var(--ink-soft);
  border-radius: 8px; min-width: 34px; height: 32px; cursor: pointer; font: inherit; font-size: 14px;
}
.pdm-font-btn:hover { color: var(--cta); border-color: var(--cta); }
.pdm-article-body.is-font-lg { font-size: 1.08em; }
.pdm-article-body.is-font-xl { font-size: 1.18em; }

.pdm-author-box {
  display: flex; gap: 14px; align-items: center;
  margin: 30px 0 0; padding: 18px 20px;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
}
.pdm-author-box img { width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0; }
.pdm-author-name { font-weight: 700; font-size: 15px; }
.pdm-author-desc { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }

.pdm-share { margin: 26px 0 0; }

.pdm-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 30px 0 0; }
.pdm-prevnext a {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  display: block; min-width: 0;
}
.pdm-prevnext a:hover { border-color: var(--cta); }
.pdm-prevnext .pn-label { font-size: 12.5px; color: var(--ink-muted); display: block; margin-bottom: 4px; }
.pdm-prevnext .pn-title { font-size: 14.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pdm-prevnext .pn-next { text-align: right; }
@media (max-width: 600px) { .pdm-prevnext { grid-template-columns: 1fr; } }

/* ---------- 목차 확장 ---------- */
.pdm-toc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pdm-toc-toggle {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft);
  border-radius: 8px; padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer;
}
.pdm-toc.is-closed ol { display: none; }
.pdm-toc a.is-current { color: var(--cta); font-weight: 700; }

/* ---------- 카드 부가 정보 ---------- */
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.card-excerpt { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-new { display: inline-block; background: var(--price); color: #fff; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* ---------- 푸터 확장 ---------- */
.footer-sns { display: flex; gap: 10px; justify-content: center; margin: 14px 0 0; }
.footer-sns a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
}
.footer-sns a:hover { color: var(--cta); border-color: var(--cta); }
.footer-text { font-size: 14px; color: var(--ink-soft); margin-top: 12px; }
.footer-biz { font-size: 12.5px; color: var(--ink-muted); margin-top: 10px; line-height: 1.7; }