:root {
  --ink: #16181d;
  --ink-2: #2a2e36;
  --muted: #6b7280;
  --muted-2: #9aa1ac;
  --border: #eceef1;
  --border-2: #f0f1f3;
  --bg: #ffffff;
  --bg-soft: #fafbfc;
  --accent: #2f6fea;
  --accent-hover: #1f4fc4;
  --accent-soft: #eef3ff;

  --blue-bg: #eef3ff; --blue-fg: #2f6fea;
  --green-bg: #e9f8f3; --green-fg: #12946b;
  --purple-bg: #f4eeff; --purple-fg: #7a46e0;
  --pink-bg: #ffeef5; --pink-fg: #d63e82;
  --amber-bg: #fff6e4; --amber-fg: #b4791f;
  --slate-bg: #f1f2f4; --slate-fg: #4b5563;
}

* { box-sizing: border-box; }

body.blog {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.blog a { text-decoration: none; }

/* ---- header ---- */
.blog-header {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid #16181d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 56px;
  gap: 20px;
  flex-wrap: wrap;
}
.nav-short { display: none; }
@media (max-width: 640px) {
  .blog-header { padding: 14px 16px; }
  .blog-nav-wrap { gap: 14px; }
  .blog-nav { gap: 14px; font-size: 13px; }
  .btn-dark { padding: 8px 14px; font-size: 12px; }
  .nav-full { display: none; }
  .nav-short { display: inline; }
}

.blog-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo {
  height: 52px;
  width: auto;
  display: block;
}

.blog-nav-wrap { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.blog-nav { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 600; }
.blog-nav a { color: var(--ink); border-bottom: 2px solid transparent; padding-bottom: 3px; text-decoration: none; }
.blog-nav a:hover { border-color: var(--ink); color: var(--ink); }
.blog-nav a.current { color: var(--accent); border-color: var(--accent); }

.btn-dark {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); border: none;
  padding: 12px 22px; border-radius: 100px;
  font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none;
}
a.btn-dark, a.btn-dark:hover { color: #fff; }
.btn-dark:hover { background: var(--accent); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; border: none;
  padding: 16px 26px; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-white {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--ink); border: none;
  padding: 15px 26px; border-radius: 100px;
  font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn-white:hover { background: var(--accent); color: #fff; }

/* ---- layout helpers ---- */
.blog-main { width: 100%; flex: 1; }
.wrap-wide { max-width: 1160px; margin: 0 auto; padding: 0 56px; }
.wrap-mid { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.wrap-gallery { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.wrap-post { max-width: 700px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 720px) {
  .wrap-wide, .wrap-mid { padding-left: 20px; padding-right: 20px; }
}

/* ---- hero ---- */
.hero-section { border-bottom: 1px solid var(--border-2); }
.hero-inner {
  padding-top: 80px;
  padding-bottom: 56px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; flex-wrap: wrap;
}
.hero-text { max-width: 520px; }
.eyebrow { font-size: 13px; font-weight: 800; color: var(--accent); margin-bottom: 16px; }
.hero-headline { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; margin: 0; }
.hero-sub { font-size: 16px; color: var(--muted); margin-top: 18px; line-height: 1.7; }
@media (max-width: 720px) { .hero-headline { font-size: 32px; } }

.hero-image { width: 460px; max-width: 100%; height: auto; flex-shrink: 0; }
@media (max-width: 720px) { .hero-image { width: 320px; } }

.search-pill {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2px solid #16181d; border-radius: 100px;
  padding: 16px 22px;
  margin-bottom: 26px;
}
.search-pill.compact { border-radius: 12px; padding: 13px 16px; background: #f7f8fa; }
.search-pill input {
  border: none; background: transparent; outline: none; flex: 1;
  font-family: inherit; font-size: 15px; color: var(--ink);
}
.search-pill input::placeholder { color: var(--muted-2); }
.search-pill .icon { font-size: 16px; color: var(--muted-2); }

/* ---- section / cards ---- */
.section { padding: 64px 0 8px; }
.section.tight { padding-bottom: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; gap: 12px; flex-wrap: wrap; }
.section-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.section-link { font-size: 14px; font-weight: 700; color: var(--muted); }
.section-link:hover { color: var(--accent); }
.section-desc { font-size: 14px; color: var(--muted); max-width: 640px; line-height: 1.7; margin: 0 0 26px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  display: block; cursor: pointer; border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; background: #fff; text-decoration: none; color: inherit;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.card:hover { box-shadow: 0 10px 26px rgba(20, 30, 60, 0.07); border-color: #dde6fb; }
.card.tone-green:hover { box-shadow: 0 10px 26px rgba(20, 80, 50, 0.07); border-color: #cdeedb; }
.card-stripe {
  height: 150px; display: flex; align-items: flex-end; padding: 12px;
  background: repeating-linear-gradient(135deg, var(--stripe-bg, #eef3ff) 0px, var(--stripe-bg, #eef3ff) 14px, #fff 14px, #fff 28px);
}
.card-stripe span { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 11px; color: var(--muted-2); }
.card-cover { height: 150px; overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-tree-image { margin-top: 24px; }
.gallery-tree-image img { width: 100%; border-radius: 14px; border: 1px solid var(--border); display: block; }

.post-cover { margin: 18px 0 0; }
.post-cover img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 14px; display: block; }
/* 표지 이미지를 안 쓰는 카드(호칭사전 등) — 카테고리 색상을 위쪽 얇은 띠로만 표시.
   카드에 이미 있는 data-cat 속성을 그대로 활용해서 별도 인라인 스타일 없이 매칭돼요 */
.card.no-cover { border-top: 4px solid var(--border); }
.card.no-cover .card-body { padding-top: 20px; }
.card.no-cover[data-cat="친가"] { border-top-color: var(--blue-fg); }
.card.no-cover[data-cat="외가"] { border-top-color: var(--green-fg); }
.card.no-cover[data-cat="처가"] { border-top-color: var(--purple-fg); }
.card.no-cover[data-cat="시가"] { border-top-color: var(--pink-fg); }
.card.no-cover[data-cat="사돈"] { border-top-color: var(--amber-fg); }

.beyond-limit { display: none; }
.show-more-btn {
  display: block;
  margin: 28px auto 0;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.show-more-btn:hover { border-color: var(--ink); }
.card-body { padding: 18px; }
.card-title { font-size: 16px; font-weight: 800; margin-top: 12px; line-height: 1.45; }
.card-desc { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.55; }
.card-date { font-size: 12px; color: var(--muted-2); margin-top: 14px; }
.card-chon { font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 14px; }

.more-card {
  cursor: pointer; border: 1px dashed #cdeedb; border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px;
  background: #f6fcf9; text-decoration: none; color: inherit;
}
.more-card:hover { background: #effaf4; }
.more-card .kicker { font-size: 13px; font-weight: 800; color: var(--green-fg); }
.more-card .headline3 { font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.more-card .cta-line { font-size: 13px; font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--ink); }

/* ---- tags ---- */
.tag { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; display: inline-block; }
.tag-blue { background: var(--blue-bg); color: var(--blue-fg); }
.tag-green { background: var(--green-bg); color: var(--green-fg); }
.tag-purple { background: var(--purple-bg); color: var(--purple-fg); }
.tag-pink { background: var(--pink-bg); color: var(--pink-fg); }
.tag-amber { background: var(--amber-bg); color: var(--amber-fg); }
.tag-slate { background: var(--slate-bg); color: var(--slate-fg); }

/* ---- filter chips ---- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  cursor: pointer; font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--muted);
}
.chip.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip.accent-active { border-color: var(--accent); background: var(--accent); color: #fff; }

/* ---- post list rows ---- */
.post-list { }
.post-row {
  cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 20px 4px;
  border-bottom: 1px solid var(--border-2); text-decoration: none; color: inherit;
}
.post-row:hover { background: var(--bg-soft); }
.post-row .title { font-size: 16px; font-weight: 700; flex: 1; color: var(--ink); }
.post-row .date { font-size: 13px; color: var(--muted-2); flex-shrink: 0; }

/* ---- CTA banner ---- */
.cta-banner { background: var(--ink); }
.cta-banner .inner {
  padding-top: 56px; padding-bottom: 56px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.cta-banner h3 { font-size: 22px; font-weight: 800; color: #fff; margin: 0; }
.cta-banner p { font-size: 14px; color: var(--muted-2); margin: 8px 0 0; }

/* ---- detail pages ---- */
.detail-main { padding-top: 44px; padding-bottom: 90px; }
.back-link {
  cursor: pointer; font-size: 14px; color: var(--muted); margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.back-link:hover { color: var(--accent); }

.detail-title { font-size: 30px; font-weight: 800; margin: 14px 0 0; letter-spacing: -0.02em; }
.chon-badge {
  display: inline-block; margin-top: 12px; background: var(--blue-bg); color: var(--blue-fg);
  font-weight: 800; font-size: 14px; padding: 7px 14px; border-radius: 999px;
}

.path-diagram {
  margin-top: 32px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 20px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
}
.path-node-wrap { display: flex; align-items: center; gap: 6px; }
.path-arrow { color: #c7cbd1; font-size: 18px; margin: 0 6px; }
.path-node { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; }
.path-circle {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  background: var(--slate-bg); color: var(--slate-fg);
}
.path-node.highlight .path-circle { outline: 2px solid currentColor; }
.path-label { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.path-node.highlight .path-label { font-weight: 800; }
.path-term-note { margin-top: 14px; font-size: 13.5px; color: var(--muted); text-align: center; }

.definition-text { margin-top: 32px; font-size: 16px; line-height: 1.9; color: var(--ink-2); white-space: pre-line; }
.example-box {
  margin-top: 18px; background: #fbfbfc; border-left: 3px solid #d9dee6; padding: 16px 18px;
  font-size: 14px; color: #565d68; line-height: 1.7; border-radius: 0 10px 10px 0; white-space: pre-line;
}

.related-block { margin-top: 38px; }
.related-heading { font-size: 14px; font-weight: 800; color: var(--muted); margin-bottom: 12px; }
.related-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.related-chip {
  cursor: pointer; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.related-chip:hover { border-color: #c7d6fb; color: var(--accent); }

/* ---- gallery detail tree ---- */
.gallery-desc { font-size: 15px; color: var(--muted); margin-top: 10px; line-height: 1.7; }
.gallery-tree {
  margin-top: 32px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 18px;
  padding: 36px 24px; display: flex; flex-direction: column; align-items: center;
}
.gen-row { display: flex; flex-direction: column; align-items: center; width: 100%; }
.gen-connector { width: 2px; height: 26px; background: #d9dee6; }
.gen-label { font-size: 12px; font-weight: 700; color: var(--muted-2); margin-bottom: 12px; }
.gen-members { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.member { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 96px; }
.member-circle {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 23px; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.member-name { font-size: 13px; font-weight: 700; text-align: center; line-height: 1.3; }
.member-role { font-size: 11px; color: var(--blue-fg); background: var(--blue-bg); padding: 2px 8px; border-radius: 999px; font-weight: 700; }

/* ---- 재사용 CTA 박스 (갤러리 상세/블로그 글에서 공용) ---- */
.cta-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--bg-soft); border-radius: 14px; padding: 18px 22px; margin-top: 10px;
}
.cta-strip p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---- post detail ---- */
.post-title { font-size: 28px; font-weight: 800; margin-top: 14px; line-height: 1.4; letter-spacing: -0.02em; }
.post-byline { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14px; }
.post-byline .author { font-weight: 700; }
.post-byline .dot { color: #d9dee6; }
.post-byline .date { font-size: 13px; color: var(--muted-2); }
.post-body { margin-top: 30px; display: flex; flex-direction: column; gap: 18px; }
.post-body p { font-size: 16px; line-height: 1.9; color: var(--ink-2); margin: 0; white-space: pre-line; }

.ref-box {
  cursor: pointer; margin-top: 28px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; text-decoration: none; color: inherit;
}
.ref-box:hover { border-color: #c7d6fb; }
.ref-box .label { font-size: 14px; font-weight: 700; color: var(--ink); }
.ref-box .go { color: var(--accent); font-weight: 700; }

.other-posts { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 24px; }
.other-posts .heading { font-size: 14px; font-weight: 800; color: var(--muted); margin-bottom: 12px; }
.other-post-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border-2);
  cursor: pointer; text-decoration: none; color: inherit;
}
.other-post-row:hover { background: var(--bg-soft); }
.other-post-row .title { font-size: 14px; font-weight: 600; flex: 1; color: var(--ink); }
.other-post-row .date { font-size: 12px; color: var(--muted-2); }

/* ---- empty state ---- */
.empty-state { text-align: center; padding: 60px 0; color: var(--muted-2); font-size: 14px; }

/* ---- footer ---- */
.blog-footer {
  margin-top: auto; border-top: 1px solid var(--border); padding: 28px 48px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.blog-footer span { font-size: 13px; color: var(--muted-2); }
.blog-footer .brand-mini { font-weight: 700; }
.footer-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 13px; color: var(--muted-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 640px) { .blog-footer { padding: 20px 20px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
