/* Illo Guro Magazine — 일로한방병원 구로점 매거진 글·목록 전용 스타일 (공용 틀 wp-magazine/theme).
   색·글꼴·버튼·헤더·푸터·카드는 랜딩 /assets/css/style.css(같은 변수: --brown-*·--gold-*·--ivory·--sand·--muted·--line·--header-h·--quick-h)를 그대로 쓰고,
   여기서는 랜딩에 없는 글 본문·목록·WordPress 블록만 다룬다. 랜딩도 같은 계열 스타일시트라 클래스·변수 이름이 같다. 머리 영상(.mag-hero-bg)은 랜딩 style.css가 맡는다. */
/* 매거진 색 — 랜딩 디자인 토큰(--sc-*, site-components)에서 받는다. 사이트마다 테마 색을 그대로 따르게 고정 색(남색·회청색)을 쓰지 않는다
   (사용자 지정 2026-10-22 "하늘색은 이상한데, 전체적으로 테마색으로 해야지"). 옛 사이트 변수(--brown-*·--gold-*·--ivory)는 대체값으로만 */
:root {
  --mg-brand: var(--sc-brand, var(--brown-800, #2b2a33));
  --mg-brand-2: var(--sc-accent-text, var(--brown-500, #5b4a2f));
  --mg-accent: var(--sc-accent-line, var(--gold-500, #b59a63));
  --mg-accent-hi: var(--sc-accent, var(--gold-400, #d9c08f));
  --mg-accent-hi2: var(--sc-accent-hi, var(--gold-300, #efe2c4));
  --mg-tint: var(--sc-tint, var(--ivory, #f6f3ee));
  --mg-tint-2: var(--sc-tint-2, var(--sand, #ece4d8));
  --mg-ink: var(--sc-ink, var(--ink, #1f232b));
  --mg-muted: var(--sc-muted, var(--muted, #6b6b6b));
  --mg-line: var(--sc-line, var(--line, #e4e0d8));
}


/* 관리자 로그인 상태의 상단 관리 막대가 고정 헤더를 가리지 않게 — 헤더는 랜딩 디자인 부품 .sc-hd(N6 sticky, 2026-10-20 v1.0.2) */
.admin-bar .sc-hd { top: 32px; }
@media (max-width: 782px) { .admin-bar .sc-hd { top: 46px; } }
@media (max-width: 600px) { .admin-bar .sc-hd { top: 0; } }
/* 모바일 메뉴(D5) 뒤 어두운 막·메뉴 판: 랜딩은 화면 맨 위에서 헤더 높이만큼 내려온 자리(fixed)에 깐다. 관리 막대가 있으면 헤더가 그만큼 내려가
   막·판이 헤더 아래쪽을 덮는다 → 관리자로 볼 때만 헤더(.sc-hd, sticky라 기준 상자) 바로 아래에 붙인다(헤더가 어디 있든 그 아래부터) */
@media (max-width: 899.98px) {
  .admin-bar .sc-mm__scrim { position: absolute; top: 100%; bottom: auto; height: 100vh; height: 100dvh; }
  /* 메뉴 판도 관리 막대 높이만큼 줄여 아래 전화 단추가 하단 퀵바에 가리지 않게 (막대 높이: 783px 이상 32px, 그 아래 46px) */
  .admin-bar .sc-mm { position: absolute; top: 100%; bottom: auto; height: calc(100vh - var(--sc-header-h) - var(--quick-h) - 32px); height: calc(100dvh - var(--sc-header-h) - var(--quick-h) - 32px); }
}
@media (max-width: 782px) { .admin-bar .sc-mm { height: calc(100vh - var(--sc-header-h) - var(--quick-h) - 46px); height: calc(100dvh - var(--sc-header-h) - var(--quick-h) - 46px); } }

/* 머리 위 분류 링크 */
.page-head .eyebrow a { color: var(--mg-accent-hi); text-decoration: none; }
.page-head .eyebrow a:hover { color: var(--mg-accent-hi2); text-decoration: underline; }
/* 머리 배경 = 메인 히어로 사진(_shell/hero-bg.html, 2026-10-15). 사진·덮개는 absolute라 높이는 글자와 min-height가 정한다(사진 로딩·넘김에 흔들리지 않음).
   랜딩 하위 사진 머리(440px)보다 낮게 — 글 목록·글 페이지에서 본문이 첫 화면에 보이게 */
/* 머리 높이 = 기준 매거진(사용자 지정 2026-10-27) 머리와 같게 768px 이상 450px · 그 아래 300px */
.page-head.mag-hero { min-height: 450px; }
@media (max-width: 767.98px) { .page-head.mag-hero { min-height: 300px; } }

/* ── 목록 ── */
.mag-grid { margin-top: 0; }
.mag-list .card-title { font-size: 1.15rem; }
.mag-grid .link-card:hover .card-title a { color: var(--mg-brand-2); } /* 랜딩 카드는 h3 기준이라 목록 카드(h2)에도 같은 효과 */
/* 카드 크기 통일 — 글 길이와 관계없이 사진 3:2 · 제목 2줄 · 요약 3줄 자리를 똑같이 잡는다.
   넘치는 글은 말줄임(…)으로 자르고, 짧은 글도 같은 높이를 차지한다(줄 수 × 줄 높이로 고정). */
.mag-grid > li { display: flex; }
.mag-grid .card { flex: 1 1 auto; width: 100%; }
/* 분류 메뉴 — 글 카드 위 알약 줄. 좁은 화면은 줄을 바꿔 쌓는다(가로 스크롤 없음). 지금 분류는 짙은 바탕(배지 .mag-cat-pill과 같은 모양 계열) */
/* 목록은 머리 바로 아래에 분류 메뉴가 오므로 섹션 위 여백(랜딩 .sec 최대 96px)을 줄인다 (사용자 지정 2026-10-20) */
.mag-list { padding-top: clamp(28px, 4vw, 44px); }
.mag-catnav { margin: 0 0 28px; }
.mag-catnav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
/* 랜딩 공통 `li + li { margin-top: .35em }`이 둘째 알약부터 6px 내려 "전체"만 위로 튀어나와 보였다 — 메뉴 안에서는 끈다 */
.mag-catnav li, .mag-catnav li + li { margin: 0; }
.mag-catnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--mg-brand); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.mag-catnav a:hover { border-color: var(--mg-brand-2); color: var(--mg-brand-2); }
.mag-catnav a[aria-current="page"] { background: var(--mg-brand); border-color: var(--mg-brand); color: #fff; }
/* 목록 카드 바탕은 흰색 — 랜딩의 "섹션과 반대 톤 카드"를 매거진 목록에는 쓰지 않는다(wordpress-magazine.md 화면 세부 1). 흰 섹션 위에서는 테두리·옅은 그림자로 구분 */
.mag-grid .card, .bg-white .mag-grid .card { background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm, none); }
.mag-grid .card-media { flex: none; }
.mag-grid .card-media img, .mag-grid .card-media .img-slot { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--mg-tint-2); }
/* 랜딩은 빈 이미지 자리(.card .card-media .img-slot)를 2:1 !important로 줄인다 — 매거진 목록은 사진 있는 카드와 같은 3:2 칸이어야 카드 높이가 같다 */
.mag-grid .card .card-media .img-slot { aspect-ratio: 3 / 2 !important; }
.mag-grid .card-body { flex: 1 1 auto; display: flex; flex-direction: column; }
/* 제목 자리 3줄(2026-10-16 사용자 "제목이 두줄 넘어가면 제목이 짤리는데?") — 랜딩 .card-title의 display(flow-root)가 줄 수 제한을 꺼서 "…" 없이 잘렸다. 매거진 목록에서만 되돌린다 */
.mag-grid .card .card-title { line-height: 1.4; height: calc(1.4em * 3); margin: 0 0 10px; padding: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; text-overflow: ellipsis; word-break: keep-all; overflow-wrap: anywhere; }
.mag-grid .card .card-title a { display: inline; }
/* 랜딩 CSS의 섹션 제목 장식(.sec h2::before 골드 막대 4px + 여백 13px)이 목록 카드 제목(h2)에도 붙으면 3줄 높이 안의 자리를 먹어
   마지막 줄이 반쯤 잘리고 line-clamp도 깨진다 — 카드 제목에서는 끈다 (wordpress-magazine.md 화면 세부 1, 2026-10-19) */
.mag-grid .card .card-title::before, .mag-grid .card .card-title::after { content: none; display: none; }
/* 분류 배지 줄 — 제목 위. 분류가 없는 글도 같은 높이를 비워 둔다 */
.mag-cat { display: flex; height: 28px; margin: 0 0 12px; }
.mag-cat-pill { display: inline-flex; align-items: center; height: 28px; max-width: 100%; padding: 0 12px; border-radius: 999px; background: var(--mg-tint); color: var(--mg-brand); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mag-grid .mag-excerpt { font-size: 15px; line-height: 1.65; height: calc(1.65em * 3); margin: 0; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
/* 날짜는 카드 맨 아래 */
.mag-meta { font-size: 14px; color: var(--muted); margin: auto 0 0; padding-top: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mag-empty { color: var(--muted); margin: 0; }
.navigation.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--mg-brand); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.pagination .page-numbers.current { background: var(--mg-brand); border-color: var(--mg-brand); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--mg-brand); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 글 본문 ── 읽기 좋은 폭(한 줄 40자 안팎) */
.entry { max-width: 760px; margin: 0 auto; font-size: 18px; line-height: 1.85; }
.entry > * { margin-top: 0; margin-bottom: 1.2em; }
.entry h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); color: var(--mg-brand); margin: 2.2em 0 .7em; }
.entry h3 { font-size: 1.25rem; color: var(--mg-brand); margin: 1.8em 0 .6em; }
.entry h4 { font-size: 1.1rem; color: var(--mg-brand); margin: 1.6em 0 .5em; }
.entry > h2:first-child, .entry > h3:first-child { margin-top: 0; }
.entry a { color: var(--mg-brand-2); }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--mg-accent); color: var(--muted); }
.entry blockquote p:last-child { margin-bottom: 0; }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.entry img { border-radius: var(--radius); }
.entry figure { margin: 1.8em 0; }
.entry figcaption, .entry .wp-element-caption { font-size: 14px; color: var(--muted); margin-top: 8px; text-align: center; }
.entry table { min-width: 0; font-size: 16px; } /* 랜딩 표 모양(테두리·머리 칸 색)은 그대로 */
.entry .wp-block-table { overflow-x: auto; }
.entry .wp-block-table table { min-width: 480px; }
.entry pre, .entry code { font-size: .9em; background: var(--ivory); border-radius: 6px; }
.entry pre { padding: 16px; overflow-x: auto; }
.entry code { padding: 1px 5px; }

/* WordPress 정렬·블록 */
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry .alignwide, .entry .alignfull { max-width: none; }
.entry::after { content: ""; display: table; clear: both; }
@media (max-width: 599px) { .alignleft, .alignright { float: none; margin: 1.4em 0; } }
.wp-block-button__link { display: inline-flex; align-items: center; min-height: 50px; padding: 0 22px; border-radius: 999px; background: var(--mg-brand); color: #fff; text-decoration: none; font-weight: 600; }

/* ── 글 끝 ── */
.mag-tags { max-width: 760px; margin: 40px auto 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.mag-tags li { margin: 0; }
.mag-tags a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--ivory); color: var(--mg-brand); text-decoration: none; font-size: 14px; }
.mag-adjacent { max-width: 760px; margin: 40px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mag-adjacent a { display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 12px 16px; border-radius: var(--radius); background: var(--ivory); color: var(--mg-brand); text-decoration: none; }
.mag-adjacent a:hover { background: var(--sand); }
.mag-adjacent img { flex: none; width: 96px; height: 72px; border-radius: 4px; object-fit: cover; }
.mag-adjacent-txt { min-width: 0; }
.mag-adjacent small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
/* 제목은 오른쪽 "같이 보면 좋은 글"처럼 3줄까지 */
.mag-adjacent-t { font-size: 15px; font-weight: 600; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; word-break: keep-all; }
.mag-adjacent .next { grid-column: 2; flex-direction: row-reverse; text-align: right; }
@media (max-width: 599px) { .mag-adjacent { grid-template-columns: 1fr; } .mag-adjacent .next { grid-column: auto; flex-direction: row; text-align: left; } }
.mag-back { max-width: 760px; margin: 40px auto 0; text-align: center; }

/* 404 */
.mag-links { padding-left: 1.2em; margin-bottom: 32px; }
.search-form { display: flex; gap: 8px; max-width: 480px; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font: inherit; }
.search-form .search-submit { height: 50px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--mg-brand); color: #fff; font: 600 16px/1 var(--font); cursor: pointer; }

/* ── 글 3단: 왼쪽 목차 · 가운데 본문 · 오른쪽 상담 안내 ──
   1100px 이상 3단(목차가 없으면 2단), 900~1099px 본문+상담 2단(목차는 본문 위), 899px 이하 1단(목차 → 본문 → 상담).
   목차·상담 칸은 스크롤해도 헤더 아래에 붙어 있다(sticky — 흐름 안 높이는 그대로라 본문이 밀리지 않는다). */
/* 글 페이지는 랜딩 폭(1120px)보다 넓게 써서 목차·상담 칸을 본문에서 떼어 놓는다(본문 폭은 760px 안팎 유지) */
.wrap.mag-layout { max-width: 1440px; }
.mag-layout { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.mag-col-main { min-width: 0; }
.mag-col-main .entry, .mag-col-main .mag-tags, .mag-col-main .mag-adjacent, .mag-col-main .mag-back { max-width: none; }
.mag-col-toc, .mag-col-side { min-width: 0; }
@media (min-width: 900px) {
  .mag-layout { grid-template-columns: minmax(0, 1fr) 280px; column-gap: clamp(56px, 6vw, 72px); }
  .mag-col-toc { grid-column: 1; }
  .mag-col-main { grid-column: 1; }
  .mag-col-side { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: calc(var(--header-h) + 24px); }
}
@media (min-width: 1100px) {
  .mag-layout.has-toc { grid-template-columns: 200px minmax(0, 1fr) 272px; column-gap: clamp(48px, calc(9vw - 40px), 112px); }
  .mag-layout.has-toc .mag-col-toc { grid-column: 1; grid-row: 1; position: sticky; top: calc(var(--header-h) + 24px); }
  .mag-layout.has-toc .mag-col-main { grid-column: 2; grid-row: 1; }
  .mag-layout.has-toc .mag-col-side { grid-column: 3; grid-row: 1; }
}
/* 1360px 이상은 랜딩 퀵메뉴가 오른쪽에 세로로 떠 있다(right 16px, 폭 84px) — 상담 칸이 그 밑에 깔리지 않게 오른쪽을 비운다.
   비운 만큼 본문이 좁아지지 않게 칸 간격은 72px까지만(1440px에서 본문 약 690px, 한 줄 38자 안팎) */
@media (min-width: 1360px) {
  .wrap.mag-layout { padding-right: 116px; }
  .mag-layout.has-toc { column-gap: 72px; }
}
/* 넓은 화면: 목차·상담 칸을 본문(가운데)에서 떼어 바깥으로 (사용자 지정 2026-10-15 "목차랑 cta를 가운데서부터 좀 떨어뜨려").
   글 칸 전체를 1440px에 묶으면 1920px에서 세 칸이 가운데에 몰린다 → 폭 1760px까지 쓰고, 본문은 780px(한 줄 42자 안팎)에서 멈춰
   남는 폭을 칸 사이로 나눈다(space-between). 1440px 이하에서는 위 규칙(간격 72px)과 같다. 1600px 약 84px, 1920px 약 164px */
@media (min-width: 1360px) {
  .wrap.mag-layout { max-width: 1760px; }
  .mag-layout.has-toc { grid-template-columns: 200px minmax(0, 780px) 272px; justify-content: space-between; }
  .mag-layout:not(.has-toc) { grid-template-columns: minmax(0, 820px) 280px; justify-content: center; column-gap: clamp(72px, calc(16vw - 144px), 160px); }
}

/* 대표 이미지 썸네일 — 본문 맨 위, 비율 고정(불러오는 동안 자리 흔들림 없음) */
.mag-thumb { margin: 0 0 36px; }
.mag-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--ivory); }

/* 목차 */
.mag-toc { font-size: 15px; line-height: 1.5; }
.mag-toc-title { font-weight: 700; color: var(--mg-brand); margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--mg-brand); }
.mag-toc ol { list-style: none; margin: 0; padding: 0; }
.mag-toc li { margin: 0; }
.mag-toc a { display: block; padding: 7px 0 7px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.mag-toc li.sub a { padding-left: 24px; font-size: 14px; }
.mag-toc a:hover { color: var(--mg-brand); }
.mag-toc a[aria-current] { color: var(--mg-brand); font-weight: 600; border-left-color: var(--mg-brand); }
@media (max-width: 1099px) {
  .mag-toc { background: var(--ivory); border-radius: var(--radius); padding: 20px 22px; }
  .mag-toc a { border-left: 0; padding-left: 0; }
  .mag-toc li.sub a { padding-left: 14px; }
  .mag-toc a[aria-current] { font-weight: 400; color: var(--muted); } /* 목차가 본문 위에 있을 때는 현재 위치 표시를 하지 않는다 */
}
/* 목차 링크로 이동했을 때 소제목이 고정 헤더에 가리지 않는 것은 랜딩 style.css의 html scroll-padding-top이 맡는다 */

/* 상담 안내 칸 */
.mag-cta { background: var(--ivory); border-radius: var(--radius); padding: 24px 20px; }
.mag-cta-title { font-size: 1.15rem; font-weight: 700; color: var(--mg-brand); margin: 0 0 10px; }
.mag-cta-text { font-size: 15px; line-height: 1.65; margin: 0 0 12px; }
.mag-cta-hours { font-size: 14px; color: var(--muted); margin: 0 0 18px; font-variant-numeric: tabular-nums; }
.mag-cta-hours span { display: block; white-space: nowrap; } /* 시각이 줄 중간에서 꺾이지 않게 한 줄씩 */
.mag-cta-actions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mag-cta-actions li { margin: 0; }
.mag-cta-actions .btn { width: 100%; min-width: 0; min-height: 46px; font-size: 14px; padding: 0 12px; gap: 6px; }
.mag-cta-actions .btn .ico { width: 18px; height: 18px; }
.mag-thumb-page { max-width: 760px; margin-left: auto; margin-right: auto; }

/* 상담 칸 전화 버튼 — 랜딩 ctaLink가 디자인 부품 B5(고정 폭 230px)로 낸다. 칸 폭(272px 안쪽)에 맞춰 꽉 채운다(넘침 0) */
.mag-cta-actions .sc-btn { width: 100%; min-width: 0; --sc-b5-w: 100%; }

/* ══ 2026-10-21 (1.0.2) 목록 카드·분류 탭은 군포에스한의원 매거진(gunpohani.com) 모양, 머리는 모든 화면에서 고정 ══ */

/* 머리 — 첫 화면·분류 목록은 h1, 그 밖은 같은 글자를 p로(페이지당 h1 1개). 모양은 랜딩 .page-head h1과 같게 */
.page-head .mag-hero-title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 700; line-height: 1.35; letter-spacing: -0.02em; color: #fff; margin: 0; text-wrap: balance; }

/* 빵부스러기 — 머리 밖 흰 바탕으로 내렸다(글마다 머리 글자가 바뀌지 않게) */
.mag-crumbs { margin: 0 0 18px; }
.mag-crumbs .crumbs ol { color: var(--muted); font-size: 13.5px; }
.mag-crumbs .crumbs a { color: var(--muted); }
.mag-crumbs .crumbs a:hover { color: var(--mg-brand-2); }
.mag-crumbs .crumbs li:not(:last-child)::after { color: var(--mg-line); }
.mag-crumbs .crumbs [aria-current] { color: var(--mg-ink); }

/* 분류 탭 — 글자 탭(지금 분류만 연한 바탕). 전체 = See All */
.mag-catnav { margin: 0 0 32px; }
.mag-catnav ul { gap: 8px 16px; }
.mag-catnav a { min-height: 44px; padding: 4px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--mg-muted); font-size: 15px; font-weight: 400; }
.mag-catnav a:hover { color: var(--mg-ink); background: var(--mg-tint); border: 0; }
.mag-catnav a[aria-current="page"] { background: var(--mg-tint); color: var(--mg-ink); font-weight: 600; border: 0; }

/* 카드 격자 — 3열(1024px 이상) · 2열(600~1023) · 1열 */
.mag-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.mag-cards > li { margin: 0; display: flex; min-width: 0; }
.mag-cards li + li { margin-top: 0; }
@media (max-width: 1023px) { .mag-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (max-width: 599px) { .mag-cards { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

.mag-card { position: relative; display: flex; flex-direction: column; width: 100%; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 2px 6px rgba(0, 0, 0, .08), 0 10px 24px rgba(0, 0, 0, .10); transition: box-shadow .2s, transform .2s; }
.mag-card:hover, .mag-card:focus-within { box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 4px 10px rgba(0, 0, 0, .10), 0 16px 36px rgba(0, 0, 0, .16); transform: translateY(-2px); } /* 카드끼리 구분되게 그림자를 겹으로 (사용자 지정 2026-10-27 "각 카드가 구분이 잘 안된다. shadow를 좀더줘봐") */
.mag-card-img { aspect-ratio: 352 / 185; overflow: hidden; background: var(--ivory); }
.mag-card-img img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.mag-card-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--ivory), var(--sand)); }
.mag-card-body { flex: 1; display: flex; flex-direction: column; padding: 16px 20px; }
.mag-card-tags { min-height: 23px; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.mag-card-tag { display: inline-block; padding: 3px 10px; border-radius: 9999px; background: var(--mg-tint); color: var(--mg-brand-2); font-size: 11px; font-weight: 600; line-height: 1.5; letter-spacing: .04em; text-decoration: none; }
a.mag-card-tag:hover { background: var(--mg-tint-2); }
.mag-cards .mag-card-title, .sec .mag-cards h2.mag-card-title { margin: 0 0 8px; padding: 0; font-size: 18px; font-weight: 700; line-height: 1.35; height: calc(1.35em * 2); color: var(--mg-ink); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; word-break: keep-all; overflow-wrap: anywhere; }
.sec .mag-cards .mag-card-title::before, .sec .mag-cards .mag-card-title::after { content: none; display: none; } /* 랜딩 .sec h2 장식(위 막대)·크기가 카드 제목에 붙지 않게 — 선택자를 랜딩보다 세게 */
.mag-card-title a { color: inherit; text-decoration: none; }
.mag-card-title a::after { content: ""; position: absolute; inset: 0; } /* 카드 전체를 누를 수 있게 */
.mag-card:hover .mag-card-title a { color: var(--mg-brand); }
.mag-card-desc { margin: 0 0 14px; font-size: 14px; line-height: 1.5; height: calc(1.5em * 2); color: var(--mg-muted); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.mag-card-meta { margin: auto 0 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--mg-muted); font-variant-numeric: tabular-nums; }
.mag-card-by { display: inline-flex; align-items: center; gap: 8px; color: var(--mg-muted); font-weight: 500; }
.mag-card-by img { width: 22px; height: 22px; border-radius: 50%; background: var(--mg-tint-2); object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .mag-card, .mag-card:hover { transition: none; transform: none; } }

/* 글·고정 페이지·목록 제목(h1) — 머리 아래 본문 맨 위 */
.mag-post-head { margin: 0 0 24px; }
.mag-post-head .mag-card-tags { margin-bottom: 12px; }
.mag-post-title, .mag-list-title { margin: 0 0 12px; font-size: clamp(1.6rem, 2.8vw, 2.25rem); font-weight: 800; line-height: 1.32; letter-spacing: -0.025em; color: var(--mg-ink); word-break: keep-all; }
.mag-post-byline { margin: 0; color: var(--muted); font-size: 14px; }
.mag-post-byline a { color: var(--mg-brand-2); }
.mag-list-title { margin-bottom: 24px; }
.mag-404-lead { margin: 0 0 24px; color: var(--muted); }

/* 글 제목 줄 — 세 칸 격자를 쓰지 않는 한 줄(.mag-layout 폭만 같이 쓴다) */
.mag-layout.mag-head-row { display: block; padding-bottom: 8px; }
.mag-head-row .mag-post-head { max-width: 900px; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }

/* ══ 글 페이지 배치 (2026-10-21 사용자 지정 — 군포에스한의원 매거진 글 배치) ══
   1400px 이상: 왼쪽 목차 · 가운데 글(최대 720px, 화면 정중앙) · 오른쪽 같이 보면 좋은 글 + 상담 안내. 양옆 칸은 같은 1fr이라 가운데가 늘 정중앙.
   1399px 이하: 가운데 한 줄(머리 → 목차 → 본문 → 같이 볼 글·상담), 역시 화면 정중앙. 옛 .mag-layout 3단은 쓰지 않는다 */
.mag-post { --mag-side-top: calc(var(--sc-header-h, var(--header-h, 72px)) + 24px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "toc" "body" "side"; row-gap: 28px; max-width: 1760px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.mag-p-head { grid-area: head; min-width: 0; }
.mag-p-toc { grid-area: toc; min-width: 0; }
.mag-p-body { grid-area: body; min-width: 0; }
.mag-p-side { grid-area: side; min-width: 0; display: grid; gap: 28px; align-content: start; }
.mag-p-body .entry, .mag-p-body .mag-tags, .mag-p-body .mag-adjacent, .mag-p-body .mag-back { max-width: none; }
/* 1399px 이하: 가운데 한 줄(최대 720px, 화면 정중앙) — 머리 → 목차 상자 → 본문 → 같이 볼 글·상담. 옆 칸을 두면 가운데가 한쪽으로 밀려 정중앙이 안 된다 */
.mag-post { grid-template-columns: minmax(0, 720px); justify-content: center; }
@media (min-width: 900px) { .mag-post { padding-left: calc(clamp(16px, 4vw, 40px) + 116px); padding-right: calc(clamp(16px, 4vw, 40px) + 116px); } } /* 116px = 오른쪽 세로 퀵바 자리. 왼쪽도 같은 폭이라 가운데가 정중앙 */
@media (max-width: 1399px) { .mag-p-side { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); } }
/* 1400px 이상: 왼쪽 목차 · 가운데 글 · 오른쪽 같이 볼 글 + 상담. 양옆 1fr이 같아 가운데 칸 중심 = 화면 중심 */
@media (min-width: 1400px) {
  .mag-post { grid-template-columns: minmax(0, 1fr) minmax(0, 720px) minmax(0, 1fr); grid-template-areas: "toc head side" "toc body side"; justify-content: stretch; column-gap: clamp(40px, 3vw, 64px); }
  .mag-p-toc { justify-self: start; width: min(240px, 100%); position: sticky; top: var(--mag-side-top); max-height: calc(100vh - var(--mag-side-top) - 24px); overflow-y: auto; overscroll-behavior: contain; }
  /* 오른쪽 칸은 글 높이만큼 늘이고 상담 칸만 sticky — 같이 볼 글은 스크롤과 함께 올라가고 상담 칸은 헤더 아래 제자리에 남는다(사용자 지정 2026-10-23) */
  .mag-p-side { justify-self: end; align-self: stretch; width: min(260px, 100%); }
  .mag-p-side .mag-cta { position: sticky; top: var(--mag-side-top); }
  .mag-p-head { padding-top: 4px; }
}
/* 1400~1599px는 퀵바가 아래 고정 줄(64px, make-theme이 붙이는 맨 끝 규칙)이라 긴 목차 칸 아래가 줄에 가리지 않게 그만큼 줄인다 */
@media (min-width: 1400px) and (max-width: 1599px) {
  .mag-p-toc { max-height: calc(100vh - var(--mag-side-top) - 24px - 64px - env(safe-area-inset-bottom)); }
}

/* 가운데 머리 — 빵부스러기 → 분류 알약 → 제목 → 요약(직접 쓴 요약이 있을 때만) → 작성자 줄 */
.mag-p-head .mag-crumbs { margin-bottom: 20px; }
.mag-p-head .mag-card-tags { margin: 0 0 14px; min-height: 0; }
.mag-p-title { margin: 0; font-size: clamp(28px, 3.1vw, 40px); font-weight: 700; line-height: 1.3; letter-spacing: -.025em; color: var(--mg-ink); word-break: keep-all; text-wrap: balance; }
.mag-p-lede { margin: 18px 0 0; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--mg-muted); word-break: keep-all; }
.mag-p-author { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.mag-p-author img { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--mg-tint); box-shadow: inset 0 0 0 1px var(--mg-line); object-fit: cover; }
.mag-p-by { margin: 0; font-size: 15px; font-weight: 600; color: var(--mg-ink); }
.mag-p-by a { color: var(--mg-brand-2); }
.mag-p-date { margin: 2px 0 0; font-size: 13.5px; color: var(--mg-muted); font-variant-numeric: tabular-nums; }
.mag-p-body .mag-thumb { margin: 0 0 32px; }
.mag-p-body .mag-thumb img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }

/* 왼쪽 목차(군포 Contents 모양) — 글자 목록, 지금 읽는 곳 진하게 */
.mag-p-toc .mag-toc { background: none; padding: 0; border: 0; }
.mag-p-toc .mag-toc-title { margin: 0 0 14px; padding: 0; border: 0; font-size: 16px; font-weight: 700; color: var(--mg-ink); }
.mag-p-toc .mag-toc ol { list-style: none; margin: 0; padding: 0; border: 0; }
.mag-p-toc .mag-toc li { margin: 0; padding: 0; border: 0; }
.mag-p-toc .mag-toc li + li { margin-top: 12px; }
.mag-p-toc .mag-toc li ol { margin-top: 12px; padding-left: 12px; }
.mag-p-toc .mag-toc a { display: block; font-size: 14px; line-height: 1.5; color: var(--mg-muted); text-decoration: none; border: 0; padding: 0; }
.mag-p-toc .mag-toc a:hover { color: var(--mg-ink); }
.mag-p-toc .mag-toc a[aria-current] { color: var(--mg-brand); font-weight: 600; }
@media (max-width: 1399px) { .mag-p-toc .mag-toc { background: var(--mg-tint); border-radius: 10px; padding: 20px 22px; } }

/* 오른쪽 같이 보면 좋은 글 — 제목 3줄 + 오른쪽 작은 사진 */
.mag-related-title { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 2px solid var(--mg-tint); font-size: 16px; font-weight: 700; color: var(--mg-ink); }
.mag-related ul { list-style: none; margin: 0; padding: 0; }
.mag-related li { margin: 0; border-bottom: 1px solid var(--mg-tint); }
.mag-related li + li { margin-top: 0; }
.mag-related a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px 0; text-decoration: none; }
.mag-related-t { font-size: 13.5px; line-height: 1.45; color: var(--mg-ink); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; word-break: keep-all; }
.mag-related a:hover .mag-related-t { color: var(--mg-brand); }
.mag-related img { flex: none; width: 72px; height: 56px; border-radius: 4px; object-fit: cover; }

/* 글 페이지 900~1599px: 퀵바 아래 고정 줄 — make-theme이 quickbar.css 899px 이하 규칙에 body.single-post를 붙여 넣은 것(직접 고치지 말 것) */
@media (min-width: 900px) and (max-width: 1599px) {
  body.single-post .sc-qb { left: 0; right: 0; top: auto; bottom: 0; transform: none; }
  body.single-post .sc-qb__list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  body.single-post .sc-qb__t { gap: 3px; min-width: 0; font-size: 12px; }
  body.single-post .sc-qb__t .sc-ic { width: 21px; height: 21px; }
  body.single-post .sc-qb :focus-visible { outline-offset: -3px; }
  body.single-post .sc-qb__top { position: absolute; right: 12px; bottom: calc(100% + 12px); }
  body.single-post .sc-qb .sc-qb__t[data-qb="top"] {
    width: 44px; height: 44px; margin: 0; border-radius: 50%;
    background: var(--sc-surface); color: var(--sc-brand); border: 1px solid var(--sc-line-strong);
    box-shadow: 0 2px 4px rgba(var(--sc-shadow-rgb), .05), 0 14px 30px rgba(var(--sc-shadow-rgb), .11);
    transition: transform .25s var(--sc-ease), background-color .25s, color .25s;
  }
  body.single-post .sc-qb .sc-qb__t[data-qb="top"] .sc-ic { width: 20px; height: 20px; }
  body.single-post .sc-qb .sc-qb__t[data-qb="top"]:hover, body.single-post .sc-qb .sc-qb__t[data-qb="top"]:focus-visible { transform: translateY(-2px); background: var(--sc-brand); color: var(--sc-on-dark); border-color: var(--sc-brand); }
  body.single-post .sc-qb .sc-qb__t[data-qb="top"]:focus-visible { outline-offset: 3px; }
  body.single-post .sc-qb--qb2 {
    height: calc(64px + env(safe-area-inset-bottom)); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(var(--sc-surface-rgb, 255, 255, 255), .78);
    -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
    border-top: 1px solid rgba(var(--sc-surface-rgb, 255, 255, 255), .8); box-shadow: 0 -8px 22px rgba(var(--sc-shadow-rgb), .12);
  }
  body.single-post .sc-qb--qb2 .sc-qb__list { height: 100%; gap: 0; }
  body.single-post .sc-qb--qb2 .sc-qb__t {
    width: auto; height: 100%; border: 0; border-radius: 14px; background: transparent; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; transition: background-color .2s, color .2s;
  }
  body.single-post .sc-qb--qb2 .sc-qb__t[data-qb="call"] { background: var(--sc-brand); }
  body.single-post .sc-qb--qb2 .sc-qb__t:hover, body.single-post .sc-qb--qb2 .sc-qb__t:focus-visible { transform: none; background: rgba(var(--sc-surface-rgb, 255, 255, 255), .9); box-shadow: none; }
  body.single-post .sc-qb--qb2 .sc-qb__t[data-qb="call"]:hover, body.single-post .sc-qb--qb2 .sc-qb__t[data-qb="call"]:focus-visible { background: var(--sc-brand-hi); }
  body.single-post .sc-qb--qb2 .sc-qb__t[data-qb="top"] {
    background: rgba(var(--sc-surface-rgb, 255, 255, 255), .78);
    -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
    border-color: rgba(var(--sc-surface-rgb, 255, 255, 255), .7);
  }
  body.single-post .sc-qb--qb3 {
    padding: 18px 8px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--sc-surface) 72%, rgba(var(--sc-surface-rgb, 255, 255, 255), 0));
  }
  body.single-post .sc-qb--qb3 .sc-qb__list { gap: 6px; }
  body.single-post .sc-qb--qb3 .sc-qb__t { width: auto; height: 58px; border-radius: 12px; transition: background-color .2s, color .2s; }
  body.single-post .sc-qb--qb3 .sc-qb__t:hover, body.single-post .sc-qb--qb3 .sc-qb__t:focus-visible { transform: none; box-shadow: none; }
  body.single-post .sc-qb--qb3 .sc-qb__t[data-qb="top"] { border: 1.5px solid var(--sc-brand); box-shadow: none; }
  body.single-post.sc-qb-space--qb2 { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.single-post.sc-qb-space--qb3 { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
}
