/*
Theme Name: GeneratePress Nocturne
Theme URI: https://generatepress.com/
Description: GeneratePress 자식 테마. 밝은 지면과 어두운 지면 위에 은은한 광원과 유리질 내비게이션, 큼직한 디스플레이 제목을 얹은 2026년형 스타일입니다. 글 목록은 첫 글을 크게 두는 벤토 배치, 낱글은 읽기 진행 표시와 넓은 행간으로 구성했습니다. 지면은 라이트(기본) · 다크 · 자동(기기 설정) 셋 중에 고르고, 강조색은 오로라 · 엠버 · 플럭스 · 모스 네 가지를 사용자정의하기에서 전환합니다.
Author: gwang
Author URI: https://example.com
Template: generatepress
Version: 1.0.20
Requires at least: 6.0
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: generatepress-nocturne
Tags: blog, one-column, two-columns, custom-menu, custom-colors, editor-style, translation-ready, full-width-template, featured-images
*/

/* =========================================================
   읽는 순서
   01 토큰 → 02 지면 모드 → 03 지면 → 04 헤더 · 내비 →
   05 글 목록 → 06 낱글 → 07 본문 → 08 사이드바 → 09 푸터 →
   10 댓글 · 폼 → 11 페이지네이션 · 404 → 12 나머지

   색은 전부 01~02 에서 변수로 정합니다. 아래 규칙은 변수만 쓰므로
   팔레트를 하나 더 만들려면 01 에 블록 하나만 추가하면 됩니다.
   ========================================================= */

/* =========================================================
   01. 토큰
   ========================================================= */

:root {
	--n-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
		"Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
	--n-display: "Instrument Sans", "Pretendard Variable", Pretendard, -apple-system,
		"Apple SD Gothic Neo", system-ui, sans-serif;
	--n-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, "D2Coding", monospace;

	/* 지면 폭. 사용자정의하기 > 레이아웃 > 컨테이너 너비와 맞춰 두세요. */
	--n-wrap: 1200px;

	/* 모서리 — 카드는 크게, 작은 요소는 절반 */
	--n-r: 18px;
	--n-r-sm: 10px;
	--n-r-pill: 999px;

	--n-gap: clamp(1.25rem, 2.4vw, 2rem);

	/* 본문 세로 리듬. 되돌리려면 아래 두 줄만 고치면 됩니다 —
	   규칙은 건드릴 필요 없이 여기 값만 바꾸면 전체에 반영됩니다.

	     --n-para  문단과 문단 사이     1.5em(원래) → 1.18em
	     --n-lead  소제목 바로 아래 첫 문단  1.5em(원래) → 0.9em

	   em 이라 문단 글자 크기(17px)에 비례합니다. 1.18em = 20px,
	   0.9em = 15.3px. px 로 적지 않고 em 으로 두는 이유는, 나중에 본문
	   글자 크기를 키웠을 때 여백도 같이 따라오게 하기 위해서입니다.
	   --n-lead 를 --n-para 보다 좁게 두는 이유는, 소제목과 첫 문단이
	   한 덩어리로 읽혀야 하기 때문입니다. */
	--n-para: 1.18em;
	--n-lead: .9em;

	/* 자주 묻는 질문의 Q · A. 위 두 값과 같은 방식으로 여기서만 고칩니다.

	     --n-qa-in   질문과 답 사이        0.6em = 10.2px
	     --n-qa-out  답과 다음 질문 사이   2em   = 34px  (2.6em 에서 줄임)

	   Q&A 는 두 조각이 한 묶음이라, 한 조각짜리인 일반 문단(--n-para)보다
	   묶음 사이가 넓어야 짝이 읽힙니다. --n-qa-out 을 --n-para 까지 낮추면
	   묶음 사이가 안쪽의 1.4배밖에 안 되어 짝이 흐려집니다. */
	--n-qa-in: .6em;
	--n-qa-out: 2em;

	/* 모바일 좌우 여백. 카드 좌우 선이 화면 끝에 붙어 안 보이지 않도록
	   테마가 직접 잡습니다. 여백을 바꾸려면 이 한 줄만 고치세요. */
	--n-edge: clamp(12px, 3.5vw, 16px);
	--n-block: clamp(2.75rem, 6vw, 5rem);

	--n-hair: 1px;
	--n-ease: cubic-bezier(.22, .61, .36, 1);
}

/* 강조색.
   --a1 · --a2 는 그라디언트 양 끝, --a-lt 는 밝은 지면에서 글자색으로 쓸
   어두운 변형입니다. 흰 배경에 민트를 그대로 쓰면 대비가 3:1 도 안 나와서
   글자용은 따로 둡니다. */

body,
body.pal-aurora {
	--a1: #5ee1c4;
	--a2: #6aa6ff;
	--a-lt: #0d7a8c;
}

body.pal-ember {
	--a1: #ffb457;
	--a2: #ff6b57;
	--a-lt: #b4451f;
}

body.pal-flux {
	--a1: #a78bfa;
	--a2: #f472b6;
	--a-lt: #6d28d9;
}

body.pal-moss {
	--a1: #a3e635;
	--a2: #34d399;
	--a-lt: #3f6212;
}

/* =========================================================
   02. 지면 모드

   기본은 라이트. 다크는 body.n-dark, 자동은 body.n-auto 가 붙습니다.
   자동은 라이트 값을 물려받고 있다가 기기가 다크일 때만 어두워집니다.
   ========================================================= */

body,
body.n-light,
body.n-auto {
	color-scheme: light;

	--bg: #fbfbfc;
	--surface: #ffffff;
	--surface-2: #f4f5f8;
	--text: #14171d;
	--muted: #58606e;
	--faint: #8b93a1;
	--line: rgba(10, 13, 20, .10);
	--line-strong: rgba(10, 13, 20, .18);
	--accent: var(--a-lt);
	--on-accent: #ffffff;

	--glow: .13;
	--shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 24px -12px rgba(16, 24, 40, .16);
	--shadow-lift: 0 2px 4px rgba(16, 24, 40, .06), 0 22px 44px -16px rgba(16, 24, 40, .22);
}

body.n-dark {
	color-scheme: dark;

	--bg: #0a0b0f;
	--surface: #111319;
	--surface-2: #171a21;
	--text: #e8eaef;
	--muted: #9aa2af;
	--faint: #6b7280;
	--line: rgba(255, 255, 255, .09);
	--line-strong: rgba(255, 255, 255, .17);
	--accent: var(--a1);
	--on-accent: #07090d;

	--glow: .34;
	--shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px -12px rgba(0, 0, 0, .7);
	--shadow-lift: 0 2px 4px rgba(0, 0, 0, .5), 0 24px 48px -16px rgba(0, 0, 0, .85);
}

@media (prefers-color-scheme: dark) {
	body.n-auto {
		color-scheme: dark;

		--bg: #0a0b0f;
		--surface: #111319;
		--surface-2: #171a21;
		--text: #e8eaef;
		--muted: #9aa2af;
		--faint: #6b7280;
		--line: rgba(255, 255, 255, .09);
		--line-strong: rgba(255, 255, 255, .17);
		--accent: var(--a1);
		--on-accent: #07090d;

		--glow: .34;
		--shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px -12px rgba(0, 0, 0, .7);
		--shadow-lift: 0 2px 4px rgba(0, 0, 0, .5), 0 24px 48px -16px rgba(0, 0, 0, .85);
	}
}

/* =========================================================
   03. 지면
   ========================================================= */

body {
	background-color: var(--bg);
	color: var(--text);
	font-family: var(--n-sans);
	font-size: 1.0625rem;   /* 17px. 한글은 16px 이 조금 답답합니다. */
	line-height: 1.75;
	letter-spacing: -.005em;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* 위쪽 광원. 스크롤을 따라오지 않게 fixed 로 깔고, 맨 뒤로 보낸 뒤
   pointer-events 를 꺼서 클릭을 가로채지 않게 합니다. */
body::before {
	content: "";
	position: fixed;
	inset: -18vh 0 auto 0;
	height: 88vh;
	z-index: -1;
	pointer-events: none;
	opacity: var(--glow);
	background:
		radial-gradient(52vw 42vh at 16% 0%, var(--a1), transparent 68%),
		radial-gradient(46vw 38vh at 86% 8%, var(--a2), transparent 66%);
	filter: blur(24px);
}

body.n-noglow::before { content: none; }

.grid-container {
	max-width: var(--n-wrap);
}

a {
	color: var(--accent);
	text-underline-offset: .22em;
	text-decoration-thickness: 1px;
	transition: color .18s var(--n-ease), opacity .18s var(--n-ease);
}

a:hover,
a:focus {
	color: var(--accent);
	opacity: .75;
}

::selection {
	background: color-mix(in srgb, var(--a1) 32%, transparent);
	color: var(--text);
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

hr,
.wp-block-separator {
	border: 0;
	border-top: var(--n-hair) solid var(--line);
	margin: var(--n-block) 0;
}

/* GP 는 컨테이너 배경을 사용자정의하기 값으로 인라인 출력합니다.
   자식 테마 쪽 지면색이 이기도록 여기서 한 번 눌러 둡니다. */
.separate-containers .site-main > *,
.separate-containers .paging-navigation,
.one-container .site-content {
	background-color: transparent;
}

/* =========================================================
   04. 헤더 · 내비게이션
   ========================================================= */

/* 로고 위아래 여백은 테마가 직접 정합니다.

   처음에는 GP 의 '레이아웃 > 헤더 > 헤더 패딩' 에 맡겼는데, 그 값이 사이트마다
   달라서 어떤 곳은 로고 위가 80px, 어떤 곳은 붙어 버렸습니다. 여백 주인이
   둘이면 예측이 안 되므로 여기서 한 번에 정하고, 아래위 좌우 중 위아래만
   덮어씁니다(넓은 화면의 좌우는 GP 값 그대로 — 컨테이너 정렬에 쓰입니다.
   768px 아래 좌우는 위 --n-edge 규칙이 카드와 같은 선으로 맞춥니다).

   값을 바꾸고 싶으면 이 두 줄을 고치세요. GP 설정으로는 바뀌지 않습니다. */
.site-header .inside-header {
	padding-top: clamp(1.75rem, 3.5vw, 2.5rem);
	padding-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

/* 헤더 자체는 여백을 갖지 않습니다. 아래 여백은 내비게이션이 margin-top 으로
   가집니다. 헤더에 붙여 두면 메뉴가 없는 사이트에서 내비만 사라지고
   여백은 남아 로고 밑이 텅 비어 보입니다. */
.site-header {
	background: transparent;
	padding-top: 0;
	padding-bottom: 0;
}

.site-header .inside-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}

/* GeneratePress 는 사이트 제목을 .site-title 이 아니라 .main-title 로 내보냅니다.
   첫 화면은 <h1 class="main-title">, 나머지 페이지는 <p class="main-title">.
   .main-title 을 같이 잡지 않으면 제목이 사용자정의하기 색을 그대로 써서
   어두운 지면에서 안 보입니다. */
.site-title,
.main-title {
	font-family: var(--n-display);
	font-size: clamp(1.25rem, 2.2vw, 1.55rem);
	font-weight: 640;
	letter-spacing: -.03em;
	line-height: 1.2;
	margin: 0;
}

.site-title a,
.site-title a:hover,
.main-title a,
.main-title a:hover {
	color: var(--text);
	text-decoration: none;
	opacity: 1;
}

.site-description {
	margin: .3rem 0 0;
	color: var(--muted);
	font-size: .8125rem;
	letter-spacing: 0;
}

/* 메뉴를 배정하지 않으면 GP 는 링크 없는 <nav> 를 그대로 내보냅니다.
   (모바일 햄버거를 담는 .mobile-menu-control-wrapper 도 링크가 없습니다.)
   여기에 알약 옷을 입히면 흰 지면에 흰 막대가 깔려 눈에는 안 보이는데
   자리만 80px 쯤 먹습니다.

   요소를 display:none 으로 지우면 안 됩니다 — 그 안에 모바일 메뉴 버튼이
   들어 있어서 메뉴가 있는 사이트의 햄버거까지 같이 사라집니다.
   그래서 감추는 대신 알약 옷만 벗깁니다. 버튼은 그대로 남고, 데스크톱에서는
   GP 가 버튼을 숨기므로 높이가 0 이 됩니다. */
.main-navigation:not(:has(a)) {
	margin-top: 0;
	margin-bottom: 0;
}

.main-navigation:not(:has(a)) .inside-navigation {
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

/* 내비를 헤더 '안' 에 넣는 배치(레이아웃 > 내비게이션 > 부동 오른쪽/왼쪽).
   이때는 알약이 헤더 안에서 로고 옆에 놓이므로, 지면 폭에 맞춰 가운데로
   미는 규칙과 위아래 여백을 빼야 로고와 같은 줄에 앉습니다. */
body[class*="nav-float-"] .main-navigation {
	margin-top: 0;
	margin-bottom: 0;
}

body[class*="nav-float-"] .main-navigation .inside-navigation {
	max-width: none;
	margin: 0;
}

/* 링크가 든 진짜 내비 막대가 있으면 링크 줄은 숨깁니다.
   functions.php 는 GP 가 막대를 채울지 미리 알 수 없어 일단 내보내는데,
   그 판단을 여기서 대신합니다. 두 막대가 같이 보이는 일은 없습니다. */
body:has(.main-navigation a) .n-quicklinks {
	display: none;
}

/* 막대(내비든 링크 줄이든)가 없을 때 헤더 아래 여백.

   한동안 여기서 여백을 줄였습니다. 그런데 로고 밑이 벌어지던 진짜 원인은
   여백이 아니라 링크 없는 빈 <nav> 에 알약 옷을 입힌 것이었고, 그건 위에서
   해결됐습니다. 줄일 이유가 사라졌으므로 padding-bottom 을 따로 덮어쓰지
   않습니다. 그러면 위(40px)와 같은 값이 되어 로고가 위아래 대칭이 됩니다.

   대신 GP 가 헤더와 첫 카드 사이에 얹는 여백 한 겹은 걷어냅니다.
   그것까지 더해지면 사이트마다 총합이 달라져 예측이 안 됩니다. */
body:not(:has(.main-navigation a, .n-quicklinks a)).separate-containers .site-content {
	padding-top: 0;
}

body:not(:has(.main-navigation a, .n-quicklinks a)).separate-containers .site-main {
	margin-top: 0;
}

/* 좁은 화면 좌우 여백.

   이 값을 GP 에 맡기면 사이트마다 달라집니다. 컨테이너 · 콘텐츠 패딩 설정이
   제각각이라 어떤 곳은 카드가 화면 끝에 딱 붙고, 그러면 위아래 선만 보이고
   좌우 선이 잘려 카드로 보이지 않습니다. 헤더 패딩과 같은 이유로 테마가
   직접 정하고, GP 가 따로 얹는 좌우 여백은 지워 값이 겹치지 않게 합니다.
   머리글 · 내비 · 본문 · 사이드바 · 푸터가 --n-edge 한 값을 같이 씁니다. */
@media (max-width: 768px) {
	/* .grid-container 를 기준으로 삼으면 안 됩니다. GP 는 '컨테이너 = 전체 폭'
	   으로 둔 화면에는 그 클래스를 붙이지 않아서, 낱글에는 여백이 들어가는데
	   목록 · 메인 화면에는 안 들어가는 일이 생깁니다(1.0.14 에서 실제로
	   그랬습니다). 설정과 무관하게 항상 있는 감싸개를 직접 잡습니다. */
	.site-content,
	.site-header .inside-header,
	.footer-widgets-container,
	.inside-site-info {
		padding-left: var(--n-edge);
		padding-right: var(--n-edge);
	}

	.separate-containers .site-main,
	.separate-containers .widget-area {
		margin-left: 0;
		margin-right: 0;
	}

	/* 내비 알약은 감싸개 밖에 있어서 따로 맞춰 줍니다.
	   아래 04 절의 margin: 0 auto 가 이 규칙보다 뒤에 오므로, 같은 무게로는
	   집니다. body 를 하나 얹어 무게를 올립니다. */
	body .main-navigation .inside-navigation,
	body .n-quicklinks .inside-navigation {
		margin-left: var(--n-edge);
		margin-right: var(--n-edge);
	}
}

/* 내비는 헤더에서 떼어내 알약 막대로 띄웁니다.
   GP 가 내비를 헤더 밖 형제 요소로 출력하므로 여기서 따로 잡습니다. */
/* .n-quicklinks 는 메뉴가 없을 때 functions.php 가 대신 깔아 주는 링크 줄입니다.
   내비와 같은 알약이라 규칙을 같이 씁니다. */
.main-navigation,
.n-quicklinks {
	background: transparent;
	margin-top: clamp(1.1rem, 2.4vw, 1.9rem);
	margin-bottom: clamp(1.75rem, 3.5vw, 3rem);
}

.main-navigation .inside-navigation,
.n-quicklinks .inside-navigation {
	max-width: var(--n-wrap);
	margin: 0 auto;
	padding: .3rem;
	display: flex;
	align-items: center;
	gap: .25rem;
	background: color-mix(in srgb, var(--surface) 74%, transparent);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r-pill);
	box-shadow: var(--shadow);
	backdrop-filter: saturate(160%) blur(14px);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
}

.main-navigation .main-nav > ul,
.n-quicklinks ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .15rem;
}

.main-navigation .main-nav ul li a,
.n-quicklinks li a {
	display: block;
	padding: .55rem 1rem;
	border-radius: var(--n-r-pill);
	color: var(--muted);
	font-size: .9rem;
	font-weight: 500;
	letter-spacing: -.01em;
	line-height: 1.45;
	text-decoration: none;
	transition: background-color .18s var(--n-ease), color .18s var(--n-ease);
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li a:focus,
.main-navigation .main-nav ul li.sfHover > a,
.n-quicklinks li a:hover,
.n-quicklinks li a:focus {
	background: var(--surface-2);
	color: var(--text);
	opacity: 1;
}

.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-parent > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a,
.n-quicklinks li.current-menu-item > a {
	background: var(--text);
	color: var(--bg);
}

.main-navigation ul ul {
	background: var(--surface);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r-sm);
	box-shadow: var(--shadow-lift);
	padding: .3rem;
	margin-top: .4rem;
	min-width: 12rem;
}

.main-navigation ul ul li a {
	border-radius: 6px;
	padding: .5rem .7rem;
}

.main-navigation .menu-toggle {
	border-radius: var(--n-r-pill);
	color: var(--text);
	font-weight: 500;
	letter-spacing: -.01em;
	background: transparent;
}

/* 스크롤하면 상단에 붙습니다. n-scrolled 는 theme.js 가 붙입니다. */
body.n-sticky .main-navigation,
body.n-sticky .n-quicklinks {
	position: sticky;
	top: .7rem;
	z-index: 200;
}

body.n-sticky.n-scrolled .main-navigation .inside-navigation,
body.n-sticky.n-scrolled .n-quicklinks .inside-navigation {
	background: color-mix(in srgb, var(--bg) 84%, transparent);
	border-color: var(--line-strong);
}

/* 읽기 진행 표시 */
.n-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 2px;
	width: 100%;
	z-index: 400;
	transform: scaleX(var(--n-read, 0));
	transform-origin: 0 50%;
	background: linear-gradient(90deg, var(--a1), var(--a2));
	pointer-events: none;
}

/* =========================================================
   05. 글 목록 — 벤토 배치

   첫 글만 두 칸을 쓰고 나머지는 한 칸. 목록 화면(홈 · 아카이브 ·
   검색)에서만 켜지도록 body 클래스를 하나 더 확인합니다.
   ========================================================= */

body.n-bento .site-main {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--n-gap);
	align-items: start;
}

/* 페이지네이션 · 아카이브 머리글은 격자를 가로지릅니다. */
body.n-bento .site-main > .page-header,
body.n-bento .site-main > .paging-navigation,
body.n-bento .site-main > .no-results {
	grid-column: 1 / -1;
}

body.n-bento .site-main > article:first-of-type {
	grid-column: 1 / -1;
}

@media (max-width: 768px) {
	body.n-bento .site-main {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* 카드 */
.separate-containers .inside-article,
body.n-bento article .inside-article {
	position: relative;
	height: 100%;
	padding: clamp(1.4rem, 2.6vw, 2rem);
	background: var(--surface);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: transform .25s var(--n-ease), border-color .25s var(--n-ease),
		box-shadow .25s var(--n-ease);
}

/* 카드 위쪽에 걸치는 얇은 강조선. hover 에서만 드러납니다. */
body.n-bento article .inside-article::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 2px;
	background: linear-gradient(90deg, var(--a1), var(--a2));
	opacity: 0;
	transition: opacity .25s var(--n-ease);
}

body.n-bento article:hover .inside-article {
	transform: translateY(-3px);
	border-color: var(--line-strong);
	box-shadow: var(--shadow-lift);
}

body.n-bento article:hover .inside-article::before { opacity: 1; }

/* 좁은 화면에서는 카드가 지면 폭을 거의 다 쓰기 때문에, 데스크톱에서 카드를
   띄워 주던 그림자만으로는 상자 경계가 잘 보이지 않습니다. 밝은 지면은
   --surface(#fff) 와 --bg(#fbfbfc) 가 거의 같은 색이라 더 그렇습니다.
   카드를 더 좁히면 한 줄에 들어가는 글자수가 줄어드니 폭은 그대로 두고,
   모바일에서만 테두리를 한 단계 진하게 써서 좌우 선이 드러나게 합니다.
   목록 카드 · 낱글 · 댓글 · 위젯이 같은 값을 씁니다. */
@media (max-width: 768px) {
	.separate-containers .inside-article,
	body.n-bento article .inside-article,
	.comments-area,
	.widget-area .widget {
		border-color: var(--line-strong);
	}
}

/* 첫 글은 이미지를 옆에 두고 가로로 폅니다.
   대표 이미지가 없는 글까지 2열로 쪼개면 발췌문만 오른쪽으로 튀고
   왼쪽 아래가 텅 비므로, 이미지가 있을 때만 격자를 켭니다. */
body.n-bento article:first-of-type:has(.post-image) .inside-article {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
	/* 두 번째 행을 1fr 로 둬야 이미지가 세로로 걸쳐도 첫 행이 같이 늘어나지
	   않습니다. auto auto 로 두면 제목과 요약 사이가 이유 없이 벌어집니다. */
	grid-template-rows: min-content 1fr;
	gap: .35rem clamp(1.25rem, 3vw, 2.5rem);
	align-items: start;
}

body.n-bento article:first-of-type:has(.post-image) .post-image {
	grid-column: 2;
	grid-row: 1 / -1;
	align-self: center;
	margin: 0;
}

@media (max-width: 900px) {
	body.n-bento article:first-of-type:has(.post-image) .inside-article {
		display: block;
	}

	body.n-bento article:first-of-type:has(.post-image) .post-image {
		margin-bottom: 1.25rem;
	}
}

/* 이미지가 없는 첫 글은 지면 전체 폭이라 한 줄이 너무 길어집니다. */
body.n-bento article:first-of-type:not(:has(.post-image)) .entry-summary {
	max-width: 62ch;
}

.post-image {
	margin-bottom: 1.1rem;
}

.post-image img {
	width: 100%;
	border-radius: var(--n-r-sm);
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform .4s var(--n-ease);
}

body.n-bento article:hover .post-image img {
	transform: scale(1.025);
}

/* 목록 안 제목 */
.site-main article:not(.page) .entry-title {
	font-family: var(--n-display);
	font-size: clamp(1.15rem, 1.9vw, 1.4rem);
	font-weight: 620;
	letter-spacing: -.025em;
	line-height: 1.35;
	margin: 0 0 .5rem;
	text-wrap: balance;
}

body.n-bento article:first-of-type .entry-title {
	font-size: clamp(1.6rem, 3.4vw, 2.35rem);
	line-height: 1.22;
	letter-spacing: -.035em;
}

.site-main article .entry-title a {
	color: var(--text);
	text-decoration: none;
}

.site-main article:hover .entry-title a {
	color: var(--accent);
	opacity: 1;
}

/* 메타 — 날짜 · 분류. 작은 글씨는 자간을 조금 벌려야 읽힙니다. */
.entry-meta {
	color: var(--faint);
	font-size: .78rem;
	letter-spacing: .01em;
	line-height: 1.6;
}

.entry-meta a {
	color: var(--muted);
	text-decoration: none;
}

.entry-meta a:hover {
	color: var(--accent);
	opacity: 1;
}

.entry-summary {
	color: var(--muted);
	font-size: .95rem;
	line-height: 1.72;
	margin-top: .7rem;
}

.entry-summary p:last-child { margin-bottom: 0; }

.read-more,
.entry-summary .read-more {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	margin-top: .9rem;
	color: var(--text);
	font-size: .85rem;
	font-weight: 560;
	letter-spacing: -.01em;
	text-decoration: none;
}

.read-more::after {
	content: "→";
	transition: transform .2s var(--n-ease);
}

.read-more:hover {
	color: var(--accent);
	opacity: 1;
}

.read-more:hover::after { transform: translateX(3px); }

/* 아카이브 · 검색 머리글 */
.page-header {
	padding: 0 0 clamp(1rem, 2vw, 1.75rem);
	background: transparent;
	border: 0;
}

.page-header .page-title,
.page-header h1 {
	font-family: var(--n-display);
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	font-weight: 640;
	letter-spacing: -.03em;
	margin: 0;
}

.page-header .taxonomy-description {
	color: var(--muted);
	font-size: .95rem;
	margin-top: .5rem;
}

/* =========================================================
   06. 낱글 · 페이지
   ========================================================= */

body.single .separate-containers .inside-article,
body.page .separate-containers .inside-article {
	padding: clamp(1.75rem, 4vw, 3.25rem);
}

body.single .entry-header,
body.page .entry-header {
	margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
	padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
	border-bottom: var(--n-hair) solid var(--line);
}

body.single .entry-title,
body.page .entry-title {
	font-family: var(--n-display);
	font-size: clamp(1.85rem, 4.4vw, 3rem);
	font-weight: 660;
	letter-spacing: -.04em;
	line-height: 1.16;
	margin: 0 0 .85rem;
	text-wrap: balance;
}

body.single .entry-header .entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .9rem;
	font-size: .82rem;
}

/* 분류 · 태그는 알약으로 */
.entry-meta .cat-links a,
.entry-meta .tags-links a {
	display: inline-block;
	padding: .2rem .65rem;
	margin: 0 .15rem .2rem 0;
	background: var(--surface-2);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r-pill);
	color: var(--muted);
	font-size: .74rem;
	letter-spacing: .01em;
}

.entry-meta .cat-links a:hover,
.entry-meta .tags-links a:hover {
	border-color: var(--accent);
	color: var(--accent);
	opacity: 1;
}

/* 대표 이미지 */
body.single .post-image {
	margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
}

body.single .post-image img {
	aspect-ratio: auto;
	border-radius: var(--n-r-sm);
}

/* 이전 글 · 다음 글 */
.post-navigation,
.paging-navigation {
	margin-top: var(--n-gap);
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--n-gap);
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	display: block;
	padding: 1.1rem 1.25rem;
	background: var(--surface);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r-sm);
	color: var(--text);
	font-size: .92rem;
	font-weight: 500;
	letter-spacing: -.015em;
	line-height: 1.5;
	text-decoration: none;
	transition: border-color .2s var(--n-ease), transform .2s var(--n-ease);
}

.post-navigation a:hover {
	border-color: var(--line-strong);
	transform: translateY(-2px);
	opacity: 1;
}

.post-navigation .nav-next {
	text-align: right;
}

/* =========================================================
   07. 본문

   여기서부터가 글을 읽는 시간의 대부분입니다. 나머지를 다 손봐도
   이 절이 어긋나면 사이트가 싸구려로 보입니다.
   ========================================================= */

.entry-content {
	font-size: 1.0625rem;
	line-height: 1.85;
	letter-spacing: -.003em;
	word-break: keep-all;      /* 한글은 어절 단위로 끊어야 읽힙니다. */
	overflow-wrap: break-word;
}

.entry-content > * + * {
	margin-top: 1.5em;
}

.entry-content p {
	margin: 0;
	color: color-mix(in srgb, var(--text) 92%, var(--muted));
}

/* 문단 사이 간격 (--n-para).

   위 흐름 규칙(.entry-content > * + *)만으로는 문단에 걸리지 않습니다.
   바로 위 .entry-content p 가 무게가 한 단계 높아서(클래스 1 + 요소 1 대
   클래스 1) margin: 0 이 이겨 버리고, 그 결과 붙어 있는 두 문단 사이가
   0px 이 됩니다. 줄 간격만 남아 문단이 나뉘어 있어도 한 덩어리로 보입니다.

   같은 무게로 문단만 다시 잡아 줍니다. 목록 · 표 다음에 오는 문단에도
   똑같이 걸리도록 p + p 가 아니라 * + p 로 적습니다. */
.entry-content > * + p {
	margin-top: var(--n-para);
}

/* 소제목 바로 아래 첫 문단 (--n-lead).

   소제목과 첫 문단은 한 덩어리입니다. 둘 사이가 문단 사이와 같은 값이면
   소제목이 아래 내용에 속한 것인지 위 구역의 끝인지 애매해집니다.
   요소 선택자 둘(h2 + p)이라 위 흐름 규칙보다 무게가 높아 이깁니다. */
.entry-content > :is(h2, h3, h4) + :is(p, ul, ol, table, blockquote) {
	margin-top: var(--n-lead);
}

/* 굵은 한 줄 + 그 설명 — 자주 묻는 질문의 Q · A 가 대표적입니다.

   질문과 답 사이, 답과 다음 질문 사이가 둘 다 1.5em 이면 문단 셋이 그냥
   나란히 놓인 것으로만 보입니다. 묶음 안은 좁히고 묶음 사이는 벌려야
   '이 답은 이 질문의 것' 이라는 짝이 눈에 먼저 들어옵니다.

   문단 전체가 굵은 줄을 질문으로 봅니다. 마크다운 **Q. …** 한 줄이
   <p><strong>…</strong></p> 로 변환되므로 :has 로 그 모양을 잡습니다.
   Q&A 뿐 아니라 '굵은 소항목 + 설명' 구조 어디에나 같이 걸립니다. */
.entry-content > p:has(> strong:only-child) + p {
	margin-top: var(--n-qa-in);
}

/* 앞이 문단일 때만 벌립니다. 소제목 바로 아래 첫 질문까지 2.6em 을 주면
   질문이 소제목에서 떨어져 나온 것처럼 보입니다. */
.entry-content > p + p:has(> strong:only-child) {
	margin-top: var(--n-qa-out);
}

.entry-content > h2,
.entry-content > h3,
.entry-content > h4 {
	font-family: var(--n-display);
	color: var(--text);
	letter-spacing: -.03em;
	line-height: 1.3;
	text-wrap: balance;

	/* 브라우저가 소제목에 기본으로 주는 아래 여백(0.83em ≈ 18.7px)을
	   지웁니다. 이것이 남아 있으면 아래 --n-lead 규칙과 여백이 겹쳐
	   (둘 중 큰 값이 이깁니다) 소제목 아래 간격을 조절할 수 없습니다. */
	margin-bottom: 0;
}

.entry-content > h2 {
	/* em 이라 h2 글자 크기에 비례합니다. 1.8em = 46px(데스크톱) · 38px(모바일).
	   아래 문단 간격(1.5em = 25px)의 세 배쯤 — 소제목이 아래 내용에 속한다는
	   것이 읽히는 선. 더 벌리면 앞 문단에 붙은 것처럼 애매해집니다. */
	margin-top: 1.8em;
	font-size: clamp(1.32rem, 2.5vw, 1.6rem);
	font-weight: 640;
	padding-top: 1.4rem;
	border-top: var(--n-hair) solid var(--line);
}

/* 소제목 앞의 짧은 강조 막대. ::before 로 얹어서 마크업은 건드리지 않습니다. */
.entry-content > h2::before {
	content: "";
	display: block;
	width: 30px;
	height: 3px;
	margin-bottom: .85rem;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--a1), var(--a2));
}

.entry-content > h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.entry-content > h3 {
	margin-top: 2em;
	font-size: clamp(1.12rem, 2vw, 1.28rem);
	font-weight: 620;
}

.entry-content > h4 {
	margin-top: 1.8em;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--muted);
}

/* 본문 링크는 밑줄을 남깁니다. 색만으로 구분하면 못 보는 사람이 있습니다. */
.entry-content a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
	text-decoration-thickness: 1.5px;
	font-weight: 500;
}

.entry-content a:hover {
	text-decoration-color: var(--accent);
	opacity: 1;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.35em;
}

.entry-content li + li {
	margin-top: .5em;
}

.entry-content li::marker {
	color: var(--faint);
}

.entry-content ul li::marker {
	color: var(--accent);
}

.entry-content strong {
	font-weight: 640;
	color: var(--text);
}

.entry-content em {
	font-style: normal;
	background: linear-gradient(transparent 62%, color-mix(in srgb, var(--a1) 26%, transparent) 0);
	padding: 0 .1em;
}

/* 인용 */
.entry-content blockquote,
.wp-block-quote {
	margin-left: 0;
	margin-right: 0;
	padding: .3rem 0 .3rem 1.35rem;
	border-left: 3px solid transparent;
	border-image: linear-gradient(180deg, var(--a1), var(--a2)) 1;
	color: var(--muted);
	font-size: 1.02rem;
	font-style: normal;
}

.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content blockquote cite {
	display: block;
	margin-top: .6rem;
	color: var(--faint);
	font-size: .82rem;
	font-style: normal;
}

/* 코드 */
.entry-content code {
	padding: .12em .4em;
	background: var(--surface-2);
	border: var(--n-hair) solid var(--line);
	border-radius: 5px;
	font-family: var(--n-mono);
	font-size: .88em;
	word-break: break-all;
}

.entry-content pre {
	padding: 1.15rem 1.3rem;
	background: var(--surface-2);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r-sm);
	font-family: var(--n-mono);
	font-size: .86rem;
	line-height: 1.7;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.entry-content pre code {
	padding: 0;
	background: none;
	border: 0;
	font-size: inherit;
}

/* 표 — 모바일에서 넘칠 때를 대비해 감싸는 요소에 스크롤을 둡니다. */
.entry-content table,
.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: .95rem;
	line-height: 1.6;
}

.entry-content th,
.entry-content td {
	padding: .75rem .9rem;
	border-bottom: var(--n-hair) solid var(--line);
	text-align: left;
	vertical-align: top;
}

.entry-content thead th {
	background: var(--surface-2);
	color: var(--text);
	font-weight: 600;
	font-size: .85rem;
	letter-spacing: .01em;
	border-bottom-color: var(--line-strong);
}

.entry-content tbody tr:last-child td {
	border-bottom: 0;
}

.wp-block-table {
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r-sm);
	overflow: hidden;
	overflow-x: auto;
}

/* 이미지 */
.entry-content img,
.wp-block-image img {
	height: auto;
	border-radius: var(--n-r-sm);
}

.entry-content figure {
	margin-left: 0;
	margin-right: 0;
}

.entry-content figcaption,
.wp-block-image figcaption {
	margin-top: .65rem;
	color: var(--faint);
	font-size: .82rem;
	line-height: 1.6;
	text-align: left;
}

/* 버튼 블록 */
.wp-block-button__link,
.entry-content .button,
button,
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	padding: .7rem 1.35rem;
	background: var(--text);
	border: 0;
	border-radius: var(--n-r-pill);
	color: var(--bg);
	font-family: inherit;
	font-size: .92rem;
	font-weight: 560;
	letter-spacing: -.01em;
	text-decoration: none;
	white-space: nowrap;   /* 좁은 칸에서 "검 색" 으로 쪼개지지 않게 */
	cursor: pointer;
	transition: transform .18s var(--n-ease), opacity .18s var(--n-ease);
}

.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
	transform: translateY(-1px);
	opacity: .9;
	color: var(--bg);
}

.is-style-outline .wp-block-button__link {
	background: transparent;
	border: var(--n-hair) solid var(--line-strong);
	color: var(--text);
}

/* 안내 상자 — 회색 배경 그룹 블록을 카드처럼 */
.wp-block-group.has-background,
.entry-content .wp-block-group.is-style-card {
	padding: clamp(1.1rem, 2.4vw, 1.6rem);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r-sm);
}

/* =========================================================
   08. 사이드바 위젯
   ========================================================= */

.widget-area .widget {
	padding: 1.35rem 1.4rem;
	margin-bottom: var(--n-gap);
	background: var(--surface);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r);
	font-size: .93rem;
}

/* 사이드바 · 푸터 위젯 제목을 같이 잡습니다. 둘이 다르면 산만해집니다. */
.widget-title {
	margin: 0 0 .9rem;
	color: var(--muted);
	font-size: .74rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.widget-area .widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget-area .widget li {
	padding: .45rem 0;
	border-bottom: var(--n-hair) solid var(--line);
	line-height: 1.55;
}

.widget-area .widget li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.widget-area .widget a {
	color: var(--text);
	text-decoration: none;
}

.widget-area .widget a:hover {
	color: var(--accent);
	opacity: 1;
}

/* 위젯 안 태그 구름은 알약으로 */
.wp-block-tag-cloud a,
.tagcloud a {
	display: inline-block;
	margin: 0 .25rem .4rem 0;
	padding: .25rem .7rem;
	background: var(--surface-2);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r-pill);
	font-size: .78rem !important;   /* 워드프레스가 인라인으로 크기를 넣습니다. */
	color: var(--muted);
}

/* '최근 댓글' 위젯의 "보여줄 댓글이 없습니다." 문장.

   문장만 없앱니다. 위젯 자체는 그대로 둡니다.
   실제 삭제는 functions.php 가 HTML 을 내보내기 전에 처리하고, 이 규칙은
   캐시된 옛 HTML 이나 필터가 닿지 않는 경로를 위한 대비입니다.

   댓글이 달리면 no-comments 클래스가 빠지므로 목록은 정상으로 나옵니다. */
.wp-block-latest-comments.no-comments {
	display: none;
}

/* 스크롤을 따라오는 사이드바. 짧은 화면에서는 켜지 않습니다. */
@media (min-width: 1025px) {
	body.n-stickybar .inside-right-sidebar,
	body.n-stickybar .inside-left-sidebar {
		position: sticky;
		top: 5.5rem;
	}
}

/* =========================================================
   09. 푸터
   ========================================================= */

.site-footer {
	margin-top: var(--n-block);
	background: transparent;
	border-top: var(--n-hair) solid var(--line);
}

.site-footer .footer-widgets {
	padding: clamp(2rem, 4vw, 3.25rem) 0 0;
	background: transparent;
}

.site-footer .footer-widgets .widget {
	background: transparent;
	border: 0;
	padding: 0;
	font-size: .92rem;
}

.site-footer .widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer .widget li {
	padding: .3rem 0;
	line-height: 1.6;
}

.site-footer .widget a {
	color: var(--muted);
	text-decoration: none;
}

.site-footer .widget a:hover {
	color: var(--accent);
	opacity: 1;
}

.site-footer .site-info {
	padding: clamp(1.5rem, 3vw, 2.25rem) 0;
	background: transparent;
	color: var(--faint);
	font-size: .82rem;
	letter-spacing: 0;
}

.site-footer .site-info a {
	color: var(--muted);
	text-decoration: none;
}

.site-footer .site-info a:hover {
	color: var(--accent);
	opacity: 1;
}

/* =========================================================
   10. 댓글 · 입력 폼
   ========================================================= */

.comments-area {
	margin-top: var(--n-gap);
	padding: clamp(1.5rem, 3.5vw, 2.5rem);
	background: var(--surface);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r);
}

.comments-title,
.comment-reply-title {
	font-family: var(--n-display);
	font-size: 1.2rem;
	font-weight: 620;
	letter-spacing: -.025em;
	margin: 0 0 1.25rem;
}

.comment-list {
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.comment-list .comment-body {
	padding: 1.1rem 0;
	border-bottom: var(--n-hair) solid var(--line);
}

.comment-author .fn {
	font-weight: 600;
	font-style: normal;
	letter-spacing: -.01em;
}

.comment-metadata,
.comment-meta {
	color: var(--faint);
	font-size: .78rem;
}

.comment-list .avatar {
	border-radius: var(--n-r-pill);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
	width: 100%;
	padding: .7rem .9rem;
	background: var(--surface-2);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r-sm);
	color: var(--text);
	font-family: inherit;
	font-size: .95rem;
	transition: border-color .18s var(--n-ease), background-color .18s var(--n-ease);
}

input:focus,
textarea:focus,
select:focus {
	background: var(--surface);
	border-color: var(--accent);
	outline: none;
}

::placeholder {
	color: var(--faint);
	opacity: 1;
}

.search-form,
.wp-block-search__inside-wrapper {
	display: flex;
	gap: .5rem;
	border: 0;
}

/* 입력칸이 남는 폭을 다 가져갑니다.
   input 에 width:100% 가 걸려 있어서 그대로 두면 flex 가 버튼 쪽을 줄이는데,
   그러면 "검색" 이 두 줄로 쪼개져 동그란 덩어리처럼 보입니다.
   min-width:0 이 없으면 입력칸이 자기 기본 폭 아래로 안 줄어 같은 일이 납니다. */
.search-form > label,
.search-form input[type="search"],
.wp-block-search__inside-wrapper .wp-block-search__input {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
}

.search-form > label input[type="search"] {
	width: 100%;
}

/* 버튼은 글자 폭 그대로. 줄어들지도 늘어나지도 않습니다. */
.search-form input[type="submit"],
.search-form button[type="submit"],
.wp-block-search__button {
	flex: 0 0 auto;
}

/* =========================================================
   11. 페이지네이션 · 검색 결과 없음 · 404
   ========================================================= */

.paging-navigation .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	justify-content: center;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	height: 2.4rem;
	padding: 0 .7rem;
	background: var(--surface);
	border: var(--n-hair) solid var(--line);
	border-radius: var(--n-r-sm);
	color: var(--muted);
	font-size: .9rem;
	font-weight: 500;
	text-decoration: none;
}

.page-numbers:hover {
	border-color: var(--line-strong);
	color: var(--text);
	opacity: 1;
}

.page-numbers.current {
	background: var(--text);
	border-color: var(--text);
	color: var(--bg);
}

.no-results,
body.error404 .inside-article {
	text-align: center;
	padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 3vw, 2rem);
}

/* =========================================================
   12. 나머지

   맨 위로 버튼 · 모션 · 인쇄. 자잘하지만 없으면 티가 납니다.
   ========================================================= */

.generate-back-to-top {
	background: var(--surface);
	border: var(--n-hair) solid var(--line-strong);
	border-radius: var(--n-r-pill);
	color: var(--text);
	box-shadow: var(--shadow);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.generate-back-to-top:hover {
	background: var(--surface-2);
	color: var(--accent);
	opacity: 1;
}

/* 목록 카드가 화면에 들어올 때 살짝 떠오릅니다.
   지원하지 않는 브라우저는 그냥 처음부터 보이므로 안전합니다. */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		body.n-bento article .inside-article {
			animation: n-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 42%;
		}
	}
}

@keyframes n-rise {
	from { opacity: 0; transform: translateY(18px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

@media print {
	body::before,
	.main-navigation,
	.widget-area,
	.n-progress,
	.generate-back-to-top,
	.comments-area {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}

	.separate-containers .inside-article {
		border: 0;
		box-shadow: none;
		padding: 0;
	}
}
