/*
Theme Name: Blog Layout (L5)
Theme URI: https://example.com
Author: Park
Description: 네이버 블로그처럼 읽히는 일반 블로그 테마 (L5). 메인은 블로그 이름 · 프로필 · 전체글 목록, 업체 정보는 글마다 "이 글의 광고 정보" 에서 넣습니다.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blog-layout
Design: blog (L5)
Tags: one-column, custom-menu, featured-images, translation-ready, blog
*/

/* ============================================================
   0. 색상 팔레트  —  서울본브릿지병원 카드뉴스 브랜드 오렌지 기반
   여기 값만 바꾸면 사이트 전체 색이 바뀝니다.
   ============================================================ */
:root {
  --bg: #ffffff;
  --paper: #f3f5f9;
  --ink: #1f2430;
  --ink-soft: #3f4656;
  --ink-mute: #5d6577;
  --rule: #dfe3ea;
  --rule-soft: #edf0f5;
  --accent: #2d5a9a;
  --accent-deep: #1f3f6e;
  --hl: #e3ebf6;
  --tag-bg: #e9eef6;
  --navy: #14294a;
}

/* ============================================================
   1. 기본
   ============================================================ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-deep); }
h1, h2, h3, h4 { font-family: "Noto Serif KR", serif; line-height: 1.4; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; left: 16px; top: 16px; z-index: 999;
  background: #fff; padding: 10px 16px; border: 1px solid var(--accent);
  width: auto; height: auto; clip: auto;
}

/* ============================================================
   2. 헤더
   ============================================================ */
.blog-header {
  border-bottom: 1px solid var(--rule);
  background: #fff;
  position: sticky; top: 0; z-index: 50;
}
.blog-header .inner {
  max-width: 1080px; margin: 0 auto;
  padding: 16px 24px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 20px;
}
.blog-header .logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.blog-header .logo .mk {
  width: 38px; height: 38px; border-radius: 10px;
  border: 2px solid var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: "Noto Serif KR", serif; font-weight: 700;
  font-size: 18px; color: var(--accent-deep); flex: none;
  overflow: hidden; background: #fff;
}
/* 사이트 아이콘 · 커스텀 로고를 넣었을 때 */
.blog-header .logo .mk.has-img {
  border-color: var(--rule);
  padding: 3px;
}
.blog-header .logo .mk.has-img.plain {
  border: 0; padding: 0; border-radius: 8px;
}
.blog-header .logo .mk img {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
}
.blog-header .logo .tx .n {
  font-family: "Noto Serif KR", serif;
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
}
.blog-header .logo .tx .s {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px; letter-spacing: 0.14em; color: var(--ink-mute);
}
.blog-header nav { display: flex; justify-content: center; }
/* 워드프레스 메뉴의 기본 불릿(•) 제거 */
.blog-header nav ul,
.blog-header nav .bb-menu {
  list-style: none !important;
  margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
  gap: 8px 22px; align-items: center;
}
.blog-header nav li {
  list-style: none !important;
  margin: 0; padding: 0;
}
.blog-header nav li::marker { content: ""; }
.blog-header nav a {
  display: inline-block;
  text-decoration: none; color: var(--ink-soft);
  font-size: 14.5px; font-weight: 500; padding: 4px 0;
  border-bottom: 2px solid transparent; transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
  white-space: nowrap;
}
.blog-header nav a:hover { color: var(--accent-deep); border-bottom-color: var(--accent); }
/* 현재 페이지 표시 */
.blog-header nav .current-menu-item > a { color: var(--accent-deep); border-bottom-color: var(--accent); }
.blog-header .cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-deep); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 14.5px;
  white-space: nowrap; transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}
.blog-header .cta:hover { background: var(--accent); transform: translateY(-1px); }
@media (max-width: 860px) {
  .blog-header { position: static; }
  .blog-header .inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px; padding: 14px 18px;
  }
  .blog-header nav { grid-column: 1 / -1; order: 3; justify-content: flex-start; }
  .blog-header nav ul { gap: 6px 16px; }
  .blog-header .logo { gap: 8px; min-width: 0; }
  .blog-header .logo .tx { min-width: 0; }
  .blog-header .logo .tx .n { font-size: 15.5px; white-space: nowrap; }
  .blog-header .logo .tx .s { font-size: 9px; letter-spacing: 0.1em; white-space: nowrap; }
  .blog-header .cta { font-size: 13px; padding: 9px 15px; }
}
@media (max-width: 480px) {
  .blog-header .logo .mk { width: 32px; height: 32px; font-size: 15px; }
  .blog-header .logo .tx .s { display: none; }   /* 부제는 숨겨 두 줄 방지 */
  .blog-header .logo .tx .n { font-size: 15px; }
  .blog-header .cta { font-size: 12.5px; padding: 8px 13px; }
}

/* ============================================================
   3. 카드 그리드 (헤더 바로 아래)
   ============================================================ */
/* 카드 크기 — 카드 폭에 따라 .svc-size-* 가 자동으로 정해집니다
   (기본값을 :root 에 두어야 자식 요소에서 덮이지 않습니다) */
:root {
  --card-pad: 11px;
  --card-title: 13.5px;
  --card-cat: 9.5px;
  --card-more: 11.5px;
  --card-radius: 10px;
  --grid-gap: 14px;
  --head-h2: 20px;
  --head-p: 13.5px;
  --band-pad: 30px;
}
.svc-size-lg { --card-pad: 14px; --card-title: 15px;   --card-cat: 10.5px; --card-more: 12.5px; --card-radius: 12px; --grid-gap: 18px; --head-h2: 22px; --head-p: 14.5px; --band-pad: 36px; }
.svc-size-md { --card-pad: 11px; --card-title: 13.5px; --card-cat: 9.5px;  --card-more: 11.5px; --card-radius: 10px; --grid-gap: 14px; --head-h2: 20px; --head-p: 13.5px; --band-pad: 30px; }
.svc-size-sm { --card-pad: 9px;  --card-title: 12.5px; --card-cat: 9px;    --card-more: 10.5px; --card-radius: 8px;  --grid-gap: 11px; --head-h2: 18px; --head-p: 12.5px; --band-pad: 24px; }

/* 바깥 틀은 본문(.wrap)과 같은 1080px — 좌우 시작선을 본문과 맞춥니다.
   안쪽 폭만 --band-max 로 좁혀 카드를 작게 만듭니다(왼쪽 정렬 유지). */
.grid-band { max-width: 1080px; margin: 0 auto; padding: var(--band-pad) 24px 0; }
.grid-band .post-grid-wrap { margin: 0; max-width: var(--band-max, 880px); }
.post-grid-wrap { margin: 48px 0 8px; }
.post-grid-wrap .grid-head { margin-bottom: calc(var(--grid-gap) + 2px); }
.post-grid-wrap .grid-head .k {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px; letter-spacing: 0.16em;
  color: var(--accent); font-weight: 500; margin-bottom: 6px;
}
.post-grid-wrap .grid-head h2 {
  font-size: var(--head-h2); font-weight: 700; margin: 0 0 5px;
}
.post-grid-wrap .grid-head p { font-size: var(--head-p); color: var(--ink-soft); margin: 0; }
.post-grid { display: grid; grid-template-columns: repeat(var(--nsc-cols, 3), minmax(0, 1fr)); gap: var(--grid-gap); }
.post-grid .pcard {
  display: block; border: 1px solid var(--rule);
  border-radius: var(--card-radius); overflow: hidden; background: #fff;
  text-decoration: none; color: inherit; transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}
.post-grid .pcard:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);   /* 팔레트 교체에 안 걸리도록 무채색 */
  transform: translateY(-2px);
}
.post-grid .pcard .thumb { aspect-ratio: var(--card-ratio, 4/3); overflow: hidden; background: var(--rule-soft); }
.post-grid .pcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-grid .pcard .info { padding: var(--card-pad) var(--card-pad) calc(var(--card-pad) + 2px); }
.post-grid .pcard .info .cat {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--card-cat); letter-spacing: 0.12em; color: var(--accent); margin-bottom: 5px;
}
.post-grid .pcard .info h3 { font-size: var(--card-title); font-weight: 600; line-height: 1.45; margin: 0 0 6px; }
.post-grid .pcard .info .more { font-size: var(--card-more); color: var(--ink-mute); }
@media (max-width: 920px) { .post-grid { grid-template-columns: repeat(var(--cols-t, 3), minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .post-grid { grid-template-columns: repeat(var(--cols-m, 2), minmax(0, 1fr)); }
  .post-grid .pcard .thumb { aspect-ratio: var(--card-ratio-m, 4/3); }
  .post-grid .pcard .info h3 { font-size: calc(var(--card-title) - 0.5px); }
}

/* ---- 글 목록: 썸네일 없는 텍스트 카드 (.no-thumb) ----
   특성 이미지를 지정하지 않은 글이 많을 때 대체 이미지 한 장이
   모든 카드에 반복되는 것을 피하려고 이미지를 아예 뺀 형태입니다.
   기본값이 이쪽이고, 글마다 특성 이미지를 넣은 뒤에
   사용자 정의하기 → 카드 그리드 → "글 목록에 썸네일 표시" 로 켭니다.
   메인 페이지의 카드 그리드에는 이 클래스가 붙지 않습니다. */
.post-grid.no-thumb .pcard { display: flex; }
.post-grid.no-thumb .pcard .info {
  display: flex; flex-direction: column; width: 100%;
  padding: calc(var(--card-pad) + 6px) calc(var(--card-pad) + 4px);
}
.post-grid.no-thumb .pcard .info h3 {
  font-size: calc(var(--card-title) + 1.5px); margin: 0 0 12px;
}
.post-grid.no-thumb .pcard .info .more { margin-top: auto; }
@media (max-width: 560px) {
  /* 글자만 있는 카드는 모바일에서 2열이면 너무 좁습니다 */
  .post-grid.no-thumb { grid-template-columns: minmax(0, 1fr); }
  .post-grid.no-thumb .pcard .info h3 { font-size: calc(var(--card-title) + 1px); }
}

/* ---- 기기별 숨기기 (사용자 정의하기 → 카드별 체크박스) ----
   모바일  : 560px 이하
   태블릿  : 561 ~ 920px
   PC      : 921px 이상
   ※ 숨긴 카드는 자리를 차지하지 않고 뒤 카드가 앞으로 당겨집니다.        */
@media (max-width: 560px) {
  .bb-hide-mobile { display: none !important; }
}
@media (min-width: 561px) and (max-width: 920px) {
  .bb-hide-tablet { display: none !important; }
}
@media (min-width: 921px) {
  .bb-hide-desktop { display: none !important; }
}
/* 확인 방법: 사용자 정의하기 화면 왼쪽 아래 기기 아이콘(🖥 💻 📱)을 눌러
   미리보기 크기를 바꾸면 숨김 설정이 그대로 반영됩니다. */

/* ============================================================
   4. 본문 레이아웃 (본문 + 우측 사이드바)
   ============================================================ */
.wrap {
  max-width: 1080px; margin: 0 auto; padding: 40px 24px 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start;
}
@media (max-width: 920px) { .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

.breadcrumb {
  font-size: 12.5px; color: var(--ink-mute);
  margin-bottom: 16px; font-family: "IBM Plex Mono", monospace; letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--ink-mute); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-deep); }

.post-title {
  font-size: 34px; font-weight: 700; line-height: 1.35;
  margin: 0 0 14px; letter-spacing: -0.02em;
}
.post-title .em { color: var(--accent-deep); }
@media (max-width: 560px) { .post-title { font-size: 26px; } }

.post-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12.5px; color: var(--ink-mute);
  font-family: "IBM Plex Mono", monospace;
  padding-bottom: 20px; border-bottom: 1px solid var(--rule); margin-bottom: 26px;
}

/* 통이미지 묶음 — H1 바로 아래, 여러 장을 이어 붙여 보여줍니다 (references/image-stack.md) */
.img-stack {
  margin: 0 0 34px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  font-size: 0;                 /* 이미지 사이 공백 제거 */
}
.img-stack img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto !important;   /* 본문 이미지 비율 설정에 잘리지 않게 */
  object-fit: fill;
}
.img-stack figcaption {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-mute);
  text-align: center;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--rule-soft);
  background: var(--rule-soft);
}
@media (max-width: 560px) {
  .img-stack { border-radius: 10px; }
}

.cover { margin: 0 0 30px; }
.cover img { width: 100%; border-radius: 12px; border: 1px solid var(--rule); display: block; }
.cover figcaption { font-size: 12.5px; color: var(--ink-mute); margin-top: 8px; text-align: center; }

/* 목차 */
.toc {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 12px; padding: 22px 24px; margin: 0 0 36px;
}
.toc .k {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: 0.16em; color: var(--accent); margin-bottom: 10px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { font-size: 14.5px; margin-bottom: 6px; }
.toc li:last-child { margin-bottom: 0; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--accent-deep); text-decoration: underline; }

/* 본문 섹션 */
.sec { margin: 0 0 46px; scroll-margin-top: 90px; }
.sec > .k {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: 0.16em; color: var(--accent); margin-bottom: 8px;
}
.sec h2 {
  font-size: 24px; font-weight: 700; margin: 0 0 16px;
  padding-bottom: 12px; border-bottom: 2px solid var(--rule);
}
.sec h3 { font-size: 18px; font-weight: 600; margin: 26px 0 10px; }
.sec p { margin: 0 0 16px; color: var(--ink-soft); font-size: 15.5px; }
.sec img { border-radius: 12px; border: 1px solid var(--rule); margin: 8px 0 20px; display: block; }
.sec figure { margin: 8px 0 24px; }
/* 본문 이미지 비율 — 사용자 정의하기 → 메인 페이지 → ① 에서 조절 (기본 1:1 = 원본 그대로) */
.sec figure img,
.cover img { aspect-ratio: var(--fig-ratio, auto); object-fit: cover; }
@media (max-width: 560px) {
  .sec figure img, .cover img { aspect-ratio: var(--fig-ratio-m, var(--fig-ratio, auto)); }
}
/* 원본 비율 그대로 보이기 — 세로로 긴 가격표·카드뉴스가 잘리지 않게 합니다.
   섹션별로 사용자 정의하기 → 메인 페이지 → 각 섹션 → "이미지 전체 보이기" 로 켭니다. */
.sec figure.is-fullimg img { aspect-ratio: auto !important; object-fit: contain; height: auto; }
.sec figcaption { font-size: 12.5px; color: var(--ink-mute); margin-top: 8px; }
.hl { background: linear-gradient(transparent 58%, var(--hl) 58%); font-weight: 600; color: var(--ink); }

/* 정의형 표(카드뉴스 스타일 행) */
.deflist { margin: 0 0 20px; }
.deflist .row {
  display: grid; grid-template-columns: 168px minmax(0, 1fr);
  border: 1px solid var(--rule); border-radius: 10px;
  overflow: hidden; margin-bottom: 10px; background: #fff;
}
/* 용어 칸은 h3 로 나갑니다(문서 구조용). .sec h3 의 여백·장식은 여기서 지웁니다. */
.deflist .row .t,
.sec .deflist .row h3.t {
  background: var(--accent-deep); color: #fff;
  font-weight: 700; font-size: 15px;
  /* 용어 칸은 오른쪽 설명 높이에 맞춰 늘어납니다.
     flex 가운데정렬을 유지해야 글자가 위로 붙지 않습니다.
     (h3 리셋은 margin 만 지웁니다 — display·padding 을 덮어쓰면 정렬이 깨집니다) */
  display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 18px 14px; text-align: center; line-height: 1.5;
}
.sec .deflist .row h3.t::before { content: none; }
.deflist .row .d { padding: 16px 20px; font-size: 15px; color: var(--ink-soft); }
@media (max-width: 560px) {
  .deflist .row { grid-template-columns: minmax(0, 1fr); }
  .deflist .row .t { justify-content: flex-start; padding: 12px 16px; }
}

/* 체크 목록 */
.checks { list-style: none; margin: 0 0 20px; padding: 0; }
.checks li {
  position: relative; padding: 10px 0 10px 34px;
  font-size: 15.5px; color: var(--ink-soft);
  border-bottom: 1px dashed var(--rule-soft);
}
.checks li:last-child { border-bottom: 0; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-deep); color: #fff;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.checks li b { color: var(--ink); }

/* 강조 밴드 */
.callout {
  background: var(--paper); border-left: 4px solid var(--accent-deep);
  border-radius: 0 10px 10px 0; padding: 20px 24px; margin: 0 0 24px;
}
.callout p { margin: 0; font-size: 15.5px; color: var(--ink-soft); }
.callout p + p { margin-top: 10px; }

/* 글 맨 아래 고지 한 줄 — 값이 있을 때만 출력된다 (경고 박스가 아니라 조용한 한 줄) */
.post-notice {
  margin: 28px 0 0; padding: 14px 0 0;
  border-top: 1px solid var(--rule);
  font-size: 12.5px; line-height: 1.7; color: var(--ink-mute);
}

/* 주의 박스 */
.notice {
  border: 1px solid var(--rule); border-radius: 10px;
  padding: 16px 20px; font-size: 13.5px; color: var(--ink-mute);
  background: #fff; margin: 0 0 24px; line-height: 1.75;
}

/* ============================================================
   5. 네이버 플레이스 카드
   ============================================================ */
.naver-card { margin: 28px 0 8px; }
.naver-card a {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center; gap: 18px;
  background: #fff; border: 1px solid var(--rule);
  border-radius: 10px; padding: 18px 22px;
  text-decoration: none; color: inherit; transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}
.naver-card a:hover {
  border-color: #03c75a; box-shadow: 0 6px 18px rgba(3, 199, 90, 0.10);
  transform: translateY(-1px);
}
.naver-card .badge {
  width: 56px; height: 56px; border-radius: 14px;
  background: #03c75a; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 28px;
}
.naver-card .body .k {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: 0.16em; color: #03a04a; font-weight: 500; margin-bottom: 4px;
}
.naver-card .body .h { font-family: "Noto Serif KR", serif; font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.naver-card .body .p { font-size: 13px; color: var(--ink-soft); }
.naver-card .arrow {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center; transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}
.naver-card a:hover .arrow { background: #03c75a; border-color: #03c75a; color: #fff; }
@media (max-width: 560px) {
  .naver-card a { grid-template-columns: 44px minmax(0, 1fr); }
  .naver-card .badge { width: 44px; height: 44px; font-size: 22px; }
  .naver-card .arrow { display: none; }
}

/* ============================================================
   6. 태그
   ============================================================ */
.tagbar { margin: 36px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.tagbar .tg {
  background: var(--tag-bg); color: var(--ink-soft);
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px;
  text-decoration: none; transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}
.tagbar .tg:hover { background: var(--accent-deep); color: #fff; }

/* ============================================================
   7. 사이드바
   ============================================================ */
.side { position: sticky; top: 96px; }
@media (max-width: 920px) { .side { position: static; } }
.side-box {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 12px; padding: 22px 22px 24px; margin-bottom: 18px;
}
.side-h {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: 0.16em; color: var(--accent); margin-bottom: 12px;
}
.side-box h4 { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.side-box p { font-size: 14px; color: var(--ink-soft); margin: 0 0 12px; }
.side-info { list-style: none; margin: 0; padding: 0; }
.side-info li {
  font-size: 13.5px; color: var(--ink-soft);
  padding: 8px 0; border-bottom: 1px dashed var(--rule);
  display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px;
}
.side-info li:last-child { border-bottom: 0; }
.side-info li .lb { color: var(--ink-mute); font-size: 12.5px; }
.side-tel {
  display: block; text-align: center; background: var(--accent-deep); color: #fff;
  padding: 14px 16px; border-radius: 10px; text-decoration: none;
  font-weight: 700; font-size: 19px; letter-spacing: 0.02em; transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}
.side-tel:hover { background: var(--accent); }
.side-tel .s { display: block; font-size: 11.5px; font-weight: 400; opacity: 0.9; letter-spacing: 0.1em; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 9px 0; border-bottom: 1px dashed var(--rule); }
.side-list li:last-child { border-bottom: 0; }
.side-list a { font-size: 14px; color: var(--ink-soft); text-decoration: none; line-height: 1.5; }
.side-list a:hover { color: var(--accent-deep); }

/* ============================================================
   8. 글 목록 / 단일 글
   ============================================================ */
.page-head { max-width: 1080px; margin: 0 auto; padding: 40px 24px 0; }
.page-head .k {
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px;
  letter-spacing: 0.16em; color: var(--accent); margin-bottom: 8px;
}
.page-head h1 { font-size: 30px; margin: 0 0 8px; }
.page-head p { color: var(--ink-soft); font-size: 15px; margin: 0; }

.entry-content { font-size: 15.5px; color: var(--ink-soft); }
.entry-content h2 {
  font-size: 23px; color: var(--ink); margin: 38px 0 14px;
  padding-bottom: 10px; border-bottom: 2px solid var(--rule);
}
.entry-content h3 { font-size: 18px; color: var(--ink); margin: 26px 0 10px; }
.entry-content p { margin: 0 0 16px; }
.entry-content ul, .entry-content ol { margin: 0 0 18px; padding-left: 22px; }
.entry-content li { margin-bottom: 6px; }
.entry-content img { border-radius: 12px; border: 1px solid var(--rule); }
.entry-content blockquote {
  margin: 0 0 20px; padding: 16px 22px;
  background: var(--paper); border-left: 4px solid var(--accent-deep);
  border-radius: 0 10px 10px 0;
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14.5px; }
.entry-content th, .entry-content td { border: 1px solid var(--rule); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--paper); }

.pager {
  display: flex; justify-content: space-between; gap: 12px;
  margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--rule);
  font-size: 14px;
}
.pager a { text-decoration: none; color: var(--ink-soft); }
.pager a:hover { color: var(--accent-deep); }

/* ============================================================
   9. CTA 밴드
   ============================================================ */
.cta-band {
  background: var(--paper); border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule); margin-top: 56px; padding: 46px 24px;
}
.cta-band .in { max-width: 1080px; margin: 0 auto; text-align: center; }
.cta-band .k {
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px;
  letter-spacing: 0.16em; color: var(--accent); margin-bottom: 10px;
}
.cta-band h2 { font-size: 26px; margin: 0 0 12px; }
.cta-band p { color: var(--ink-soft); font-size: 15px; margin: 0 0 22px; }
/* CTA 버튼 3종 (전화 / 온라인 상담 / 빠른 예약) */
.cta-band .cta-btns {
  display: flex; justify-content: center; align-items: stretch;
  flex-wrap: wrap; gap: 12px;
}
.cta-band .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--accent-deep); color: #fff;
  padding: 15px 28px; border-radius: 999px;
  border: 2px solid var(--accent-deep);
  text-decoration: none; font-weight: 700; font-size: 17px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease; min-width: 230px;
}
.cta-band .btn:hover {
  background: var(--accent); border-color: var(--accent);
  transform: translateY(-2px); box-shadow: 0 8px 18px rgba(176, 69, 26, 0.18);
}
.cta-band .btn .ic { font-size: 20px; line-height: 1; flex: none; display: inline-flex; }
.cta-band .btn .ic svg { width: 20px; height: 20px; display: block; }
.cta-band .btn .tx {
  display: flex; flex-direction: column; align-items: center;
  line-height: 1.3; text-align: center;
}
.cta-band .btn .tx em {
  font-style: normal; font-weight: 400; font-size: 12.5px;
  opacity: 0.86; letter-spacing: 0.01em; margin-top: 2px;
}
/* 외곽선 버튼 */
.cta-band .btn.line {
  background: #fff; color: var(--accent-deep);
  border-color: var(--rule);
}
.cta-band .btn.line:hover {
  background: #fff; color: var(--accent-deep);
  border-color: var(--accent-deep);
  box-shadow: 0 8px 18px rgba(176, 69, 26, 0.12);
}
.cta-band .cta-note {
  font-size: 12.5px; color: var(--ink-mute);
  margin: 18px 0 0;
}
@media (max-width: 720px) {
  .cta-band .cta-btns { flex-direction: column; align-items: stretch; }
  .cta-band .btn { min-width: 0; justify-content: center; padding: 14px 20px; }
  .cta-band .btn .tx { align-items: center; text-align: center; }
}

/* ============================================================
   10. 푸터
   ============================================================ */
.blog-footer {
  background: var(--paper); border-top: 1px solid var(--rule);
  margin-top: 0; padding: 44px 24px 40px;
}
.blog-footer .in {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px;
}
/* "바로가기" 열을 끄면 두 칸으로 (사용자 정의하기 → 푸터) */
.blog-footer .in.cols-2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; }
@media (max-width: 780px) { .blog-footer .in { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.blog-footer .fh {
  font-family: "Noto Serif KR", serif; font-weight: 700; font-size: 16px; margin-bottom: 12px;
}
.blog-footer p, .blog-footer li { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 6px; }
.blog-footer ul { list-style: none; margin: 0; padding: 0; }
.blog-footer a { color: var(--ink-soft); text-decoration: none; }
.blog-footer a:hover { color: var(--accent-deep); }
.blog-footer .copy {
  max-width: 1080px; margin: 28px auto 0; padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px; color: var(--ink-mute); line-height: 1.8;
}

/* ============================================================
   11. 퀵메뉴 (반응형 플로팅 메뉴)
   표시 방식은 nav 클래스로 결정:
     .bb-quick--responsive  PC 세로 + 모바일(≤768px) 하단 (기본)
     .bb-quick--right       항상 오른쪽 세로
     .bb-quick--bottom      항상 하단 가로
   색상은 인라인 변수(--qm-color / --qm-bg)로 제어됩니다.
   ============================================================ */

/* --- 기본 모양 = 세로(우측). 모든 모드가 여기서 시작 --- */
.bb-quick {
  position: fixed;
  right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 60;
  display: flex; flex-direction: column;
  background: var(--qm-bg, #fff);
  border: 1px solid #ececec;
  border-radius: 14px;
  overflow: hidden;
}
.bb-quick a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  min-width: 66px; padding: 12px 14px;
  text-decoration: none;
  color: var(--qm-color, #333);
  font-size: 11.5px; font-weight: 500; letter-spacing: -0.01em;
  border-top: 1px solid #f2f2f2;
  transition: background 0.15s ease;
}
.bb-quick a:first-child { border-top: 0; }
.bb-quick a:hover { background: #f5f5f5; }
.bb-quick .ic { display: inline-flex; }
.bb-quick svg { width: 23px; height: 23px; display: block; }
.bb-quick .lb { line-height: 1.1; }

/* --- 하단 가로바 모양 ---
   (1) '하단만' 모드는 항상, (2) '둘 다' 모드는 768px 이하에서 적용 --- */
.bb-quick--bottom {
  right: 0; left: 0; bottom: 0; top: auto;
  transform: none;
  width: 100%;
  flex-direction: row;
  border: 0; border-top: 1px solid #eaeaea;
  border-radius: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.bb-quick--bottom a {
  flex: 1 1 0; min-width: 0;
  height: 64px; padding: 8px 4px;
  border-top: 0; border-left: 1px solid #f2f2f2;
  font-size: 11px;
}
.bb-quick--bottom a:first-child { border-left: 0; }
.bb-quick--bottom svg { width: 22px; height: 22px; }

@media (max-width: 768px) {
  .bb-quick--responsive {
    right: 0; left: 0; bottom: 0; top: auto;
    transform: none;
    width: 100%;
    flex-direction: row;
    border: 0; border-top: 1px solid #eaeaea;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bb-quick--responsive a {
    flex: 1 1 0; min-width: 0;
    height: 64px; padding: 8px 4px;
    border-top: 0; border-left: 1px solid #f2f2f2;
    font-size: 11px;
  }
  .bb-quick--responsive a:first-child { border-left: 0; }
  .bb-quick--responsive svg { width: 22px; height: 22px; }
}

/* --- 하단바가 콘텐츠를 가리지 않도록 body 하단 여백 --- */
body.bb-qm-bottom { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
@media (max-width: 768px) {
  body.bb-qm-responsive { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}


/* ============================================================
   모바일 가로 넘침 방지 (스타터 3.4.1 · lessons.md 43번)
   iOS Safari 는 word-break:keep-all 한글 문장의 최소 폭을 크게 잡는다.
   그리드 칸이 1fr 이면 칸이 화면보다 넓어지고, 사파리가 페이지 전체를
   축소해 하단 배너·푸터·퀵메뉴가 화면 왼쪽 반만 차지한다.
   ★ 그리드 칸은 항상 minmax(0, Nfr) 로 쓴다. 아래 블록은 지우지 않는다.
   ============================================================ */
html, body { max-width: 100%; overflow-x: clip; }
.wrap > *, .main, .side, .side-box, .sec, .deflist .row > *, .naver-card a > *, .side-info li > *,
.blog-footer .in > *, .post-grid > *, .nsc-track > * { min-width: 0; }
.main, .side, .sec, .side-box, .callout, .faq-item, .tagbar { overflow-wrap: anywhere; }
@media (max-width: 920px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .tagbar { display: flex; flex-wrap: wrap; }
}


/* ============================================================
   스타터 4.0 — 라벨 한글화 · 접근성 기본값 (11기 · lessons 44~46번)
   ------------------------------------------------------------
   · 작은 라벨(.k · 카드 .cat)은 한글로 쓴다. 영문 고정폭 서체 + 넓은 자간은
     요즘 AI 생성 사이트의 전형적인 신호이고, 한글에 걸면 글자가 흩어져 보인다.
   · 포커스 테두리 · 움직임 줄이기 · 제목 줄바꿈은 레이아웃과 상관없이 늘 켠다.
   ============================================================ */
.sec > .k, .toc .k, .cta-band .k, .page-head .k, .post-grid-wrap .grid-head .k,
.side-box .k, .post-grid .pcard .info .cat, .breadcrumb, .post-meta {
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  letter-spacing: 0.01em;
}
.sec > .k, .toc .k, .cta-band .k, .page-head .k, .post-grid-wrap .grid-head .k, .side-box .k {
  font-size: 12.5px; font-weight: 700;
}
.post-grid .pcard .info .cat { font-weight: 700; font-size: calc(var(--card-cat) + 1px); }
/* 작은 라벨 글자는 --accent 가 아니라 --accent-deep — 밝은 브랜드색은 흰 바탕에서 4.5:1 이 안 나온다 */
.sec > .k, .toc .k, .page-head .k, .post-grid-wrap .grid-head .k, .post-grid .pcard .info .cat { color: var(--accent-deep); }
.side-tel .s { letter-spacing: 0; }

h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--point, var(--accent));
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link:focus { position: fixed; left: 12px; top: 12px; z-index: 1000; clip: auto; width: auto; height: auto;
  padding: 10px 16px; background: #fff; color: var(--ink); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.18); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ===== L5 · 블로그형 (blog) 오버레이 ===== */
/* ============================================================
   L5 · 블로그형 (blog) — 오버레이
   스타터 style.css 맨 뒤에 이어 붙인다 (L3 처럼 덧씌우는 방식).
   네이버 블로그처럼 읽히는 구조: 커버 배너 → 왼쪽 프로필 사이드바 + 오른쪽 글 목록,
   글 화면은 가운데 좁은 본문. 네이버 고유 색 · 로고 · 문구는 쓰지 않는다.

   ★ 팔레트를 바꿀 때 :root 의 --accent / --accent-deep 과 아래 --bl-* 를 함께 본다.
   ★ 그리드는 전부 minmax(0, …) — 맨 1fr 금지 (SKILL.md "모바일 가로 넘침")
   ============================================================ */

:root {
  --bl-bg: #f4f2ee;          /* 페이지 바탕 — 따뜻한 중립. 흰 상자가 떠 보이게 */
  --bl-box: #ffffff;
  --bl-line: #e4e0d8;        /* 상자 테두리 */
  --bl-line-soft: #ece8e1;   /* 목록 구분선 */
  --bl-chip: #f1eee8;        /* 태그 · 카테고리 칩 */
  --bl-quote: #f5f3ef;       /* 정답 블록 · 인용 배경 */
  --bl-text: #2a2a2a;
  --bl-text-2: #4a4a4a;
  --bl-mute: #666666;        /* 흰 바탕 5.7:1 */
  --bl-radius: 8px;
  --bl-side-w: 280px;
  --bl-max: 1080px;
}

/* ---------- 0. 바탕 · 글꼴 ---------- */
body.layout-blog {
  background: var(--bl-bg);
  color: var(--bl-text);
}
.layout-blog h1, .layout-blog h2, .layout-blog h3, .layout-blog h4 {
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  letter-spacing: -0.02em;
}
.layout-blog :focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.layout-blog .screen-reader-text { position: absolute !important; }

/* ---------- 1. 맨 위 바 ---------- */
.layout-blog .blog-header.bl-top {
  background: #fff;
  border-bottom: 1px solid var(--bl-line);
  box-shadow: none;
  position: sticky; top: 0; z-index: 50;
}
.layout-blog .blog-header.bl-top .inner { max-width: var(--bl-max); padding-top: 0; padding-bottom: 0; min-height: 60px; }
.layout-blog .blog-header .logo .tx .n { font-family: "Noto Sans KR", sans-serif; font-size: 16px; font-weight: 700; }
.layout-blog .blog-header .logo .tx .s { font-family: "Noto Sans KR", sans-serif; letter-spacing: 0; text-transform: none; font-size: 11.5px; color: var(--bl-mute); }
.layout-blog .blog-header nav a { font-size: 14px; }

/* ---------- 2. 커버 배너 ---------- */
.bl-cover {
  background-color: var(--accent-deep);
  background-image: var(--bl-cover-img, none);
  background-size: cover; background-position: center;
  color: #fff;
  position: relative;
}
.bl-cover.has-img::before {           /* 사진 위 글자가 읽히도록 어둡게 */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.30), rgba(0,0,0,.50));
}
.bl-cover__in {
  position: relative;
  max-width: var(--bl-max); margin: 0 auto;
  padding: 56px 24px 52px;
  display: flex; flex-direction: column; gap: 10px;
}
.bl-cover__eyebrow { margin: 0; font-size: 13px; letter-spacing: 0.06em; opacity: .88; }
.bl-cover .bl-cover__title {
  margin: 0;
  font-family: "Noto Serif KR", serif;
  font-size: 38px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em;
  color: #fff;
}
.bl-cover__sub { margin: 0; font-size: 15px; opacity: .92; max-width: 640px; line-height: 1.7; }

/* ---------- 3. 2단 틀 — 왼쪽 프로필, 오른쪽 목록 ---------- */
.bl-wrap {
  max-width: var(--bl-max); margin: 0 auto;
  padding: 28px 24px 72px;
  display: grid;
  grid-template-columns: var(--bl-side-w) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.bl-wrap > * { min-width: 0; }
.bl-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bl-main { min-width: 0; }

/* 공통 상자 */
.bl-box {
  background: var(--bl-box);
  border: 1px solid var(--bl-line);
  border-radius: var(--bl-radius);
  padding: 18px 20px;
}
.bl-box__h { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--bl-mute); }

/* 버튼 */
.bl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid #cfc9be; border-radius: 6px;
  background: #fff; color: var(--bl-text);
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.bl-btn:hover { border-color: var(--bl-text-2); color: var(--bl-text); }
.bl-btn--solid { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.bl-btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.bl-btn--round { border-radius: 24px; min-height: 48px; padding: 0 22px; }

/* ---------- 4. 프로필 ---------- */
.bl-profile {
  padding: 24px 20px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
}
.bl-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; display: block; flex: 0 0 auto;
  background: #d9d4cb;
}
.bl-avatar.is-text {
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: var(--accent-deep);
  font-size: 34px; font-weight: 700;
}
.bl-avatar--s { width: 36px; height: 36px; }
.bl-avatar--s.is-text { font-size: 15px; }
.bl-avatar--m { width: 64px; height: 64px; }
.bl-avatar--m.is-text { font-size: 24px; }
.bl-profile__tx { display: flex; flex-direction: column; gap: 2px; }
.bl-profile__name { margin: 6px 0 0; font-size: 16px; font-weight: 700; }
.bl-profile__role { margin: 0; font-size: 13px; color: var(--bl-mute); line-height: 1.6; }
.bl-profile__intro { margin: 2px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--bl-text-2); }
.bl-profile__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 6px; }
.bl-profile__btns .bl-btn { padding: 0 8px; }
.bl-profile__btns .bl-btn:only-child { grid-column: 1 / -1; }

/* ---------- 5. 카테고리 · 인기 글 · 태그 ---------- */
.bl-cats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bl-cats a {
  display: block; padding: 5px 0;
  font-size: 14px; color: var(--bl-text); text-decoration: none; line-height: 1.5;
}
.bl-cats a:hover { color: var(--accent-deep); }
.bl-cats .is-all a { font-weight: 700; }
.bl-cats .is-child a { padding-left: 14px; position: relative; color: var(--bl-text-2); }
.bl-cats .is-child a::before { content: "ㄴ"; position: absolute; left: 0; color: #9a9389; font-size: 12px; }
.bl-cats .is-current a { color: var(--accent-deep); font-weight: 700; }
.bl-cats .n { color: var(--bl-mute); font-weight: 400; font-size: 12.5px; }

.bl-pop ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.bl-pop li { font-size: 13.5px; line-height: 1.55; color: var(--bl-mute); }
.bl-pop a { color: var(--bl-text); text-decoration: none; }
.bl-pop a:hover { color: var(--accent-deep); text-decoration: underline; }

.bl-tags__list, .bl-post__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-tags__list a, .bl-post__tags a {
  padding: 5px 11px; background: var(--bl-chip); border-radius: 14px;
  font-size: 12.5px; color: var(--bl-text-2); text-decoration: none;
}
.bl-tags__list a:hover, .bl-post__tags a:hover { background: #e6e1d8; color: var(--bl-text); }
.bl-widgets .side-box { background: #fff; border: 1px solid var(--bl-line); border-radius: var(--bl-radius); }

/* ---------- 6. 글 목록 ---------- */
.bl-list {
  background: var(--bl-box);
  border: 1px solid var(--bl-line);
  border-radius: var(--bl-radius);
}
.bl-list__head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 28px; border-bottom: 1px solid var(--bl-line-soft);
}
.bl-list .bl-list__title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.4; }
.bl-list__title .n { margin-left: 4px; font-size: 13.5px; font-weight: 400; color: var(--bl-mute); }
.bl-list__desc { padding: 14px 28px 0; font-size: 14px; color: var(--bl-text-2); }
.bl-list__desc p { margin: 0 0 6px; }

.bl-view { display: flex; gap: 6px; }
.bl-view__btn {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 0 11px;
  border: 1px solid #cfc9be; border-radius: 4px; background: #fff;
  font: inherit; font-size: 13px; color: var(--bl-text-2); cursor: pointer;
}
.bl-view__btn[aria-pressed="true"] { background: var(--bl-text); border-color: var(--bl-text); color: #fff; }
.bl-view__btn svg { width: 15px; height: 15px; }

/* 목록형 */
.bl-item { border-bottom: 1px solid var(--bl-line-soft); }
.bl-item__link {
  display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 20px; align-items: start;
  padding: 24px 28px; color: inherit; text-decoration: none;
}
.bl-item.no-thumb .bl-item__link { grid-template-columns: minmax(0, 1fr); }
.bl-item__link:hover .bl-item__title { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.bl-item__tx { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.bl-item__cat { font-size: 12px; font-weight: 500; color: var(--accent-deep); }
.bl-items .bl-item__title {
  margin: 0; font-size: 18px; font-weight: 700; line-height: 1.45; color: var(--bl-text);
}
.bl-item__ex {
  margin: 0; font-size: 14px; line-height: 1.7; color: #555;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bl-item__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--bl-mute); }
.bl-item__thumb { width: 120px; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; background: var(--bl-chip); }
.bl-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 앨범형 */
.bl-items.is-album {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px;
  padding: 24px 28px;
}
.bl-items.is-album .bl-item { border-bottom: 0; }
.bl-items.is-album .bl-item__link { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0; }
.bl-items.is-album .bl-item__thumb { order: -1; width: 100%; }
.bl-items.is-album .bl-item__ex { display: none; }
.bl-items.is-album .bl-item__title { font-size: 15px; }
.bl-items.is-album .no-thumb .bl-item__link::before {   /* 사진 없는 글도 칸 높이를 맞춘다 */
  content: ""; order: -1; display: block; aspect-ratio: 1 / 1; border-radius: 6px; background: var(--bl-chip);
}

.bl-empty { padding: 40px 28px; color: var(--bl-mute); font-size: 14px; }

/* 페이지 번호 */
.bl-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 22px; font-size: 14px; }
.bl-pager a, .bl-pager span {
  min-width: 36px; min-height: 36px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--bl-text); text-decoration: none; border-bottom: 2px solid transparent;
}
.bl-pager .current { font-weight: 700; border-bottom-color: var(--accent-deep); }
.bl-pager a:hover { color: var(--accent-deep); }

/* ---------- 7. 글 화면 ---------- */
.bl-single { max-width: 820px; margin: 0 auto; padding: 28px 16px 72px; }
.bl-post {
  background: var(--bl-box);
  border: 1px solid var(--bl-line);
  border-radius: var(--bl-radius);
  padding: 48px 56px;
}
.bl-post__head { padding-bottom: 26px; border-bottom: 1px solid var(--bl-line-soft); display: flex; flex-direction: column; gap: 12px; }
.bl-post__cat { align-self: flex-start; font-size: 13px; font-weight: 500; color: var(--accent-deep); text-decoration: none; }
.bl-post__cat:hover { text-decoration: underline; }
.bl-post .bl-post__title { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.4; color: var(--bl-text); }
.bl-post__by { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-size: 13px; color: var(--bl-mute); }
.bl-post__author { font-size: 14px; font-weight: 500; color: var(--bl-text); }
.bl-post__tools { margin-left: auto; display: flex; gap: 6px; }
.bl-tool {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 0 11px;
  border: 1px solid #cfc9be; border-radius: 4px; background: #fff;
  font: inherit; font-size: 13px; color: var(--bl-text-2); cursor: pointer;
}
.bl-tool:hover { border-color: var(--bl-text-2); }
.bl-tool svg { width: 15px; height: 15px; }

.bl-post__cover { margin: 30px 0 0; }
.bl-post__cover img { width: 100%; height: auto; border-radius: 4px; display: block; }

/* 본문 — 좁은 폭 · 넉넉한 줄간격 (이미지 사이 짧은 문단 원고에 맞춘다) */
.bl-post__body {
  max-width: 680px; margin: 0 auto; padding-top: 34px;
  font-size: 16px; line-height: 2; color: #333;
}
.bl-post__body > * { margin-top: 0; margin-bottom: 22px; }
.bl-post__body h2 { font-size: 21px; line-height: 1.5; margin: 40px 0 16px; color: #222; }
.bl-post__body h3 { font-size: 18px; line-height: 1.5; margin: 30px 0 12px; color: #222; }
.bl-post__body img { border-radius: 4px; }
.bl-post__body figure { margin-left: 0; margin-right: 0; }
.bl-post__body figcaption { font-size: 13px; color: var(--bl-mute); text-align: center; margin-top: 6px; }
.bl-post__body a { color: var(--accent-deep); }
.bl-post__body blockquote {
  margin-left: 0; margin-right: 0; padding: 16px 20px;
  background: var(--bl-quote); border-left: 3px solid var(--accent-deep); border-radius: 0 6px 6px 0;
}
.bl-post__body p.a, .bl-post__body p.answer {          /* AEO 정답 한 줄 */
  background: var(--bl-quote); border-left: 3px solid var(--accent-deep);
  padding: 14px 18px; border-radius: 0 6px 6px 0; font-weight: 500; line-height: 1.8;
}
.bl-post__body table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.7; display: block; overflow-x: auto; }
.bl-post__body th, .bl-post__body td { border: 1px solid var(--bl-line); padding: 10px 12px; text-align: left; }
.bl-post__body th { background: var(--bl-quote); }

.bl-post__tags { max-width: 680px; margin: 34px auto 0; }
.bl-post__react { display: flex; justify-content: center; gap: 10px; margin: 30px auto 0; flex-wrap: wrap; }

.bl-like {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid #cfc9be; border-radius: 24px; background: #fff;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--bl-text-2); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.bl-like:hover { border-color: var(--accent-deep); color: var(--accent-deep); }
.bl-like.is-on, .bl-like[aria-pressed="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.bl-like.is-on svg, .bl-like[aria-pressed="true"] svg { fill: currentColor; }
.bl-like .ic { display: inline-flex; }

.bl-author {
  max-width: 680px; margin: 30px auto 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 16px;
  padding: 22px; border: 1px solid var(--bl-line); border-radius: var(--bl-radius);
}
.bl-author__tx { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bl-author__name { margin: 0; font-size: 15px; font-weight: 700; }
.bl-author__line { margin: 0; font-size: 13px; color: #555; line-height: 1.6; }

.layout-blog .bl-post .post-notice { max-width: 680px; margin: 26px auto 0; }

.bl-prevnext {
  max-width: 680px; margin: 30px auto 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.bl-prevnext a {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 16px;
  border: 1px solid var(--bl-line-soft); border-radius: 6px;
  font-size: 14px; line-height: 1.5; color: var(--bl-text); text-decoration: none;
}
.bl-prevnext a:hover { border-color: var(--bl-line); color: var(--accent-deep); }
.bl-prevnext span { font-size: 12px; color: var(--bl-mute); }
.bl-prevnext .is-next { text-align: right; grid-column: 2; }

.bl-related, .bl-comments {
  margin-top: 20px; padding: 22px 28px;
  background: var(--bl-box); border: 1px solid var(--bl-line); border-radius: var(--bl-radius);
}
.bl-related .bl-related__h, .bl-comments .bl-comments__h { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.bl-related ul { list-style: none; margin: 0; padding: 0; }
.bl-related li + li { border-top: 1px solid var(--bl-line-soft); }
.bl-related a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 11px 0; font-size: 14px; color: var(--bl-text); text-decoration: none;
}
.bl-related a:hover span { color: var(--accent-deep); text-decoration: underline; }
.bl-related time { font-size: 12px; color: var(--bl-mute); white-space: nowrap; }
.bl-comments__list { list-style: none; padding: 0; margin: 0 0 18px; font-size: 14px; }
.bl-comments__list li { padding: 12px 0; border-bottom: 1px solid var(--bl-line-soft); }
.bl-comments__note { font-size: 12.5px; color: var(--bl-mute); }
.bl-comments textarea, .bl-comments input[type="text"], .bl-comments input[type="email"], .bl-comments input[type="url"] {
  width: 100%; max-width: 100%; padding: 10px 12px; border: 1px solid #cfc9be; border-radius: 6px; font: inherit; font-size: 15px;
}
.bl-comments .submit {
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 6px;
  background: var(--accent-deep); color: #fff; font: inherit; font-weight: 500; cursor: pointer;
}

/* 복사 · 공유 안내 */
.bl-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px);
  background: rgba(30,30,30,.92); color: #fff; font-size: 13.5px;
  padding: 10px 16px; border-radius: 20px; opacity: 0; pointer-events: none; z-index: 90;
  transition: opacity .2s ease, transform .2s ease; max-width: calc(100vw - 32px);
}
.bl-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* 카드 그리드를 켠 경우 — 커버와 목록 사이 간격 */
.layout-blog .bl-cover + .svc-band, .layout-blog .bl-cover + section { margin-top: 0; }

/* ---------- 8. 모바일 하단 바 ---------- */
.bl-mbar { display: none; }

/* ---------- 9. 태블릿 (≤ 920px) — 한 단 ---------- */
@media (max-width: 920px) {
  .bl-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding-top: 0; }
  .bl-side { display: contents; }              /* 자식들이 .bl-wrap 의 줄 항목이 된다 */
  .bl-side > * { min-width: 0; max-width: 100%; }   /* ★ align-items:start 가 남으면 카테고리 칩 줄이 내용 폭(800px+)으로 늘어난다 */
  .bl-profile { order: 1; }
  .bl-cats    { order: 2; }
  .bl-main    { order: 3; }
  .bl-pop     { order: 4; }
  .bl-tags    { order: 5; }
  .bl-widgets { order: 6; }

  /* 프로필 — 커버 위로 살짝 올라탄 가로형 */
  .bl-profile {
    margin-top: -36px; position: relative;
    display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: end; text-align: left;
    column-gap: 14px; row-gap: 10px; padding: 0 18px 18px;
    border-radius: 0 0 var(--bl-radius) var(--bl-radius);
  }
  .bl-profile .bl-avatar { width: 76px; height: 76px; margin-top: -1px; border: 3px solid #fff; transform: translateY(-14px); margin-bottom: -14px; }
  .bl-profile .bl-avatar.is-text { font-size: 28px; }
  .bl-profile__tx { padding-bottom: 2px; }
  .bl-profile__name { margin-top: 0; }
  .bl-profile__intro, .bl-profile__btns { grid-column: 1 / -1; }
  .bl-cover__in { padding-bottom: 64px; }

  /* 카테고리 — 가로로 넘기는 칩 */
  .bl-cats { padding: 12px 0 12px 16px; }
  .bl-cats .bl-box__h { display: none; }
  .bl-cats ul { flex-direction: row; gap: 8px; overflow-x: auto; padding-right: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .bl-cats ul::-webkit-scrollbar { display: none; }
  .bl-cats li { flex: 0 0 auto; }
  .bl-cats a { padding: 8px 14px; background: var(--bl-chip); border-radius: 18px; font-size: 13px; white-space: nowrap; }
  .bl-cats .is-child a { padding-left: 14px; }
  .bl-cats .is-child a::before { content: none; }
  .bl-cats .is-current a { background: var(--bl-text); color: #fff; }
  .bl-cats .is-current .n { color: rgba(255,255,255,.8); }

  .bl-post { padding: 36px 32px; }

  /* 상단 메뉴 — 두 줄로 접히지 않게 가로로 넘긴다 (스타터 선택자보다 한 단계 깊게) */
  .layout-blog .blog-header nav { min-width: 0; max-width: 100%; }
  .layout-blog .blog-header nav .bb-menu {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .layout-blog .blog-header nav .bb-menu::-webkit-scrollbar { display: none; }
  .layout-blog .blog-header nav .bb-menu li { flex: 0 0 auto; }
  .layout-blog .blog-header nav .bb-menu a { white-space: nowrap; }
}

/* ---------- 10. 모바일 (≤ 768px) — 하단 바 ---------- */
@media (max-width: 768px) {
  body.layout-blog.bl-has-mbar .bb-quick { display: none !important; }
  body.layout-blog.bl-has-mbar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .bl-has-mbar .bl-mbar {
    display: flex; gap: 8px; align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: #fff; border-top: 1px solid var(--bl-line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }
  .bl-mbar__icon, .bl-mbar__btn, .bl-mbar .bl-like--bar {
    flex: 0 0 auto; min-height: 48px; min-width: 52px; padding: 0 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid #cfc9be; border-radius: 8px; background: #fff;
    color: var(--bl-text); font: inherit; font-size: 13.5px; text-decoration: none;
  }
  .bl-mbar__icon svg { width: 20px; height: 20px; }
  .bl-mbar .bl-like--bar[aria-pressed="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
  .bl-mbar__cta {
    flex: 1 1 auto; min-width: 0; min-height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-deep); color: #fff; border-radius: 8px;
    font-size: 15px; font-weight: 700; text-decoration: none;
  }
  .bl-toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* 스타터 푸터가 모바일에서 2단으로 남는 문제 — .in.cols-2(0-3-0)가 스타터 미디어쿼리(0-2-0)를 이긴다 */
@media (max-width: 780px) {
  .layout-blog .blog-footer .in.cols-2, .layout-blog .blog-footer .in.cols-3 { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* ---------- 11. 작은 화면 (≤ 560px) ---------- */
@media (max-width: 560px) {
  .layout-blog .blog-header.bl-top .inner { min-height: 52px; }
  .bl-cover__in { padding: 30px 20px 60px; gap: 6px; }
  .bl-cover .bl-cover__title { font-size: 26px; }
  .bl-cover__sub { font-size: 13.5px; }
  .bl-wrap { padding: 0 0 40px; gap: 8px; }
  .bl-box, .bl-list { border-radius: 0; border-left: 0; border-right: 0; }
  .bl-profile { margin-top: -30px; padding: 0 20px 18px; }

  .bl-list__head { padding: 14px 20px; }
  .bl-view__btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bl-view__btn { min-width: 40px; justify-content: center; }
  .bl-item__link { grid-template-columns: minmax(0, 1fr) 84px; gap: 14px; padding: 16px 20px; }
  .bl-item__thumb { width: 84px; }
  .bl-items .bl-item__title { font-size: 15.5px; }
  .bl-item__ex { display: none; }
  .bl-items.is-album { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; padding: 16px 20px; }
  .bl-items.is-album .bl-item__link { padding: 0; }
  .bl-items.is-album .bl-item__title { font-size: 14px; }

  .bl-single { padding: 0 0 40px; }
  .bl-post { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; padding: 24px 20px; }
  .bl-post .bl-post__title { font-size: 23px; }
  .bl-post__tools { margin-left: 0; width: 100%; }
  .bl-post__body { padding-top: 24px; font-size: 16px; line-height: 1.95; }
  .bl-post__body h2 { font-size: 19px; }
  .bl-post__body > figure, .bl-post__body > .wp-block-image, .bl-post__body > p > img:only-child {
    margin-left: -20px; margin-right: -20px; max-width: none; width: calc(100% + 40px);
  }
  .bl-post__body > figure img, .bl-post__body > .wp-block-image img { border-radius: 0; width: 100%; }
  .bl-prevnext { grid-template-columns: minmax(0, 1fr); }
  .bl-prevnext .is-next { grid-column: auto; text-align: left; }
  .bl-related, .bl-comments { border-radius: 0; border-left: 0; border-right: 0; margin-top: 8px; padding: 20px; }
  .bl-author { padding: 18px; }
  .bl-author .bl-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .bl-btn, .bl-like, .bl-toast { transition: none; }
}

/* ---------- 12. 일반 블로그 요소 — 검색 · 광고 표시 · 업체 카드 · 푸터 ---------- */
.bl-search { display: flex; gap: 6px; padding: 12px; }
.bl-search input {
  flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 0 12px;
  border: 1px solid #cfc9be; border-radius: 6px; font: inherit; font-size: 14px; background: #fff;
}
.bl-search button {
  flex: 0 0 40px; min-height: 40px; border: 0; border-radius: 6px;
  background: var(--bl-text); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}

.bl-post__labels { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bl-adtag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border: 1px solid #b9b2a6; border-radius: 4px; font-size: 12px; font-weight: 500; color: #555; line-height: 1;
}
.bl-adnote {
  margin: 4px 0 0; padding: 10px 14px; background: var(--bl-quote); border-radius: 6px;
  font-size: 13px; line-height: 1.6; color: #555;
}

.bl-biz {
  max-width: 680px; margin: 34px auto 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px;
  padding: 20px 22px; border: 1px solid var(--bl-line); border-radius: var(--bl-radius); background: #fcfbf9;
}
.bl-biz__tx { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bl-biz__name { margin: 0; font-size: 16px; font-weight: 700; color: var(--bl-text); }
.bl-biz__note { margin: 0; font-size: 13.5px; line-height: 1.6; color: #555; }
.bl-biz__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.bl-biz__btns svg { width: 16px; height: 16px; }

.bl-footer { background: #fff; border-top: 1px solid var(--bl-line); }
.bl-footer__in { max-width: var(--bl-max); margin: 0 auto; padding: 32px 24px 40px; display: flex; flex-direction: column; gap: 6px; }
.bl-footer__name { margin: 0; font-size: 15px; font-weight: 700; color: var(--bl-text); }
.bl-footer__desc { margin: 0; font-size: 13px; color: var(--bl-mute); line-height: 1.6; }
.bl-footer__links { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.bl-footer__links a { color: var(--bl-text-2); text-decoration: none; }
.bl-footer__links a:hover { color: var(--accent-deep); text-decoration: underline; }
.bl-footer__copy { margin: 10px 0 0; font-size: 12px; color: var(--bl-mute); }
.layout-blog .bl-top__contact { background: #fff; color: var(--bl-text); border: 1px solid #cfc9be; }
.layout-blog .bl-top__contact:hover { background: var(--bl-chip); color: var(--bl-text); transform: none; }

@media (max-width: 920px) {
  .bl-search { order: 4; }
  .bl-pop    { order: 5; }
  .bl-tags   { order: 6; }
}
@media (max-width: 768px) {
  .bl-mbar__fill { flex: 1 1 auto; }
}
@media (max-width: 560px) {
  .bl-biz { margin-left: 0; margin-right: 0; padding: 16px; }
  .bl-biz__btns { width: 100%; }
  .bl-biz__btns .bl-btn { flex: 1 1 0; min-width: 0; }
  .bl-footer__in { padding: 24px 20px 32px; }
  .layout-blog .bl-top__contact { display: none; }   /* 모바일은 프로필 버튼으로 */
}

/* 안전장치 — 한 줄로 길게 늘어지는 문장이 페이지 폭을 밀지 않게 */
.bl-main, .bl-side, .bl-box, .bl-post__body, .bl-item__tx, .bl-biz { overflow-wrap: anywhere; }
