/*
Theme Name: 123 StepUp Ortho
Theme URI: https://123stepup.com
Author: 햇살마취통증의학과
Description: 부천 정형외과 · 햇살마취통증의학과 SEO 원페이지 테마(L3 스택 레이아웃). 네이버 통합검색 사이트 영역 노출과 이미지 카루셀 확보를 목표로 카드 그리드 · 구조화 데이터 · OG 태그 · 반응형 퀵메뉴를 기본 탑재한 설치형 워드프레스 테마입니다.
Version: 1.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: stepup123-ortho
Tags: one-column, custom-menu, featured-images, translation-ready, blog
*/

/* ============================================================
   0. 색상 팔레트  —  햇살마취통증의학과 카드뉴스 브랜드 딥틸 기반
   여기 값만 바꾸면 사이트 전체 색이 바뀝니다.
   ============================================================ */
:root {
  --bg: #ffffff;
  --paper: #eef6f5;
  --ink: #14262a;
  --ink-soft: #395055;
  --ink-mute: #77949a;
  --rule: #cfe2e1;
  --rule-soft: #e4f0ef;
  --accent: #0d8494;
  --accent-deep: #056673;
  --hl: #cfe9e6;
  --tag-bg: #e0efed;
  --navy: #0b4b56;

  /* L3 스택 프리셋용 */
  --stack-bg: #f2f8f7;
  --sky: #e2f0ee;
  --navy-soft: #0f6270;
  --mint: #69b294;
  --card-shadow: rgba(5, 102, 115, 0.13);
  --card-shadow-s: rgba(5, 102, 115, 0.08);
}

/* ============================================================
   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 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: all 0.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: all 0.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), 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: all 0.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), 1fr); } }
@media (max-width: 560px) {
  .post-grid { grid-template-columns: repeat(var(--cols-m, 2), 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: 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: 1fr 300px; gap: 44px; align-items: start;
}
@media (max-width: 920px) { .wrap { grid-template-columns: 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 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: 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; }

/* 주의 박스 */
.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 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: all 0.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: all 0.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 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: all 0.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 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: all 0.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: all 0.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(5, 102, 115, 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(5, 102, 115, 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: 1.3fr 1fr 1fr; gap: 32px;
}
/* "바로가기" 열을 끄면 두 칸으로 (사용자 정의하기 → 푸터) */
.blog-footer .in.cols-2 { grid-template-columns: 1.4fr 1fr; gap: 40px; }
@media (max-width: 780px) { .blog-footer .in { grid-template-columns: 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)); }
}


/* ============================================================
   L3 · 스택 (stack) 레이아웃 프리셋
   ------------------------------------------------------------
   ★ 이 파일은 style.css 를 "교체"하지 않습니다.
     스타터 style.css 의 **맨 뒤에 이어 붙입니다.** (나중 규칙이 이깁니다)
     L1/L2 와 달리 front-page.php 도 바꾸지 않습니다.

   ★ :root 에 아래 네 개를 먼저 추가하고 팔레트에 맞춰 값을 바꿉니다.
       --stack-bg    페이지 바탕 (브랜드색을 아주 옅게)
       --card-shadow 카드 그림자 (브랜드색 계열 rgba)
       --navy-soft   CTA 그라데이션용, --navy 보다 살짝 밝게
       --sky         라벨 칩 · 강조 박스 배경 (브랜드색 옅은 톤)
       --card-shadow-s 헤더·카드용 얕은 그림자

   뼈대(DOM · 클래스 · 카드 그리드)는 그대로 두고,
   본문 섹션을 흰 카드로 끊어 쌓아 올립니다.
   카드 그리드는 손대지 않습니다 (lessons.md 30번).
   ============================================================ */
body { background: var(--stack-bg); }

/* 헤더 — 흰 바탕 + 옅은 그림자 */
.blog-header {
  background: #fff;
  border-bottom: 1px solid var(--rule-soft);
  box-shadow: 0 1px 2px var(--card-shadow-s);
}
.blog-header .logo .mk { border-radius: 14px; }

/* 카드 그리드 밴드 — 바탕과 구분되게 살짝 띄움 */
.grid-band { padding-top: calc(var(--band-pad) + 6px); }
.post-grid .pcard { background: #fff; box-shadow: 0 1px 2px var(--card-shadow-s); }

/* 본문 표지 · 목차 · 강조 · 섹션 = 흰 카드로 쌓기 */
.cover,
.toc,
.main > .callout,
.sec {
  background: #fff;
  border: 1px solid var(--rule-soft);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 26px 28px;
  margin: 0 0 20px;
}
.cover { padding: 14px 14px 10px; }
.cover img { border-radius: 12px; border: 0; }
.cover figcaption { margin-bottom: 4px; }

/* 세로로 긴 통이미지는 잘리지 않게 원본 비율 그대로 */
.cover.is-fullimg img { aspect-ratio: auto !important; object-fit: contain; height: auto; }

.main > .callout {
  border-left: 1px solid var(--rule-soft);
  background: linear-gradient(180deg, var(--sky) 0%, #fff 42%);
}
.main > .callout::before {
  content: "INTRO";
  display: block; font-size: 11px; letter-spacing: .16em;
  color: var(--accent-deep); font-weight: 700; margin-bottom: 10px;
}

.toc { background: var(--sky); border-color: var(--rule); }
.toc .k { color: var(--accent-deep); }
.toc ol { padding-left: 18px; }

/* 섹션 카드 */
.sec { scroll-margin-top: 96px; position: relative; overflow: hidden; }
.sec::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-deep) 46%, var(--rule) 100%);
}
.sec > .k {
  display: inline-block; background: var(--sky); color: var(--accent-deep);
  border-radius: 999px; padding: 6px 12px; margin-bottom: 12px;
  line-height: 1.1;
  /* letter-spacing 은 마지막 글자 뒤에도 붙어서 글자가 왼쪽으로 쏠려 보입니다.
     같은 값만큼 들여써서 알약 안에서 가운데로 맞춥니다. */
  text-indent: 0.16em;
}
.sec h2 { margin-top: 2px; }
.sec figure img { border: 0; border-radius: 14px; }
.sec figure.is-fullimg img { border-radius: 14px; }

/* 표 · 체크리스트 — 카드 안이라 테두리를 덜어 낸다 */
.deflist .row { border-color: var(--rule-soft); }
.deflist .row .d { background: #fff; }
.checks li { border-bottom-color: var(--rule-soft); }
.sec .callout { background: var(--sky); border-radius: 12px; }
.notice { border-radius: 12px; }

/* 네이버 플레이스 카드 */
.naver-card a { border-radius: 14px; box-shadow: 0 1px 2px var(--card-shadow-s); }

/* CTA · 푸터 — 딥 네이비 반전 */
.cta-band {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  border-top: 0; border-bottom: 0; color: #eaf3fb;
}
.cta-band .k { color: #8cc4f0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c6dcee; }
.cta-band .btn { background: #fff; color: var(--navy); border-color: transparent; }
.cta-band .btn:hover { background: #eaf3fb; color: var(--navy); }
.cta-band .btn.line { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.cta-band .btn.line:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.cta-band .btn .tx em { color: inherit; opacity: .78; }
.cta-band .cta-note { color: #9fc2dd; }

.blog-footer { background: var(--navy); color: #c6dcee; border-top: 0; }
.blog-footer a { color: #d7e8f6; }
.blog-footer .fh { color: #fff; }
.blog-footer p, .blog-footer li, .blog-footer .disclaimer { color: #b6cfe4; }

@media (max-width: 560px) {
  .cover, .toc, .main > .callout, .sec { padding: 20px 18px; border-radius: 16px; }
  .cover { padding: 10px 10px 8px; }
}

/* ------------------------------------------------------------
   퀵메뉴 — 항목이 6개 이상일 때 좁은 화면에서 글자·아이콘 축소
   (모바일 하단 바는 칸을 균등 분할하므로 라벨이 길면 잘립니다)
   ------------------------------------------------------------ */
@media (max-width: 430px) {
  .bb-quick--bottom .lb,
  .bb-quick--responsive .lb { font-size: 10px; letter-spacing: -0.02em; }
  .bb-quick--bottom .ic svg,
  .bb-quick--responsive .ic svg { width: 20px; height: 20px; }
  .bb-quick--bottom a,
  .bb-quick--responsive a { padding-left: 2px; padding-right: 2px; }
}

/* ============================================================
   홈페이지 연결 배너 (본문 맨 아래)  —  원본 비율 그대로, 잘리지 않음
   ============================================================ */
.home-banner {
  margin: 34px 0 8px;
  background: #fff;
  border: 1px solid var(--rule-soft);
  border-radius: 18px;
  box-shadow: 0 1px 2px var(--card-shadow-s);
  padding: 14px;
  overflow: hidden;
}
.home-banner > a { display: block; line-height: 0; border-radius: 12px; overflow: hidden; }
.home-banner img {
  display: block;
  width: 100%;
  height: auto;              /* ★ 폭과 높이를 함께 지정하지 않습니다 — 비율 유지 */
  aspect-ratio: auto !important;
  object-fit: contain;
  border-radius: 12px;
  transition: transform .25s ease;
}
.home-banner > a:hover img { transform: scale(1.012); }
.home-banner .hb-cap {
  margin: 12px 4px 2px;
  font-size: 14.5px;
  line-height: 1.6;
  text-align: center;
}
.home-banner .hb-cap a {
  color: var(--accent-deep);
  text-decoration: none;
  font-weight: 700;
}
.home-banner .hb-cap a:hover { text-decoration: underline; }
.home-banner .hb-cap .ar { display: inline-block; transition: transform .2s ease; }
.home-banner .hb-cap a:hover .ar { transform: translateX(3px); }
@media (max-width: 560px) {
  .home-banner { padding: 10px; margin-top: 26px; border-radius: 14px; }
  .home-banner .hb-cap { font-size: 13.5px; }
}
