/*
Theme Name: catmoa
Theme URI: https://catmoa.com/
Author: 아침산책 패시브인컴팀
Description: 고양이 집사를 위한 잡지형 블록 테마. 굵은 잉크 테두리, 치즈 오렌지, 고양이 얼굴과 발바닥으로 통일한 디자인. 사이트 편집기(외모 > 편집기)에서 색·글꼴·패턴을 고칠 수 있습니다.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 0.1.19
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: catmoa
Tags: block-theme, full-site-editing, blog, news
*/

/* ------------------------------------------------------------------
 * 0. 기본
 * ------------------------------------------------------------------ */
:root {
	--catmoa-ink: var(--wp--preset--color--ink, #17161A);
	--catmoa-paper: var(--wp--preset--color--paper, #FBFAF7);
	--catmoa-cheese: var(--wp--preset--color--cheese, #E8772E);
	--catmoa-cheese-light: var(--wp--preset--color--cheese-light, #F0A04B);
	--catmoa-blue: var(--wp--preset--color--blue, #2F3FB8);
	--catmoa-line: var(--wp--preset--color--line, #E7E3DC);
	--catmoa-muted: var(--wp--preset--color--muted, #4A4641);
	--catmoa-subtle: var(--wp--preset--color--subtle, #5E5A55);
	--catmoa-ease: cubic-bezier(.2, .8, .2, 1);
	--catmoa-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23E8772E'%3E%3Cellipse cx='12' cy='16.2' rx='5.6' ry='4.6'/%3E%3Cellipse cx='5.2' cy='10.2' rx='2.3' ry='2.9'/%3E%3Cellipse cx='9.4' cy='5.8' rx='2.3' ry='2.9'/%3E%3Cellipse cx='14.6' cy='5.8' rx='2.3' ry='2.9'/%3E%3Cellipse cx='18.8' cy='10.2' rx='2.3' ry='2.9'/%3E%3C/g%3E%3C/svg%3E");
	--catmoa-paw-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%2317161A'%3E%3Cellipse cx='12' cy='16.2' rx='5.6' ry='4.6'/%3E%3Cellipse cx='5.2' cy='10.2' rx='2.3' ry='2.9'/%3E%3Cellipse cx='9.4' cy='5.8' rx='2.3' ry='2.9'/%3E%3Cellipse cx='14.6' cy='5.8' rx='2.3' ry='2.9'/%3E%3Cellipse cx='18.8' cy='10.2' rx='2.3' ry='2.9'/%3E%3C/g%3E%3C/svg%3E");
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	word-break: keep-all;
	overflow-wrap: break-word;
}

/* 한국어 줄바꿈: 어절(띄어쓰기) 단위로만 끊는다. 한 줄보다 긴 낱말·URL 만 넘치는 지점에서 끊는다.
   WP 코어 블록 CSS 가 .wp-block-post-title·.wp-block-button__link 등에 word-break: break-word 를 직접 걸어
   body 에서 상속된 keep-all 을 덮는다("꼬 / 리" 처럼 단어 중간 줄바꿈, 로컬 WP E2E 2026-10-25 확인).
   그래서 요소마다 다시 건다. body :is(.클래스 …) 특이도(0,1,1)가 코어 규칙(0,1,0)보다 높다.
   편집기에서는 add_editor_style 이 body 를 .editor-styles-wrapper 로 바꿔 같은 규칙이 적용된다. */
body :is(
	h1, h2, h3, h4, h5, h6, p, li, dt, dd, th, td, caption, figcaption, blockquote, cite, label, button, summary, a, span, strong, em,
	.wp-block-post-title, .wp-block-post-excerpt, .wp-block-post-excerpt__excerpt, .wp-block-post-terms,
	.wp-block-button__link, .wp-element-button, .wp-block-navigation-item__content, .wp-block-site-title,
	.wp-block-table, .catmoa-table, .catmoa-answer, .catmoa-card-body, .is-style-catmoa-card, .catmoa-related__title,
	.editor-post-title, .editor-post-title__input, .wp-block-post-title__input
) {
	word-break: keep-all;
	overflow-wrap: break-word;
}
/* 긴 URL·코드·표 칸 안 링크: 띄어쓰기가 없어도 칸 밖으로 넘치지 않게(anywhere 는 최소 너비 계산에도 반영돼 표가 넓어지지 않는다). */
body :is(.wp-block-post-content, .catmoa-table, .wp-block-table, .editor-styles-wrapper) :is(a, code, kbd, samp),
body :is(th, td) :is(a, code) {
	overflow-wrap: anywhere;
}
body :is(pre, .wp-block-code) { white-space: pre-wrap; overflow-wrap: anywhere; }
.catmoa-table { overflow-x: auto; }

h1, h2, h3, .wp-block-post-title { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--catmoa-cheese-light); color: var(--catmoa-ink); }

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--catmoa-cheese);
	outline-offset: 3px;
	border-radius: 6px;
}

.skip-link.screen-reader-text:focus {
	background: var(--catmoa-ink);
	color: #fff;
}

/* 고정 폭 숫자 */
.catmoa-num { font-family: var(--wp--preset--font-family--number); font-weight: 700; letter-spacing: -0.03em; }

/* 작은 라벨(eyebrow) */
.catmoa-eyebrow {
	font-family: var(--wp--preset--font-family--number);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--catmoa-blue);
	margin: 0;
}

/* 알약 배지 */
.catmoa-pill,
.wp-block-post-terms.catmoa-pill a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--catmoa-ink);
	background: var(--wp--preset--color--mint, #E8F3D8);
	border: 2px solid var(--catmoa-ink);
	border-radius: 999px;
	padding: 6px 14px;
	text-decoration: none;
}
.wp-block-post-terms.catmoa-pill { background: none; border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wp-block-post-terms.catmoa-pill .wp-block-post-terms__separator { display: none; }
.wp-block-post-terms.catmoa-pill a:hover { background: var(--wp--preset--color--butter, #FFF1B8); color: var(--catmoa-ink); }

/* ------------------------------------------------------------------
 * 1. 움직임 (prefers-reduced-motion 이면 모두 끔)
 * ------------------------------------------------------------------ */
@keyframes catmoa-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes catmoa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes catmoa-bob { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-6px); } }
@keyframes catmoa-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes catmoa-peek { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* JS 가 html 에 catmoa-js 를 붙였을 때만 숨겼다가 화면에 들어오면 보인다(스크립트가 없어도 내용은 보임). */
.catmoa-js .catmoa-reveal { opacity: 0; }
.catmoa-js .catmoa-reveal.is-visible {
	animation: catmoa-rise .8s var(--catmoa-ease) both;
	animation-delay: var(--catmoa-delay, 0s);
}
.catmoa-js .catmoa-fade { opacity: 0; }
.catmoa-js .catmoa-fade.is-visible { animation: catmoa-fade 1.2s var(--catmoa-ease) both; animation-delay: var(--catmoa-delay, .2s); }
.catmoa-bob { animation: catmoa-bob 4s ease-in-out infinite; }

.catmoa-lift,
.catmoa-cards .wp-block-post,
.is-style-catmoa-card {
	transition: transform .28s var(--catmoa-ease), box-shadow .28s var(--catmoa-ease);
}
.catmoa-lift:hover,
.catmoa-lift:focus-within,
.catmoa-cards .wp-block-post:hover,
.catmoa-cards .wp-block-post:focus-within,
.is-style-catmoa-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 36px -16px rgba(23, 22, 26, .45);
}

.catmoa-cat-eyes { transform-origin: center 62px; animation: catmoa-blink 6s infinite; }

@media (prefers-reduced-motion: reduce) {
	.catmoa-js .catmoa-reveal,
	.catmoa-js .catmoa-fade { opacity: 1; }
	.catmoa-js .catmoa-reveal.is-visible,
	.catmoa-js .catmoa-fade.is-visible,
	.catmoa-bob,
	.catmoa-cat-eyes,
	.catmoa-404-cat { animation: none !important; }
	.catmoa-lift,
	.catmoa-cards .wp-block-post,
	.is-style-catmoa-card,
	.catmoa-share__btn,
	.wp-block-button__link { transition: none !important; }
	.catmoa-lift:hover,
	.catmoa-cards .wp-block-post:hover,
	.is-style-catmoa-card:hover { transform: none; }
	html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------
 * 2. 머리글 · 로고 · 검색
 * ------------------------------------------------------------------ */
.catmoa-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(251, 250, 247, .92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--catmoa-line);
}
.admin-bar .catmoa-header { top: var(--wp-admin--admin-bar--height, 32px); }

.catmoa-logo { display: flex; align-items: center; gap: 10px; }
.catmoa-logo .wp-block-html,
.catmoa-logo svg { flex: 0 0 auto; display: block; }
.catmoa-logo a { display: inline-flex; }
.catmoa-logo .wp-block-site-title a:hover { color: var(--catmoa-cheese); }

.catmoa-header .wp-block-navigation a:where(:not(.wp-element-button)) { padding: 6px 2px; position: relative; }
.catmoa-header .wp-block-navigation .current-menu-item > a::after,
.catmoa-header .wp-block-navigation a[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -10px;
	width: 14px;
	height: 14px;
	margin-left: -7px;
	background: var(--catmoa-paw) center / contain no-repeat;
}

/* 검색 버튼(아이콘 원형) */
.wp-block-search .wp-block-search__button {
	border: 2px solid var(--catmoa-ink);
	border-radius: 999px;
	background: var(--catmoa-ink);
	color: #fff;
	min-height: 44px;
	min-width: 44px;
	margin-left: 8px;
	font-weight: 700;
}
.wp-block-search .wp-block-search__button:hover { background: var(--catmoa-cheese); color: var(--catmoa-ink); }
.wp-block-search .wp-block-search__input {
	border: 2px solid var(--catmoa-ink);
	border-radius: 999px;
	padding: 10px 18px;
	min-height: 44px;
	background: #fff;
	font-family: inherit;
	font-size: 16px;
}
.catmoa-header .wp-block-search.wp-block-search__button-only .wp-block-search__button {
	background: #fff;
	color: var(--catmoa-ink);
	border: 1px solid var(--catmoa-line);
	margin-left: 0;
}
.catmoa-header .wp-block-search.wp-block-search__button-only .wp-block-search__button:hover { border-color: var(--catmoa-ink); }
.catmoa-header .wp-block-search__button-only:not(.wp-block-search__searchfield-hidden) .wp-block-search__input { min-width: 200px; }

/* ------------------------------------------------------------------
 * 3. 홈 섹션
 * ------------------------------------------------------------------ */
.catmoa-hero-title { font-size: clamp(44px, 6.4vw, 92px) !important; line-height: 1.02 !important; letter-spacing: -0.02em; }
.catmoa-hero-title .catmoa-accent,
.catmoa-accent { color: var(--catmoa-cheese); }
.catmoa-hero-lead { font-size: 19px; line-height: 1.7; color: var(--catmoa-muted); max-width: 30em; }

/* 오늘의 냥상식 카드(뒤에 치즈색 판) */
.catmoa-today { position: relative; min-height: 440px; }
.catmoa-today::before {
	content: "";
	position: absolute;
	inset: 24px 0 0 32px;
	border-radius: 36px;
	background: var(--catmoa-cheese);
}
.catmoa-today > .catmoa-today__card {
	position: relative;
	margin: 0 32px 24px 0 !important;
	min-height: 416px;
	border-radius: 36px;
	background: #fff;
	border: 2px solid var(--catmoa-ink);
	padding: 36px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 20px;
}
.catmoa-badge {
	align-self: flex-start;
	display: inline-block;
	background: var(--catmoa-blue);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	padding: 8px 16px;
	border-radius: 999px;
	margin: 0;
	line-height: 1.4;
}
.catmoa-today__cat { align-self: center; width: 46%; max-width: 200px; }
.catmoa-today__cat svg { width: 100%; height: auto; display: block; }
.catmoa-today__title { font-family: var(--wp--preset--font-family--display); font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; margin: 0; }

/* 숫자 카운트업 띠 */
.catmoa-stats .catmoa-stat {
	border-top: 2px solid #3A3833;
	padding-top: 20px;
}
.catmoa-stat__num {
	font-family: var(--wp--preset--font-family--number);
	font-weight: 700;
	font-size: clamp(48px, 5.4vw, 76px);
	line-height: 1;
	color: var(--catmoa-cheese-light);
	letter-spacing: -0.03em;
	margin: 0;
	font-variant-numeric: tabular-nums;
}
.catmoa-stat__unit { font-size: 22px; color: #fff; margin: 0 0 0 6px; line-height: 1; }
.catmoa-stat__label { color: #E9E6E0; font-size: 16px; line-height: 1.55; margin: 0; }

/* 섹션 머리 */
.catmoa-section-head { align-items: flex-end; }
.catmoa-section-title { font-size: clamp(34px, 4vw, 52px) !important; line-height: 1.1 !important; margin: 0; }
.catmoa-section-lead { color: var(--catmoa-muted); font-size: 17px; margin: 0; }
.catmoa-outline-pill {
	font-weight: 700;
	font-size: 14px;
	padding: 8px 14px;
	border-radius: 999px;
	border: 2px solid var(--catmoa-ink);
	margin: 0;
	line-height: 1.3;
}

/* 이번 주 이야기 — Query Loop 카드 */
.catmoa-cards .wp-block-post-template { gap: 24px; }
.catmoa-cards .wp-block-post {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 2px solid var(--catmoa-ink);
	border-radius: 28px;
	overflow: hidden;
	margin: 0;
}
.catmoa-cards .wp-block-post-featured-image,
.catmoa-cards .catmoa-thumb-fallback { margin: 0 !important; border-bottom: 2px solid var(--catmoa-ink); }
.catmoa-cards .wp-block-post-featured-image img {
	height: 200px;
	width: 100%;
	object-fit: cover;
	display: block;
}
.catmoa-thumb-fallback {
	height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--catmoa-tint, #FFE7CF);
}
.catmoa-thumb-fallback svg { width: 120px; height: auto; }
.catmoa-card-body { padding: 22px 24px 26px !important; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.catmoa-card-body > * { margin: 0 !important; }
.catmoa-cards .wp-block-post-title { font-family: var(--wp--preset--font-family--body); font-weight: 700; font-size: 21px; line-height: 1.4; letter-spacing: 0; }
.catmoa-cards .wp-block-post-title a { color: var(--catmoa-ink); text-decoration: none; }
/* 카드 전체를 누를 수 있게(제목 링크를 카드 크기로 늘림) */
.catmoa-cards .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 28px; }
.catmoa-cards .wp-block-post-terms { position: relative; z-index: 2; }
.catmoa-cards .wp-block-post-excerpt { color: var(--catmoa-muted); font-size: 15px; line-height: 1.6; }
.catmoa-cards .wp-block-post-excerpt__excerpt { margin: 0; }
.catmoa-cards .wp-block-post-excerpt__more-text { display: none; }

/* 털색 도감 */
.catmoa-coat {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px !important;
	padding: 22px 14px !important;
	border-radius: 24px;
	border: 2px solid var(--catmoa-ink);
	text-align: center;
}
.catmoa-coat > * { margin: 0 !important; }
.catmoa-coat svg { width: 96px; height: auto; display: block; }
.catmoa-coat__nick { font-family: var(--wp--preset--font-family--display); font-size: 24px; line-height: 1.2; }
.catmoa-coat__nick a { color: var(--catmoa-ink); text-decoration: none; }
.catmoa-coat__nick a::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }
.catmoa-coat__formal { font-size: 13px; color: #3E3A36; line-height: 1.4; }

/* 도구함 */
.catmoa-tools-section .catmoa-section-lead { color: #DCE0FF; }
.catmoa-tool {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px !important;
	padding: 28px !important;
	border-radius: 28px;
	background: #fff;
	color: var(--catmoa-ink);
}
.catmoa-tool > * { margin: 0 !important; }
.catmoa-tool svg { width: 40px; height: 40px; display: block; }
.catmoa-tool__name { font-family: var(--wp--preset--font-family--body); font-size: 20px; font-weight: 700; letter-spacing: 0; line-height: 1.4; }
.catmoa-tool__name a { color: var(--catmoa-ink); text-decoration: none; }
.catmoa-tool__name a::after { content: ""; position: absolute; inset: 0; border-radius: 28px; }
.catmoa-tool__desc { font-size: 15px; line-height: 1.6; color: var(--catmoa-muted); }

/* 냥서재 */
.catmoa-book {
	position: relative;
	display: flex;
	gap: 20px !important;
	align-items: stretch !important;
	padding: 20px !important;
	border-radius: 24px;
	background: #fff;
	border: 1px solid var(--catmoa-line);
	flex-wrap: nowrap !important;
}
.catmoa-book__cover {
	flex: 0 0 112px;
	min-height: 160px;
	border-radius: 6px 14px 14px 6px;
	border: 2px solid var(--catmoa-ink);
	display: flex;
	flex-direction: column;
	justify-content: space-between !important;
	padding: 14px 12px !important;
	box-shadow: inset 6px 0 0 rgba(23, 22, 26, .18);
}
.catmoa-book__cover > * { margin: 0 !important; }
.catmoa-book__short { font-family: var(--wp--preset--font-family--display); font-size: 17px; line-height: 1.25; }
.catmoa-book__year { font-family: var(--wp--preset--font-family--number); font-weight: 700; font-size: 13px; }
.catmoa-book__info { display: flex; flex-direction: column; gap: 8px !important; justify-content: center; }
.catmoa-book__info > * { margin: 0 !important; }
.catmoa-book__title { font-family: var(--wp--preset--font-family--body); font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.catmoa-book__title a { color: var(--catmoa-ink); text-decoration: none; }
.catmoa-book__title a::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }
.catmoa-book__author { font-size: 14px; color: var(--catmoa-subtle); }
.catmoa-book__dek { font-size: 15px; line-height: 1.6; color: var(--catmoa-muted); }

/* 북마크 안내 */
.catmoa-bookmark { border-radius: 40px; border: 2px solid var(--catmoa-ink); }
.catmoa-kbd {
	display: inline-block;
	font-family: var(--wp--preset--font-family--number);
	font-weight: 700;
	font-size: 28px;
	line-height: 1.2;
	padding: 14px 22px;
	border-radius: 16px;
	background: #fff;
	border: 2px solid var(--catmoa-ink);
	box-shadow: 0 5px 0 var(--catmoa-ink);
	margin: 0;
}

/* ------------------------------------------------------------------
 * 4. 글 본문 요소
 * ------------------------------------------------------------------ */
/* 한눈에 답 상자: 본문 <div class="catmoa-answer"> 또는 그룹 블록 스타일 */
.catmoa-answer,
.is-style-catmoa-answer {
	border-radius: 28px;
	background: var(--catmoa-ink);
	color: #fff;
	padding: 28px 32px !important;
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 20px;
	line-height: 1.65;
	margin-block: 32px;
}
.catmoa-answer > *,
.is-style-catmoa-answer > * { margin: 0 !important; }
.catmoa-answer a,
.is-style-catmoa-answer a { color: var(--catmoa-cheese-light); }
.catmoa-answer a:hover,
.is-style-catmoa-answer a:hover { color: #fff; }
.catmoa-answer__label,
.catmoa-answer > p:first-child > strong:only-child,
.is-style-catmoa-answer > p:first-child > strong:only-child {
	display: block;
	font-family: var(--wp--preset--font-family--number), var(--wp--preset--font-family--body);
	font-weight: 700;
	font-size: 13px !important;
	letter-spacing: 0.14em;
	line-height: 1.4;
	color: var(--catmoa-cheese-light);
}
/* 라벨이 따로 없으면 자동으로 "한눈에 답"을 붙인다 */
.catmoa-answer:not(:has(> .catmoa-answer__label)):not(:has(> p:first-child > strong:only-child))::before {
	content: "한눈에 답";
	display: block;
	font-family: var(--wp--preset--font-family--number), var(--wp--preset--font-family--body);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.14em;
	color: var(--catmoa-cheese-light);
}

/* 삽화 + 캡션 */
figure.catmoa-illust,
.wp-block-image.is-style-catmoa-illust {
	margin-block: 32px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
figure.catmoa-illust img,
.wp-block-image.is-style-catmoa-illust img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 28px;
	border: 2px solid var(--catmoa-ink);
	display: block;
}
figure.catmoa-illust figcaption,
.wp-block-image.is-style-catmoa-illust figcaption {
	font-size: 13px;
	color: var(--catmoa-subtle);
	margin: 0;
	text-align: left;
	display: flex;
	align-items: center;
	gap: 6px;
}
figure.catmoa-illust figcaption::before,
.wp-block-image.is-style-catmoa-illust figcaption::before {
	content: "";
	flex: 0 0 14px;
	height: 14px;
	background: var(--catmoa-paw) center / contain no-repeat;
}

/* 본문 기본 */
.wp-block-post-content { font-size: 18px; line-height: 1.85; }
.wp-block-post-content h2 { font-family: var(--wp--preset--font-family--body); font-weight: 700; font-size: 28px; line-height: 1.4; letter-spacing: 0; margin-top: 56px; }
.wp-block-post-content h3 { font-family: var(--wp--preset--font-family--body); font-weight: 700; font-size: 22px; line-height: 1.45; letter-spacing: 0; margin-top: 40px; }
.wp-block-post-content img { border-radius: 20px; }

/* 목록 불릿: 작은 발바닥 */
.wp-block-post-content ul:not([class*="wp-block-"]):not(.catmoa-share__list),
.wp-block-post-content ul.wp-block-list,
ul.is-style-catmoa-paw {
	list-style: none;
	padding-left: 0;
}
.wp-block-post-content ul:not([class*="wp-block-"]):not(.catmoa-share__list) > li,
.wp-block-post-content ul.wp-block-list > li,
ul.is-style-catmoa-paw > li {
	position: relative;
	padding-left: 30px;
	margin-bottom: 6px;
}
.wp-block-post-content ul:not([class*="wp-block-"]):not(.catmoa-share__list) > li::before,
.wp-block-post-content ul.wp-block-list > li::before,
ul.is-style-catmoa-paw > li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .5em;
	width: 16px;
	height: 16px;
	background: var(--catmoa-paw) center / contain no-repeat;
}
.wp-block-post-content ol > li::marker { font-family: var(--wp--preset--font-family--number); font-weight: 700; color: var(--catmoa-cheese); }

/* 인용: 고양이 귀가 달린 상자 */
.wp-block-quote,
.wp-block-post-content blockquote {
	position: relative;
	margin-top: 40px;
}
.wp-block-post-content blockquote:not(.wp-block-quote) {
	border: 2px solid var(--catmoa-ink);
	border-radius: 24px;
	background: var(--wp--preset--color--butter, #FFF1B8);
	padding: 28px 32px;
	margin-left: 0;
	margin-right: 0;
}
.wp-block-quote::before,
.wp-block-post-content blockquote::before {
	content: "";
	position: absolute;
	left: 28px;
	top: -20px;
	width: 72px;
	height: 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 22'%3E%3Cg fill='%23FFF1B8' stroke='%2317161A' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M2 22 L10 2 L24 22'/%3E%3Cpath d='M48 22 L62 2 L70 22'/%3E%3C/g%3E%3C/svg%3E") left bottom / contain no-repeat;
}
.wp-block-quote cite,
.wp-block-post-content blockquote cite { display: block; margin-top: 10px; font-size: 14px; font-style: normal; color: var(--catmoa-subtle); }
.wp-block-quote cite::before { content: "— "; }
.wp-block-quote > p:last-of-type { margin-bottom: 0; }

/* 표 */
.wp-block-post-content table,
.wp-block-table table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 2px solid var(--catmoa-ink);
	border-radius: 18px;
	overflow: hidden;
	background: #fff;
}
.wp-block-post-content th,
.wp-block-post-content td { padding: 12px 14px; border-bottom: 1px solid var(--catmoa-line); text-align: left; vertical-align: top; }
.wp-block-post-content th { background: var(--wp--preset--color--peach, #FFE7CF); font-weight: 700; }
.wp-block-post-content tr:last-child td { border-bottom: 0; }
.wp-block-table { overflow-x: auto; }
.wp-block-post-content figure.wp-block-table { margin-block: 32px; }
.wp-block-table td, .wp-block-table th { border-color: var(--catmoa-line); }

/* 자주 묻는 질문 */
.wp-block-details summary { font-weight: 700; font-size: 17px; cursor: pointer; }
.wp-block-details[open] summary { margin-bottom: 12px; }
.wp-block-details + .wp-block-details { margin-top: 12px; }

/* 출처 목록 */
.catmoa-sources { border-top: 2px solid var(--catmoa-ink); padding-top: 20px; font-size: 14px; line-height: 1.7; color: #3E3A36; }

/* 버튼 블록 스타일: 고양이 귀 */
.wp-block-button.is-style-catmoa-ears { margin-top: 10px; }
.wp-block-button.is-style-catmoa-ears .wp-block-button__link { position: relative; z-index: 0; overflow: visible; }
.wp-block-button.is-style-catmoa-ears .wp-block-button__link::before,
.wp-block-button.is-style-catmoa-ears .wp-block-button__link::after {
	content: "";
	position: absolute;
	top: -9px;
	width: 16px;
	height: 16px;
	background: inherit;
	border: 2px solid var(--catmoa-ink);
	border-right: 0;
	border-bottom: 0;
	border-radius: 3px 0 0 0;
	transform: rotate(45deg);
	z-index: -1;
}
.wp-block-button.is-style-catmoa-ears .wp-block-button__link::before { left: 20%; }
.wp-block-button.is-style-catmoa-ears .wp-block-button__link::after { right: 20%; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--catmoa-ink); border: 2px solid var(--catmoa-ink); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--catmoa-ink); color: #fff; }
.wp-block-button__link { transition: background-color .2s var(--catmoa-ease), color .2s var(--catmoa-ease), transform .2s var(--catmoa-ease); }
.wp-block-button__link:active { transform: translateY(1px); }

/* ------------------------------------------------------------------
 * 5. 글 레이아웃 · 사이드
 * ------------------------------------------------------------------ */
.catmoa-article-meta { color: var(--catmoa-subtle); font-size: 14px; gap: 6px 16px !important; }
.catmoa-article-meta > * { margin: 0 !important; }
.catmoa-featured { height: auto !important; overflow: visible; margin-left: 0 !important; margin-right: 0 !important; margin-bottom: 0 !important; transform: none !important; opacity: 1 !important; animation: none !important; }
/* 간격 규칙(2026-10-25): 글 본문 열(article)의 큰 덩어리 사이 간격은 부모의 blockGap(32px, 흐름 레이아웃의 위쪽 여백) 하나로만 정한다.
   본문 열은 flex 가 아니라 흐름(flow) 레이아웃 — 안드로이드 Chrome 에서 flex 항목 높이가 캡션을 빼고 계산돼 겹치던 문제(Galaxy 실측).
   덩어리 자신(대표 이미지·본문 상자·본문 첫 요소)에는 위아래 바깥 여백을 주지 않는다 — 여백이 겹쳐 화면마다 달라지는 것을 막는다. */
.catmoa-article-main > .wp-block-post-content { margin-bottom: 0 !important; }

.catmoa-article-main > .wp-block-post-content > :first-child { margin-top: 0 !important; }
.catmoa-featured img { border-radius: 28px; border: 2px solid var(--catmoa-ink); width: 100%; height: auto !important; display: block; box-sizing: border-box; } /* aspect-ratio 를 쓰지 않는다 — Galaxy 계열 화면 밀도에서 틀보다 그림이 커지는 문제(삽화는 원래 3:2) */
/* 대표 이미지 캡션(첨부 이미지 caption, inc/template-tags.php catmoa_featured_image_caption) */
.catmoa-featured .catmoa-featured__caption { font-size: 13px; line-height: 1.5; color: var(--catmoa-subtle); margin: 10px 0 0; text-align: left; display: block; padding-left: 20px; position: relative; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* flex 대신 block — 안드로이드 글자 자동 확대 때 틀 밖으로 넘치지 않게 */
.catmoa-featured .catmoa-featured__caption::before { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: var(--catmoa-paw) center / contain no-repeat; }
.catmoa-breadcrumb { font-size: 14px; color: var(--catmoa-subtle); display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.catmoa-breadcrumb a { color: var(--catmoa-blue); }
.catmoa-breadcrumb span[aria-hidden] { color: var(--catmoa-subtle); }

.catmoa-aside-cta { border-radius: 24px; background: var(--catmoa-blue); color: #fff; padding: 24px !important; }
.catmoa-aside-cta > * { margin: 0 !important; }
.catmoa-aside-cta .catmoa-aside-cta__label { font-size: 13px; font-weight: 700; color: #DCE0FF; }
.catmoa-aside-cta .catmoa-aside-cta__title { font-family: var(--wp--preset--font-family--body); font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.catmoa-aside-cta .wp-block-button__link { background: #fff; color: var(--catmoa-ink); border-color: #fff; }
.catmoa-aside-cta .wp-block-button__link:hover { background: var(--catmoa-cheese-light); border-color: var(--catmoa-cheese-light); }

.catmoa-related { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.catmoa-related__item {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px;
	border-radius: 18px;
	border: 2px solid var(--catmoa-ink);
	background: var(--catmoa-tint, #FFF1B8);
	transition: transform .28s var(--catmoa-ease), box-shadow .28s var(--catmoa-ease);
}
.catmoa-related__item:hover,
.catmoa-related__item:focus-within { transform: translateY(-4px); box-shadow: 0 14px 30px -14px rgba(23, 22, 26, .4); }
.catmoa-related__cat { font-size: 12px; font-weight: 700; color: var(--catmoa-blue); }
.catmoa-related__title { font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--catmoa-ink); text-decoration: none; }
.catmoa-related__title::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { .catmoa-related__item { transition: none; } .catmoa-related__item:hover { transform: none; } }

.catmoa-article-wrap { align-items: flex-start !important; }
.catmoa-article-main { flex: 999 1 640px; min-width: 0; }
.catmoa-article-aside { flex: 1 1 300px; min-width: 0; position: sticky; top: 96px; }
.catmoa-article-main > .wp-block-post-content > * + * { margin-block-start: 1.2em; }
.catmoa-article-meta .wp-block-post-author-name::after { content: "·"; margin-left: 16px; color: var(--catmoa-subtle); }
.catmoa-article-meta .wp-block-post-date::after { content: "·"; margin-left: 16px; color: var(--catmoa-subtle); }
.catmoa-reading-time { margin: 0; }
.catmoa-hero { align-items: center; }
@media (max-width: 960px) { .catmoa-article-aside { position: static; } }

/* ------------------------------------------------------------------
 * 6. 공유 버튼
 * ------------------------------------------------------------------ */
.catmoa-share {
	margin-block: 48px 8px;
	padding: 24px 24px 28px;
	border: 2px solid var(--catmoa-ink);
	border-radius: 28px;
	background: var(--wp--preset--color--peach, #FFE7CF);
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.catmoa-share__head { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 700; font-size: 17px; }
.catmoa-share__head svg { width: 40px; height: 36px; flex: 0 0 auto; }
.catmoa-share__list { display: flex; flex-wrap: wrap; gap: 14px 12px; margin: 0; padding: 14px 0 0; list-style: none; }
.catmoa-share__list > li { margin: 0; padding: 0; }
.catmoa-share__list > li::before { display: none !important; }
.catmoa-share__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px 0 14px;
	border-radius: 999px;
	border: 2px solid var(--catmoa-ink);
	background: #fff;
	color: var(--catmoa-ink);
	font: 700 15px/1 var(--wp--preset--font-family--body);
	text-decoration: none;
	cursor: pointer;
	transition: transform .2s var(--catmoa-ease), background-color .2s var(--catmoa-ease);
}
/* 고양이 귀 두 개(인라인 SVG, 버튼 배경색을 따라감) */
.catmoa-share__btn > * { position: relative; z-index: 1; }
.catmoa-share__btn > .catmoa-share__ear {
	position: absolute;
	top: -10px;
	width: 16px;
	height: 14px;
	pointer-events: none;
	z-index: 1;
}
.catmoa-share__btn > .catmoa-share__ear--l { left: 12px; }
.catmoa-share__btn > .catmoa-share__ear--r { right: 12px; }
.catmoa-share__ear path { fill: #fff; stroke: var(--catmoa-ink); stroke-width: 2; stroke-linejoin: round; }
.catmoa-share__btn svg.catmoa-share__icon { width: 18px; height: 18px; flex: 0 0 auto; }
.catmoa-share__btn:hover,
.catmoa-share__btn:focus-visible { background: var(--catmoa-cheese-light); color: var(--catmoa-ink); transform: translateY(-2px); }
.catmoa-share__btn--primary { background: var(--catmoa-ink); color: #fff; }
.catmoa-share__btn--primary .catmoa-share__ear path { fill: var(--catmoa-ink); }
.catmoa-share__btn--primary:hover { color: var(--catmoa-ink); }
.catmoa-share__btn--primary:hover .catmoa-share__ear path { fill: var(--catmoa-cheese-light); }
.catmoa-share__btn:hover .catmoa-share__ear path { fill: var(--catmoa-cheese-light); }
.catmoa-share__status { min-height: 0; margin: -6px 0 0; font-size: 14px; font-weight: 700; color: var(--catmoa-ink); }
.catmoa-share [hidden] { display: none !important; }

/* ------------------------------------------------------------------
 * 7. 목록 · 페이지네이션 · 검색 결과 · 404
 * ------------------------------------------------------------------ */
.catmoa-archive-head { border-bottom: 2px solid var(--catmoa-ink); padding-bottom: 28px !important; }
.catmoa-archive-head .wp-block-query-title { font-size: clamp(36px, 4.8vw, 66px); }
.catmoa-archive-head .wp-block-term-description { color: var(--catmoa-muted); font-size: 18px; }

.wp-block-query-pagination { gap: 10px; font-weight: 700; margin-top: 48px; }
.wp-block-query-pagination-numbers { display: flex; gap: 8px; flex-wrap: wrap; }
.wp-block-query-pagination .page-numbers,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border-radius: 999px;
	border: 2px solid var(--catmoa-ink);
	background: #fff;
	color: var(--catmoa-ink);
	text-decoration: none;
	font-family: var(--wp--preset--font-family--number);
}
.wp-block-query-pagination .page-numbers.dots { border-color: transparent; background: none; }
.wp-block-query-pagination .page-numbers.current {
	background: var(--catmoa-cheese);
	color: var(--catmoa-ink);
	position: relative;
}
.wp-block-query-pagination .page-numbers.current::after {
	content: "";
	position: absolute;
	top: -12px;
	left: 50%;
	margin-left: -7px;
	width: 14px;
	height: 14px;
	background: var(--catmoa-paw) center / contain no-repeat;
}
.wp-block-query-pagination a:hover { background: var(--wp--preset--color--butter, #FFF1B8); }
.wp-block-query-pagination-previous-arrow,
.wp-block-query-pagination-next-arrow { display: none; }
.wp-block-query-pagination-previous::before,
.wp-block-query-pagination-next::after {
	content: "";
	width: 16px;
	height: 16px;
	background: var(--catmoa-paw-ink) center / contain no-repeat;
}
.wp-block-query-pagination-previous::before { margin-right: 8px; transform: rotate(-90deg); }
.wp-block-query-pagination-next::after { margin-left: 8px; transform: rotate(90deg); }

.catmoa-empty { border: 2px dashed var(--catmoa-ink); border-radius: 28px; padding: 40px 24px !important; text-align: center; background: #fff; }

.catmoa-404 { text-align: center; }
.catmoa-404-stage { position: relative; width: min(360px, 80vw); margin: 0 auto; height: 220px; }
.catmoa-404-stage svg { width: 100%; height: 100%; display: block; }
.catmoa-404-cat { animation: catmoa-peek 3.2s ease-in-out infinite; transform-box: fill-box; }
.catmoa-404-code { font-family: var(--wp--preset--font-family--number); font-weight: 700; font-size: 14px; letter-spacing: .2em; color: var(--catmoa-blue); margin: 0; }

/* ------------------------------------------------------------------
 * 8. 바닥글
 * ------------------------------------------------------------------ */
.catmoa-footer a { color: #E9E6E0; text-decoration: none; }
.catmoa-footer a:hover { color: var(--catmoa-cheese-light); text-decoration: underline; }
.catmoa-footer .wp-block-site-title a { color: #fff; }
.catmoa-footer .catmoa-footer__tagline { color: #BDB8AF; font-size: 14px; margin: 0; }
.catmoa-footer .wp-block-navigation { font-size: 14px; font-weight: 400; }
.catmoa-footer .catmoa-footer__small { color: #BDB8AF; font-size: 13px; }

/* ------------------------------------------------------------------
 * 9. 작은 화면
 * ------------------------------------------------------------------ */
@media (max-width: 600px) {
	.catmoa-coat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 781px) {
	.catmoa-today { min-height: 380px; }
	.catmoa-today > .catmoa-today__card { min-height: 356px; padding: 28px; margin: 0 18px 18px 0 !important; }
	.catmoa-today::before { inset: 18px 0 0 18px; }
	.catmoa-book { flex-wrap: nowrap !important; }
	.catmoa-book__cover { flex-basis: 92px; min-height: 136px; }
	.catmoa-answer, .is-style-catmoa-answer { padding: 24px !important; font-size: 18px; }
	.catmoa-kbd { font-size: 22px; padding: 10px 16px; }
}

/* 출처: 글 맨 끝 접이식 상자(공유 버튼 아래) */
.catmoa-sources { margin-top: 2rem; padding: 0.9rem 1.2rem; border: 1px solid var(--wp--preset--color--line, #E7E3DC); border-radius: 16px; font-size: 0.875rem; color: #4A4641; }
.catmoa-sources > summary { cursor: pointer; font-weight: 700; color: #17161A; list-style-position: inside; }
.catmoa-sources[open] > summary { margin-bottom: 0.6rem; }
.catmoa-sources ul, .catmoa-sources ol { margin: 0; padding-left: 1.1rem; }
.catmoa-sources a { overflow-wrap: anywhere; }

/* 휴대폰 메뉴(햄버거) — 헤더의 blur(backdrop-filter)가 화면 전체 메뉴를 헤더 높이 안에 가두던 문제(2026-10-25) */
.catmoa-header:has(.wp-block-navigation__responsive-container.is-menu-open) { -webkit-backdrop-filter: none; backdrop-filter: none; }
.catmoa-header .wp-block-navigation__responsive-container.is-menu-open {
	position: fixed; inset: 0; height: 100vh; height: 100dvh; z-index: 100000;
	background: var(--catmoa-paper, #FBFAF7); color: var(--catmoa-ink, #17161A);
	padding: 24px 28px 40px;
}
.catmoa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 72px; align-items: flex-start;
}
.catmoa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	flex-direction: column; align-items: flex-start; gap: 6px; width: 100%;
}
.catmoa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 2px solid var(--catmoa-ink, #17161A); }
.catmoa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block; width: 100%; padding: 16px 4px !important;
	font-family: "Black Han Sans", sans-serif; font-size: 32px; line-height: 1.2;
}
.catmoa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after { display: none; }
.catmoa-header .wp-block-navigation__responsive-container-close { top: 24px; right: 24px; width: 44px; height: 44px; }
