/*
Theme Name:   GeneratePress Money
Theme URI:    https://people.rich365.co.kr/
Description:  생활 속 돈 관리 블로그를 위한 뉴스형 GeneratePress 차일드 테마. 날짜 머리띠·고정 섹션 메뉴·톱 글·분야별 묶음·많이 본 글·정해진 광고 자리, 연보라 포인트 색, 목차·수정일·구조화 데이터, 속도 최적화.
Author:       인포웨이브
Template:     generatepress
Version:      2.1.1
Requires at least: 6.4
Requires PHP: 7.4
Text Domain:  generatepress-money
*/

/* ═══════════ 디자인 토큰 ═══════════ */
:root {
  --ink: #121218;
  --ink-2: #3d3d4a;
  --muted: #8a8a99;
  --line: #e7e6ee;
  --soft: #f7f6fc;
  --lav: #8b7cf6;          /* 연보라 (앱과 같은 색) */
  --lav-ink: #6650d8;      /* 글자용 진한 연보라 */
  --lav-soft: #f1eefe;
  --lav-line: #ddd6fd;
  --night: #17151f;
  --wrap: 1140px;
  --read: 720px;
  --r: 12px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

/* ═══════════ 기본 ═══════════ */
body.mw {
  background: #fff; color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.7; letter-spacing: -0.01em;
  word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.mw :is(button, input, select, textarea, h1, h2, h3, h4, .main-title) { font-family: var(--font); }
:where(body.mw) a { color: var(--lav-ink); text-underline-offset: 3px; }
:where(body.mw) a:hover { color: var(--lav); }
body.mw ::selection { background: var(--lav-soft); }
body.mw .grid-container { max-width: var(--wrap); }
body.mw .site, body.mw .site-content { background: transparent; }
body.mw.separate-containers .site-main { margin: 0; }
body.mw :is(.inside-article, .page-header, .paging-navigation, .comments-area, .inside-right-sidebar) { background: transparent; padding: 0; }
body.mw.one-container .container { background: transparent; }
body.mw .site-content { display: block; padding: 0 16px; }
body.mw .content-area, body.mw .is-right-sidebar { width: 100% !important; float: none; }
body.mw #left-sidebar { display: none; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* ═══════════ 머리글: 한 줄 제호 (날짜·소개 | 제호 | 안내·검색) ═══════════ */
body.mw .site-header { background: #fff !important; position: relative; z-index: 60; border: 0 !important; }
body.mw .site-header .inside-header { position: relative; display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 16px !important; flex-direction: row !important; text-align: left !important; max-width: var(--wrap); margin: 0 auto; }
body.mw .site-header .inside-header::before, body.mw .site-header .inside-header::after { content: none !important; display: none !important; } /* 부모 테마의 float 정리용 가짜 칸 제거 */
/* 예전 로고 그림·머리글 위젯·태그라인은 어떤 방식으로 들어가 있어도 숨김 */
body.mw .site-header img, body.mw .site-logo, body.mw .header-widget, body.mw .site-header .site-description { display: none !important; }
body.mw .site-branding, body.mw .site-branding-container { margin: 0 !important; min-width: 0; text-align: left; display: block; }
body.mw .main-title { margin: 0 !important; font-family: var(--font) !important; font-size: 22px !important; font-weight: 900 !important; font-style: normal !important; line-height: 1.25 !important; letter-spacing: -0.06em !important; text-transform: none !important; white-space: nowrap; }
body.mw .main-title a { color: var(--ink) !important; text-decoration: none; font-style: normal !important; }
body.mw .main-title a::after { content: ""; display: inline-block; width: .28em; height: .28em; border-radius: 50%; background: var(--lav); margin-left: .1em; vertical-align: .06em; }
body.mw.mw-nomenu :is(.main-navigation, .mobile-menu-control-wrapper, #site-navigation) { display: none !important; }
.mw-hd-left { display: none; }
.mw-hd-right { display: flex; align-items: center; gap: 16px; justify-self: end; }
.mw-hd-links { display: none; }

.mw-search { flex: 0 0 auto; }
.mw-search summary { list-style: none; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.mw-search summary::-webkit-details-marker { display: none; }
.mw-search summary:hover, .mw-search[open] summary { background: var(--lav-soft); color: var(--lav-ink); }
.mw-search form { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px 14px; display: flex; gap: 8px; box-shadow: 0 16px 28px -18px rgba(20, 16, 50, .35); z-index: 70; }
.mw-search input[type=search] { flex: 1; min-width: 0; height: 46px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 14px; font-size: 16px; background: var(--soft); color: var(--ink); }
.mw-search input[type=search]:focus { outline: none; border-color: var(--lav); background: #fff; }
.mw-search button { height: 46px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }

.mw-nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
body.admin-bar .mw-nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .mw-nav { top: 46px; } }
.mw-nav__in { max-width: var(--wrap); margin: 0 auto; padding: 0 8px; display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mw-nav__in::-webkit-scrollbar { display: none; }
.mw-nav__in a { flex: 0 0 auto; position: relative; padding: 13px 10px 12px; font-size: 15px; font-weight: 700; color: var(--ink-2); text-decoration: none; white-space: nowrap; line-height: 1.3; }
.mw-nav__in a:hover { color: var(--ink); }
.mw-nav__brand { display: none !important; font-weight: 900 !important; font-size: 16px !important; letter-spacing: -0.06em; color: var(--ink) !important; padding-right: 14px !important; margin-right: 4px; }
.mw-nav__brand::after { content: ""; position: absolute; right: 0; top: 14px; bottom: 13px; width: 1px; background: var(--line); }
.mw-nav.is-stuck .mw-nav__brand { display: block !important; }
.mw-nav__in a.is-on { color: var(--lav-ink); }
.mw-nav__in a.is-on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--lav); }
.mw-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.mw-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--lav), #b9aefc); transform: scaleX(0); transform-origin: 0 50%; }

/* ═══════════ 공통 조각 ═══════════ */
.mw-kicker { display: inline-block; font-size: 13px; font-weight: 800; color: var(--lav-ink); text-decoration: none; letter-spacing: -0.01em; line-height: 1.3; }
a.mw-kicker:hover { color: var(--lav); }
.mw-card__d, .mw-cardmeta { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin: 0; }
.mw-ph { display: grid; place-items: center; width: 100%; height: 100%; aspect-ratio: 1 / 1; background: linear-gradient(135deg, var(--lav-soft), #eaf1ff); color: var(--lav-ink); }
.mw-ph span { font-size: 12.5px; font-weight: 800; padding: 6px; text-align: center; line-height: 1.3; }
.mw-sec__h { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 2px solid var(--ink); padding-top: 12px; margin: 0 0 18px; }
.mw-sec__h h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.3; color: var(--ink); }
.mw-sec__h h2::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--lav); flex: 0 0 auto; }
.mw-sec__h a { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.mw-sec__h a:hover { color: var(--lav-ink); }

/* 카드: 모바일은 글자 왼쪽·사진 오른쪽 한 줄, 넓은 화면은 사진 위 */
.mw-grid { display: grid; grid-template-columns: 1fr; }
.mw-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 104px; column-gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mw-grid > .mw-card:first-child { padding-top: 0; }
.mw-card__img { grid-column: 2; grid-row: 1; display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--soft); }
.mw-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.mw-card:hover .mw-card__img img { transform: scale(1.04); }
.mw-card__tx { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mw-card__t { margin: 0; font-size: 16.5px; font-weight: 700; line-height: 1.45; letter-spacing: -0.03em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mw-card__t a { color: var(--ink); text-decoration: none; }
.mw-card__t a::after { content: ""; position: absolute; inset: 0; }
.mw-card:hover .mw-card__t a { color: var(--lav-ink); }

/* 많이 본 글 · 상자 */
.mw-box__t { margin: 0 0 6px; padding-top: 12px; border-top: 2px solid var(--ink); font-size: 17px; font-weight: 800; letter-spacing: -0.035em; color: var(--ink); }
.mw-pop ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.mw-pop li { margin: 0; border-bottom: 1px solid var(--line); }
.mw-pop li:last-child { border-bottom: 0; }
.mw-pop a { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; text-decoration: none; color: var(--ink); }
.mw-pop b { font-size: 20px; font-weight: 800; font-style: italic; color: var(--lav); line-height: 1; font-variant-numeric: tabular-nums; text-align: center; }
.mw-pop li:nth-child(n+4) b { color: #c4bcf8; }
.mw-pop span { font-size: 15px; font-weight: 650; line-height: 1.45; letter-spacing: -0.025em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mw-pop a:hover span { color: var(--lav-ink); }
.mw-pop__img { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; display: block; background: var(--soft); }
.mw-pop__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mw-pop__img .mw-ph span { font-size: 9px; }
.mw-catlist ul { list-style: none; margin: 0; padding: 0; }
.mw-catlist li { margin: 0; border-bottom: 1px solid var(--line); }
.mw-catlist a { display: flex; justify-content: space-between; align-items: center; padding: 11px 2px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.mw-catlist a:hover { color: var(--lav-ink); }
.mw-catlist a span { font-size: 12px; font-weight: 700; color: var(--lav-ink); background: var(--lav-soft); border-radius: 999px; padding: 2px 9px; }

/* ═══════════ 광고 자리 ═══════════ */
.mw-ad { margin: 32px 0; text-align: center; clear: both; }
.mw-ad__label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: #a9a9b6; margin-bottom: 6px; text-align: center; }
.mw-ad ins.adsbygoogle { min-height: 250px; }
.mw-ad--wide ins.adsbygoogle { min-height: 100px; }
.mw-ad:has(ins[data-ad-status="unfilled"]) { display: none; }
.mw-ad__ph { display: grid; place-items: center; min-height: 250px; border: 1.5px dashed var(--lav-line); border-radius: 10px; background: repeating-linear-gradient(135deg, #fbfaff 0 12px, #f5f2ff 12px 24px); color: var(--lav-ink); font-size: 13.5px; font-weight: 700; }
.mw-ad--wide .mw-ad__ph { min-height: 250px; }
.mw-ad--rail .mw-ad__ph { min-height: 600px; }
.mw-ad--box .mw-ad__ph { min-height: 250px; }
.mw-ad--list { padding: 4px 0; }
.mw-sticky { position: sticky; top: 76px; }

/* ═══════════ 첫 화면 ═══════════ */
.mw-front .site-main { padding: 22px 0 40px; }
.mw-top { display: grid; grid-template-columns: 1fr; gap: 28px; }
.mw-lead { position: relative; }
.mw-lead__img { display: block; aspect-ratio: 1 / 1; border-radius: var(--r); overflow: hidden; background: var(--soft); margin-bottom: 16px; }
.mw-lead__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.mw-lead:hover .mw-lead__img img { transform: scale(1.03); }
.mw-lead__tx { display: flex; flex-direction: column; gap: 8px; }
.mw-lead__t { margin: 0; font-size: clamp(24px, 6.2vw, 34px); font-weight: 800; line-height: 1.3; letter-spacing: -0.045em; }
.mw-lead__t a { color: var(--ink); text-decoration: none; }
.mw-lead__t a:hover { color: var(--lav-ink); }
.mw-lead__ex { margin: 0; font-size: 16px; line-height: 1.65; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mw-subs { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line); }
.mw-subs li { margin: 0; border-bottom: 1px solid var(--line); }
.mw-subs a { display: grid; grid-template-columns: minmax(0, 1fr) 72px; gap: 14px; align-items: center; padding: 14px 0; text-decoration: none; }
.mw-subs__tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mw-subs strong { font-size: 16px; font-weight: 700; line-height: 1.45; letter-spacing: -0.03em; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mw-subs a:hover strong { color: var(--lav-ink); }
.mw-subs__img { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--soft); }
.mw-subs__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mw-subs__img .mw-ph span { font-size: 10px; }
.mw-top__rail { display: flex; flex-direction: column; gap: 8px; }
.mw-top__rail .mw-ad { margin: 16px 0 0; }
.mw-sec { margin-top: 36px; }
.mw-catbs { display: grid; grid-template-columns: 1fr; gap: 36px; margin-top: 36px; }
.mw-catb .mw-card { border-bottom: 0; padding: 0 0 12px; }
.mw-catb__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mw-catb__list li { margin: 0; border-bottom: 1px solid var(--line); }
.mw-catb__list a { display: block; position: relative; padding: 11px 0 11px 14px; font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--ink-2); text-decoration: none; letter-spacing: -0.02em; }
.mw-catb__list a::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 5px; height: 5px; border-radius: 50%; background: var(--lav); }
.mw-catb__list a:hover { color: var(--lav-ink); }
.mw-allposts { text-align: center; margin: 44px 0 0; }
.mw-allposts a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 26px; border: 1.5px solid var(--ink); border-radius: 999px; color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }
.mw-allposts a:hover { background: var(--ink); color: #fff; }

/* ═══════════ 목록 (분야·검색·2쪽 이후) ═══════════ */
body.mw:is(.archive, .search, .blog.paged) .site-main { padding: 8px 0 40px; }
body.mw .page-header { margin: 0; padding: 24px 0 8px !important; }
body.mw .page-header .page-title { font-size: clamp(26px, 5.6vw, 34px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.25; margin: 0 0 8px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
body.mw .page-header .taxonomy-description p, body.mw .page-header p { color: var(--ink-2); font-size: 15px; margin: 0; }
body.mw:is(.archive, .search, .blog) .site-main > article { margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); position: relative; }
body.mw:is(.archive, .search, .blog) .inside-article { display: grid; grid-template-columns: minmax(0, 1fr) 104px; grid-template-rows: auto 1fr; column-gap: 16px; grid-template-areas: "head img" "sum img"; align-items: start; }
body.mw:is(.archive, .search, .blog) .mw-thumb { grid-area: img; margin: 0; }
.mw-thumb a { display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--soft); }
.mw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
article:hover .mw-thumb img { transform: scale(1.04); }
body.mw:is(.archive, .search, .blog) .entry-header { grid-area: head; margin: 0; display: flex; flex-direction: column-reverse; gap: 5px; }
body.mw:is(.archive, .search, .blog) .entry-title { font-size: 17px; font-weight: 750; line-height: 1.45; letter-spacing: -0.03em; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
body.mw:is(.archive, .search, .blog) .entry-title a { color: var(--ink); text-decoration: none; }
body.mw:is(.archive, .search, .blog) .entry-title a::after { content: ""; position: absolute; inset: 0; }
body.mw:is(.archive, .search, .blog) article:hover .entry-title a { color: var(--lav-ink); }
.mw-cardmeta { display: flex; align-items: center; gap: 8px; }
.mw-cardmeta .mw-kicker { font-size: 12.5px; }
body.mw:is(.archive, .search, .blog) .entry-summary { grid-area: sum; display: none; }
body.mw .read-more-container, body.mw .entry-summary .read-more { display: none; }
body.mw:is(.archive, .search, .blog) footer.entry-meta { display: none; }
body.mw .paging-navigation { margin-top: 28px !important; }
body.mw .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
body.mw .nav-links .page-numbers { min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 15px; text-decoration: none; background: #fff; }
body.mw .nav-links .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
body.mw .nav-links .page-numbers.dots { border: 0; }
body.mw .nav-links a.page-numbers:hover { border-color: var(--lav); color: var(--lav-ink); }

/* 오른쪽 칸 (모바일에선 글 아래로) */
body.mw .is-right-sidebar { margin-top: 8px; padding-bottom: 32px; }
.mw-railbox { display: flex; flex-direction: column; gap: 28px; }
.mw-railbox .mw-sticky { display: none; }

/* ═══════════ 글 화면 ═══════════ */
body.mw.single .site-main { padding: 22px 0 32px; }
body.mw.page .site-main { max-width: var(--read); margin: 0 auto; padding: 26px 0 48px; }
.mw-art-kicker { margin-bottom: 10px; }
.mw-art-kicker .mw-kicker { font-size: 14px; padding: 4px 11px; border-radius: 999px; background: var(--lav-soft); }
body.mw.single .entry-header, body.mw.page .entry-header { margin: 0 0 24px; }
body.mw.single .entry-title, body.mw.page .entry-title { font-size: clamp(27px, 6.6vw, 40px); font-weight: 800; line-height: 1.3; letter-spacing: -0.05em; margin: 0 0 14px; color: var(--ink); }
.mw-sub { margin: 0 0 20px; padding-left: 14px; border-left: 3px solid var(--lav); font-size: 16.5px; line-height: 1.65; color: var(--ink-2); font-weight: 500; }
.mw-byline { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mw-byline__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mw-av { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--lav), #6d5cf0); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.mw-av--lg { width: 52px; height: 52px; font-size: 20px; }
.mw-byline__name { font-size: 14.5px; font-weight: 750; color: var(--ink); text-decoration: none; }
.mw-byline__name em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 13px; }
.mw-byline__dates { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.mw-byline__dates span { display: inline-flex; align-items: center; gap: 3px; }
.mw-upd { color: var(--lav-ink); font-weight: 600; }
.mw-tools { display: flex; gap: 6px; flex: 0 0 auto; }
.mw-tools button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.mw-tools button:hover { border-color: var(--lav-line); background: var(--lav-soft); color: var(--lav-ink); }
.mw-cover { margin: 26px auto 30px; max-width: 520px; }
.mw-cover img { width: 100%; height: auto; display: block; border-radius: var(--r); }

body.mw .entry-content { font-size: 17.5px; line-height: 1.85; color: #25252f; }
html[data-fs="2"] body.mw .entry-content { font-size: 19px; }
html[data-fs="3"] body.mw .entry-content { font-size: 20.5px; }
body.mw .entry-content > * { margin-top: 0; margin-bottom: 1.15em; }
body.mw .entry-content p { margin-bottom: 1.15em; }
body.mw .entry-content h2 { font-size: 1.32em; font-weight: 800; line-height: 1.42; letter-spacing: -0.04em; margin: 2.2em 0 .75em; color: var(--ink); scroll-margin-top: 70px; }
body.mw .entry-content h2::before { content: ""; display: block; width: 26px; height: 4px; border-radius: 4px; background: var(--lav); margin-bottom: 14px; }
body.mw .entry-content h3 { font-size: 1.1em; font-weight: 750; line-height: 1.5; letter-spacing: -0.03em; margin: 1.8em 0 .6em; color: var(--ink); scroll-margin-top: 70px; }
body.mw .entry-content strong { font-weight: 700; color: var(--ink); }
body.mw .entry-content :is(ul, ol) { padding-left: 1.3em; margin-left: 0; }
body.mw .entry-content li { margin-bottom: .35em; }
body.mw .entry-content li::marker { color: var(--lav); font-weight: 700; }
body.mw .entry-content hr { border: 0; height: 1px; background: var(--line); margin: 2.2em 0; }
body.mw .entry-content img { border-radius: 10px; height: auto; }
body.mw .entry-content figure { margin: 1.8em 0 !important; }
body.mw .entry-content figcaption { font-size: 13.5px !important; color: var(--muted) !important; margin-top: 8px; text-align: center; }
body.mw .entry-content a:not(.mw-toc a) { text-decoration: underline; text-decoration-color: var(--lav-line); text-decoration-thickness: 2px; }

/* 핵심 요약 */
.mw-summary { background: var(--lav-soft); border-radius: var(--r); padding: 18px 20px 6px; margin: 0 0 1.6em !important; border: 1px solid var(--lav-line); }
.mw-summary__label { font-size: 13px !important; font-weight: 800; color: var(--lav-ink); margin: 0 0 8px !important; letter-spacing: .02em; }
.mw-summary p:not(.mw-summary__label) { position: relative; padding-left: 20px; margin-bottom: .7em !important; font-size: .95em; line-height: 1.7; }
.mw-summary p:not(.mw-summary__label)::before { content: ""; position: absolute; left: 2px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--lav); }
.mw-summary strong { font-weight: 650; }

/* 목차 */
.mw-toc { border: 1px solid var(--line); border-radius: var(--r); margin: 1.8em 0 2em !important; background: #fff; }
.mw-toc summary { cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 800; font-size: 15.5px; display: flex; align-items: center; justify-content: space-between; }
.mw-toc summary::-webkit-details-marker { display: none; }
.mw-toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; transition: transform .2s; }
.mw-toc details[open] summary::after { transform: rotate(-135deg); }
.mw-toc ol { margin: 0 !important; padding: 0 18px 14px !important; list-style: none; counter-reset: toc; }
.mw-toc li { counter-increment: toc; margin: 0 !important; border-top: 1px dashed var(--line); }
.mw-toc li a { display: flex; gap: 10px; padding: 9px 0; color: var(--ink-2); text-decoration: none; font-size: 15px; line-height: 1.5; }
.mw-toc li a::before { content: counter(toc, decimal-leading-zero); color: var(--lav); font-weight: 800; font-size: 13px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.mw-toc li a:hover { color: var(--lav-ink); }

/* 표 (BlogPilot이 넣은 인라인 색도 테마 색으로 통일) */
body.mw .entry-content div[style*="overflow-x"], .mw-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.6em 0 !important; border: 1px solid var(--line); border-radius: 10px; }
body.mw .entry-content table { width: 100%; border-collapse: collapse !important; font-size: 15px !important; line-height: 1.55; margin: 0 !important; border: 0 !important; }
body.mw .entry-content th { background: var(--soft) !important; color: var(--ink) !important; font-weight: 700 !important; text-align: left; border: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 11px 14px !important; white-space: nowrap; }
body.mw .entry-content td { border: 0 !important; border-bottom: 1px solid var(--line) !important; padding: 11px 14px !important; vertical-align: top; color: var(--ink-2); }
body.mw .entry-content tr:last-child td { border-bottom: 0 !important; }
body.mw .entry-content td:first-child { font-weight: 600; color: var(--ink); }
body.mw .entry-content figure.wp-block-table { overflow-x: auto; }
body.mw .entry-content :is(div[style*="overflow-x"], .mw-table) + p { font-size: 13.5px; color: var(--muted); margin-top: -.6em; }

/* 주의 · 질문 · 함께 보면 · 참고 자료 */
body.mw .entry-content blockquote { margin: 1.6em 0; padding: 16px 18px 16px 46px; border: 0; border-radius: 10px; background: #fff8ec; color: #5b4521; font-size: .93em; line-height: 1.7; font-style: normal; position: relative; }
body.mw .entry-content blockquote::before { content: "!"; position: absolute; left: 16px; top: 17px; width: 20px; height: 20px; border-radius: 50%; background: #f0a23a; color: #fff; font-size: 13px; font-weight: 900; display: grid; place-items: center; line-height: 1; }
body.mw .entry-content blockquote p:last-child { margin-bottom: 0; }
body.mw .entry-content h3.mw-q { font-size: 1em; margin: 1.1em 0 0; padding: 16px 18px 6px; background: var(--soft); border-radius: 10px 10px 0 0; }
body.mw .entry-content h3.mw-q + p { background: var(--soft); margin: 0 0 .8em; padding: 0 18px 16px; border-radius: 0 0 10px 10px; font-size: .93em; color: var(--ink-2); }
body.mw .entry-content :is(h2.mw-h-more, h2.mw-h-refs) { font-size: 1em; margin-top: 2.4em; }
body.mw .entry-content :is(h2.mw-h-more, h2.mw-h-refs)::before { display: none; }
body.mw .entry-content :is(h2.mw-h-more, h2.mw-h-refs) + ul { list-style: none; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
body.mw .entry-content :is(h2.mw-h-more, h2.mw-h-refs) + ul li { margin: 0; border-bottom: 1px solid var(--line); }
body.mw .entry-content :is(h2.mw-h-more, h2.mw-h-refs) + ul li:last-child { border-bottom: 0; }
body.mw .entry-content :is(h2.mw-h-more, h2.mw-h-refs) + ul a { display: block; padding: 12px 16px; text-decoration: none; font-size: 15.5px; line-height: 1.5; color: var(--ink); }
body.mw .entry-content h2.mw-h-more + ul a::after { content: " →"; color: var(--lav); }
body.mw .entry-content h2.mw-h-refs + ul a { color: var(--ink-2); font-size: 14.5px; }
body.mw .entry-content h2.mw-h-refs + ul a::before { content: "↗"; color: var(--muted); margin-right: 8px; }
body.mw .entry-content :is(h2.mw-h-more, h2.mw-h-refs) + ul a:hover { background: var(--soft); }

/* 태그 · 작성자 · 관련 글 */
.mw-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 30px 0 0; }
.mw-tags a { font-size: 13.5px; padding: 5px 11px; border-radius: 8px; background: var(--soft); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.mw-tags a:hover { background: var(--lav-soft); color: var(--lav-ink); }
.mw-author { display: flex; gap: 14px; margin: 28px 0 0; padding: 20px; border-radius: var(--r); background: var(--soft); }
.mw-author p { margin: 0 0 6px; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.mw-author__name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.mw-author__name a { font-weight: 800; color: var(--ink); text-decoration: none; font-size: 16px; }
.mw-author__name span { font-size: 13px; color: var(--muted); }
.mw-author__note { font-size: 13px !important; color: var(--muted) !important; margin: 6px 0 0 !important; }
.mw-related { margin: 44px 0 0; }

/* 댓글 (열어둔 글이 있을 때) */
body.mw .comments-area { margin: 40px 0 0; }
body.mw :is(.comments-title, .comment-reply-title) { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
body.mw .comment-form :is(textarea, input[type=text], input[type=email], input[type=url]) { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; background: var(--soft); padding: 12px 14px; font-size: 16px; }
body.mw .comment-form textarea { min-height: 140px; height: 140px; }
body.mw .comment-form .submit { border-radius: 10px; background: var(--ink); font-weight: 700; padding: 12px 22px; }

/* 고정 페이지·404·검색 */
body.mw.page .entry-content h2::before { display: none; }
body.mw.error404 .site-main { max-width: var(--read); margin: 0 auto; padding: 40px 0 56px; }
body.mw :is(.error404 .entry-title, .no-results .page-title, .no-results .entry-title) { font-size: clamp(24px, 5vw, 30px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.35; margin: 0 0 12px; }
body.mw .search-form { display: flex; gap: 8px; max-width: 480px; }
body.mw .search-form label { flex: 1; }
body.mw .search-form .search-field { width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--soft); padding: 0 14px; font-size: 16px; }
body.mw .search-form .search-submit { height: 48px; min-width: 56px; border-radius: 10px; background: var(--ink); }

/* 알림 */
.mw-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 99; }
.mw-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ═══════════ 바닥글 ═══════════ */
body.mw .site-footer { margin-top: 40px; }
body.mw .site-info { background: var(--night); color: #b9b6c8; }
body.mw .inside-site-info { padding: 40px 16px 44px; display: block; }
body.mw .copyright-bar { width: 100%; text-align: left; }
.mw-foot p { margin: 0 0 12px; font-size: 13px; line-height: 1.7; }
.mw-foot__name { font-weight: 900; font-size: 22px !important; color: #fff; letter-spacing: -0.05em; margin-bottom: 2px !important; }
.mw-foot__name::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--lav); margin-left: 3px; vertical-align: 2px; }
.mw-foot__tag { color: #8f8ba3; margin-bottom: 20px !important; }
.mw-foot__cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.mw-foot__cats a { font-size: 13px; color: #d9d6e6; text-decoration: none; padding: 6px 12px; border: 1px solid #34304a; border-radius: 999px; }
.mw-foot__cats a:hover { border-color: var(--lav); color: #fff; }
.mw-foot__links { display: flex; flex-wrap: wrap; gap: 6px 10px; padding-top: 18px; border-top: 1px solid #2b2839; }
.mw-foot__links span { color: #4a4660; }
.mw-foot__links a { color: #d9d6e6; text-decoration: none; }
.mw-foot__links a:hover { color: #fff; text-decoration: underline; }
.mw-foot__note { color: #8f8ba3; }
.mw-foot__copy { color: #6e6a84; margin-bottom: 0 !important; }
body.mw .generate-back-to-top { border-radius: 50%; background: var(--ink); opacity: .85; }

/* ═══════════ 태블릿 (641px~) ═══════════ */
@media (min-width: 641px) {
  body.mw .site-header .inside-header { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: 16px 24px !important; }
  .mw-hd-left { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.35; }
  .mw-hd-date { font-size: 13px; font-weight: 700; color: var(--ink); }
  .mw-hd-tag { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.mw .site-branding, body.mw .site-branding-container { text-align: center; }
  body.mw .main-title { font-size: 32px !important; }
  .mw-hd-links { display: flex; gap: 14px; }
  .mw-hd-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
  .mw-hd-links a:hover { color: var(--ink); }
  .mw-search summary { border: 1px solid var(--line); }
  .mw-search form { left: auto; right: 24px; top: calc(100% - 4px); width: 420px; border: 1px solid var(--line); border-radius: 14px; }
  .mw-nav.is-stuck .mw-nav__in { justify-content: flex-start; }
  .mw-nav__in { justify-content: center; padding: 0 16px; }
  .mw-nav__in a { padding: 14px 14px 13px; }
  .mw-nav__in a.is-on::after { left: 14px; right: 14px; }
  body.mw .site-content { padding: 0 24px; }
  .mw-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 22px; }
  .mw-grid--4 .mw-card { display: flex; flex-direction: column; padding: 0; border: 0; gap: 12px; }
  .mw-grid--4 .mw-card__tx { gap: 6px; }
  .mw-grid--4 .mw-card__t { font-size: 17px; -webkit-line-clamp: 2; }
  .mw-lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
  .mw-lead__img { margin: 0; }
  .mw-subs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; border-top: 0; margin-top: 24px; }
  .mw-subs li { border-top: 1px solid var(--line); border-bottom: 0; }
  .mw-catbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; }
  .mw-catb .mw-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .mw-catb .mw-card__img { grid-column: 1; }
  .mw-catb .mw-card__tx { grid-column: 2; }
  body.mw:is(.archive, .search, .blog) .inside-article { grid-template-columns: minmax(0, 1fr) 180px; column-gap: 24px; }
  body.mw:is(.archive, .search, .blog) .entry-title { font-size: 19px; }
  body.mw:is(.archive, .search, .blog) .entry-summary { display: block; margin-top: 8px; }
  body.mw:is(.archive, .search, .blog) .entry-summary p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mw-summary { padding: 22px 26px 10px; }
  .mw-author { padding: 22px 24px; }
  .mw-railbox { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ═══════════ PC (1061px~) ═══════════ */
@media (min-width: 1061px) {
  .mw-top { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
  .mw-lead { grid-template-columns: 380px minmax(0, 1fr); gap: 32px; align-items: start; }
  .mw-lead__t { font-size: 34px; }
  .mw-lead__tx { padding-top: 6px; }
  .mw-top__rail { padding-left: 0; }
  .mw-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; }
  .mw-catbs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; }
  .mw-catb .mw-card { grid-template-columns: 1fr; }
  .mw-catb .mw-card__img { grid-column: 1; grid-row: 1; width: 100%; }
  .mw-catb .mw-card__tx { grid-column: 1; grid-row: 2; }
  .mw-catb .mw-card__t { font-size: 18px; }
  .mw-ad--wide .mw-ad__ph { min-height: 110px; }
  body.mw.mw-rail .site-content { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 56px; align-items: start; }
  body.mw.mw-rail .is-right-sidebar { margin-top: 0; padding-top: 24px; height: 100%; }
  .mw-railbox { display: flex; flex-direction: column; gap: 32px; height: 100%; }
  .mw-railbox .mw-sticky { display: block; flex: 1; }
  .mw-railbox .mw-sticky .mw-ad { position: sticky; top: 76px; margin: 0; }
  body.mw.single .site-main { padding-top: 32px; }
  body.mw.single .inside-article { max-width: var(--read); }
}

@media (prefers-reduced-motion: reduce) {
  .mw-card__img img, .mw-thumb img, .mw-lead__img img, .mw-toc summary::after, .mw-toast { transition: none; }
  .mw-card:hover .mw-card__img img, article:hover .mw-thumb img, .mw-lead:hover .mw-lead__img img { transform: none; }
}
@media print {
  .mw-nav, .mw-search, .mw-related, .mw-toc, .mw-ad, .site-footer, .is-right-sidebar, .mw-tools { display: none !important; }
}
