/*
Theme Name: Ajimo Magazine
Description: AJIMO magazine 전용 테마 (쇼핑몰 컨셉 컬러 반영)
Version: 0.2
Author: Ajimo
Text Domain: ajimo
*/

:root {
  --ink: #111111;
  --muted: #222222;
  --faint: #333333;
  --cream: #f5f3eb;
  --paper: #fbfaf5;
  --hero: #edece3;
  --sage: #e6ebdf;
  --moss: #654f43;
  --moss-dark: #654f43;
  --line: #d9dacd;
  --serif: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Noto Sans KR", sans-serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Noto Sans KR", sans-serif;
  --wrap: 1224px;
  --read: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: -0.01em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.label { font-size: 11px; letter-spacing: .2em; font-weight: 600; line-height: 1.5; color: var(--moss); text-transform: uppercase; }
.link-line { display: inline-block; padding: 12px 0; border-bottom: 1px solid var(--moss-dark); font-size: 13px; letter-spacing: .02em; }
.link-line:hover { color: var(--moss); }

/* 상단 */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.head-top { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { font-family: var(--serif); font-size: 26px; letter-spacing: .14em; font-weight: 400; }
.brand em { font-style: italic; letter-spacing: .02em; font-size: 20px; color: var(--moss); margin-left: 8px; }
.shop-link { font-size: 12px; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; transition: all .2s; }
.shop-link:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.nav { display: flex; gap: 36px; padding: 0 0 16px; font-size: 15px; font-weight: 500; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); padding-bottom: 6px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); border-bottom-color: var(--moss); }

/* 대표 글(가장 최근) */
.feature { background: var(--hero); }
.feature-in { display: grid; grid-template-columns: 1.08fr 1fr; align-items: stretch; min-height: 560px; }
.feature-photo { background: var(--sage); min-height: 320px; overflow: hidden; }
.feature-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.feature:hover .feature-photo img { transform: scale(1.03); }
.feature-copy { padding: 70px 8% 60px 7%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.feature-copy .ft { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.4; letter-spacing: -0.05em; margin: 22px 0 18px; }
.feature-copy p { color: #222222; margin: 0 0 30px; font-size: 15px; line-height: 1.95; }
.meta { font-size: 12px; color: var(--faint); letter-spacing: .06em; }

/* 섹션 제목 */
.section { padding: 84px 0 30px; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 34px; gap: 20px; }
.section-head h2 { font-family: var(--serif); font-size: 34px; letter-spacing: -0.04em; font-weight: 400; margin: 10px 0 0; }

/* 글 카드 */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 46px 26px; }
.card { display: block; }
.card .photo { aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, var(--sage), var(--hero)); margin-bottom: 20px; }
.card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .photo img { transform: scale(1.04); }
.card .cat { font-size: 11px; letter-spacing: .16em; color: var(--moss); font-weight: 600; }
.card h3 { font-family: var(--serif); font-size: 21px; line-height: 1.5; font-weight: 400; letter-spacing: -0.04em; margin: 8px 0 10px; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0 0 12px; }

/* 카테고리 줄 */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 90px 0 90px; }
.cats a { border-top: 1px solid #c8cabc; padding: 26px 0; display: block; transition: border-color .2s; }
.cats a:hover { border-top-color: var(--moss); }
.cats small { font-size: 10px; letter-spacing: .16em; color: var(--faint); }
.cats h3 { font-size: 21px; font-weight: 400; margin: 16px 0 10px; font-family: var(--serif); letter-spacing: -0.03em; }
.cats p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.7; }

/* 공식몰 안내 */
.note { background: var(--cream); text-align: center; padding: 70px 24px; }
.note h2 { font-family: var(--serif); font-size: 32px; font-weight: 400; letter-spacing: .06em; margin: 14px 0; }
.note p { color: #222222; font-size: 14px; margin: 0 0 26px; }
.btn { display: inline-block; padding: 14px 34px; background: var(--ink); color: #fff; font-size: 14px; letter-spacing: .04em; transition: background .2s; }
.btn:hover { background: var(--moss); }

/* 목록 머리 */
.page-title { padding: 78px 0 10px; text-align: center; }
.page-title h1 { margin: 12px 0 8px; font-family: var(--serif); font-size: 40px; font-weight: 400; letter-spacing: -0.04em; }
.page-title p { margin: 0; color: var(--muted); }
.page-body { padding: 50px 0 40px; }

/* 글 화면 */
.article { max-width: var(--read); margin: 0 auto; padding: 76px 24px 30px; }
.article-head { text-align: center; margin-bottom: 44px; }
.article-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4.4vw, 42px); line-height: 1.45; letter-spacing: -0.05em; margin: 16px 0 16px; }
.cover { margin: 0 0 46px; }
.cover img { width: 100%; }
.entry { font-size: calc(17px * var(--fs, 1)); line-height: 2; }
.entry p { margin: 0 0 1.7em; }
.entry h2 { font-family: var(--serif); font-weight: 400; font-size: calc(27px * var(--fs, 1)); line-height: 1.5; margin: 2.2em 0 .7em; letter-spacing: -0.04em; }
.entry h3 { font-family: var(--serif); font-weight: 400; font-size: calc(22px * var(--fs, 1)); margin: 1.9em 0 .6em; }
.entry img { margin: 2em auto; }
.entry a { color: var(--moss); border-bottom: 1px solid currentColor; }
.entry blockquote { margin: 2em 0; padding: 6px 0 6px 22px; border-left: 2px solid var(--moss); color: var(--muted); font-family: var(--serif); }
.entry ul, .entry ol { margin: 0 0 1.7em; padding-left: 1.3em; }
.shop-box { margin: 60px 0 30px; padding: 24px 20px; background: var(--sage); text-align: center; }
.shop-box strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.4; letter-spacing: -0.03em; margin-bottom: 6px; }
.shop-box span { display: block; color: var(--moss); font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
.shop-box .btn { min-height: 44px; padding: 9px 26px; }
.related { max-width: var(--wrap); margin: 0 auto; padding: 40px 24px 20px; }

/* 쪽 번호 */
.pager { display: flex; gap: 6px; justify-content: center; padding: 50px 0 80px; }
.pager a, .pager span { padding: 8px 15px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pager .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 하단 */
.site-footer { background: var(--hero); padding: 54px 0 64px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer .brand { font-size: 20px; color: var(--ink); }
.site-footer a:hover { color: var(--ink); }

/* 폰 */
@media (max-width: 900px) {
  .feature-in { grid-template-columns: 1fr; min-height: 0; }
  .feature-photo { aspect-ratio: 4 / 3; order: -1; }
  .feature-copy { padding: 44px 26px 50px; }
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats { grid-template-columns: repeat(2, 1fr); padding: 60px 0; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .wrap { padding: 0 18px; }
  .head-top { height: 64px; }
  .brand { font-size: 21px; }
  .brand em { font-size: 16px; }
  .shop-link { padding: 6px 12px; }
  .nav { gap: 24px; font-size: 14px; }
  .section { padding: 56px 0 20px; }
  .section-head h2 { font-size: 27px; }
  .posts { grid-template-columns: 1fr; gap: 38px; }
  .article { padding-top: 50px; }
  .entry { font-size: calc(16px * var(--fs, 1)); }
  .note h2 { font-size: 26px; }
  .page-title h1 { font-size: 32px; }
}

/* 고딕 제목 굵기 */
.brand, .feature-copy .ft, .section-head h2, .card h3, .page-title h1, .article-head h1,
.entry h2, .entry h3, .cats h3, .note h2, .shop-box strong { font-weight: 600; }
.brand { letter-spacing: .12em; }
.brand em { font-style: normal; font-weight: 500; letter-spacing: .02em; }
.entry blockquote { font-family: var(--sans); }

/* 포인트 컬러: 가볍게 — 상단은 밝게, 포인트는 로고·현재 메뉴·큰 제목·버튼에만 */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .brand { color: var(--moss); }
.site-header .brand em { color: var(--faint); }
.site-header .shop-link { color: var(--moss); border-color: var(--line); }
.site-header .shop-link:hover { background: var(--moss); color: #fff; border-color: var(--moss); }
.site-header .nav a { color: var(--muted); }
.site-header .nav a:hover { color: var(--moss); }
.site-header .nav a.on { color: var(--moss); border-bottom-color: var(--moss); }

.feature-copy .ft, .page-title h1, .article-head h1 { color: var(--moss); }
.section-head h2, .card h3, .entry h2, .entry h3, .cats h3, .note h2, .shop-box strong, .related h2 { color: var(--ink); }
.single-post .entry :is(h2, h3, h4, h5, h6) { color: var(--moss); }
.card:hover h3, .feature-copy .ft a:hover { color: #4d3b31; }
.btn { background: var(--moss); }
.btn:hover { background: #4d3b31; }

.site-footer { background: var(--hero); color: var(--muted); }
.site-footer .brand { color: var(--moss); }
.site-footer .brand em { color: var(--faint); }
.site-footer a:hover { color: var(--moss); }

/* 접근성·검색용 숨은 제목 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* 자주 묻는 질문 */
.faq { margin: 56px 0 10px; padding-top: 34px; border-top: 1px solid var(--line); }
.faq h2 { font-size: 22px; margin: 0 0 18px; color: var(--ink); font-weight: 600; letter-spacing: -0.03em; }
.faq-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.faq-item h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--moss); letter-spacing: -0.02em; }
.faq-item p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.85; }

/* 공감·댓글 */
.engage { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 44px 0 0; padding-block: 26px; border-top: 1px solid var(--line); }
.engage + :is(.faq, .comments) { margin-top: 0; }
.engage button, .engage a { font: inherit; font-size: 14px; line-height: 1; padding: 11px 18px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; cursor: pointer; transition: all .15s; }
.engage button:hover, .engage a:hover { border-color: var(--moss); color: var(--moss); }
.like-btn .heart { color: #c9c3bb; margin-right: 2px; transition: color .15s; }
.like-btn.on { border-color: var(--moss); color: var(--moss); background: #f7f1ec; }
.like-btn.on .heart { color: #d4503f; }

.comments { margin: 54px 0 20px; }
.comments h2 { font-size: 20px; margin: 0 0 18px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.comments h2 span { color: var(--moss); margin-left: 4px; }
.comment-list, .comment-list ol { list-style: none; margin: 0; padding: 0; }
.comment-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment-list li.reply, .comment-list ol li { margin-left: 28px; padding-left: 16px; border-left: 2px solid var(--line); border-bottom: 0; }
.c-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.c-head strong { font-size: 15px; color: var(--ink); }
.c-head time { font-size: 12px; color: var(--faint); }
.c-body p { margin: 0 0 .5em; font-size: 15px; line-height: 1.8; }
.c-wait { margin: 0 0 4px; font-size: 13px; color: var(--moss); }
.c-reply a { font-size: 13px; color: var(--faint); }
.c-reply a:hover { color: var(--moss); }
.comment-respond { margin-top: 30px; padding: 24px; background: #fff; border: 1px solid var(--line); }
.comment-reply-title { font-size: 17px; font-weight: 600; margin: 0 0 14px; color: var(--ink); }
.comment-reply-title small { margin-left: 10px; font-size: 13px; font-weight: 400; }
.c-field { margin: 0 0 10px; }
.comment-respond input[type=text], .comment-respond input[type=email], .comment-respond textarea { width: 100%; padding: 12px 14px; font: inherit; font-size: 15px; border: 1px solid var(--line); background: var(--paper); border-radius: 0; color: var(--ink); }
.comment-respond input:focus, .comment-respond textarea:focus { outline: none; border-color: var(--moss); }
.comment-respond textarea { resize: vertical; line-height: 1.7; }
.comment-respond .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.comment-respond .btn { border: 0; cursor: pointer; font: inherit; font-size: 14px; }
.c-note { margin: 10px 0 0; font-size: 12px; color: var(--faint); }
.comment-respond .form-submit { margin: 6px 0 0; }

/* 배경: 메인 메뉴 영역만 베이지, 본문은 흰색 */
body { background: #fff; }
.site-header { background: #f5f3eb; }

/* 폰: 메뉴가 길면 두 줄로 내려오게 한다 */
@media (max-width: 600px) {
  .nav { flex-wrap: wrap; overflow: visible; white-space: normal; gap: 6px 22px; padding-bottom: 12px; }
  .nav a { white-space: nowrap; }
}

/* 폰: 상단 대표 이미지가 우측으로 터지지 않게 */
@media (max-width: 900px) {
  .feature-in { grid-template-columns: minmax(0, 1fr); }
  .feature-photo { min-height: 0; width: 100%; }
  .feature-copy { min-width: 0; }
}
body { overflow-x: hidden; }

/* 구독 버튼·안내 창 */
.sub-btn.on { border-color: var(--moss); color: var(--moss); background: #f7f1ec; }
.sub-btn:disabled { opacity: .6; cursor: default; }
.sub-sheet { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sub-card { background: #fff; border-radius: 14px; padding: 26px 24px 20px; max-width: 360px; width: 100%; font-size: 15px; line-height: 1.7; }
.sub-card strong { display: block; font-size: 17px; margin-bottom: 12px; }
.sub-card ol { margin: 0 0 18px; padding-left: 20px; color: var(--muted); }
.sub-card button { width: 100%; padding: 12px; border: 0; border-radius: 999px; background: var(--moss); color: #fff; font: inherit; cursor: pointer; }
.sub-act { display: flex; flex-direction: column; gap: 8px; }
.sub-card .sub-sec { background: #f3f1ea; color: var(--ink); }

/* 투표형 설문 */
.poll { margin: 30px 0; padding: 24px 22px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.poll-q { display: block; font-size: 17px; line-height: 1.6; margin-bottom: 14px; }
.poll-list { display: flex; flex-direction: column; gap: 10px; }
.poll-opt { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; font: inherit; font-size: 15px; line-height: 1.5; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; }
.poll-opt:hover:not(:disabled) { border-color: var(--moss); }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #efe7e0; transition: width .5s; z-index: 0; }
.poll-txt, .poll-pct { position: relative; z-index: 1; }
.poll-pct { font-size: 13px; color: var(--muted); white-space: nowrap; }
.poll-opt:disabled { cursor: default; }
.poll-opt.mine { border-color: var(--moss); font-weight: 600; }
.poll-opt.mine .poll-bar { background: #e3d3c6; }
.poll-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* 댓글 등록 버튼: 입력칸과 같은 폭 */
.comment-respond .form-submit { display: block; }
.comment-respond .form-submit .btn, .comment-respond .form-submit input[type=submit] { display: block; width: 100%; padding: 16px 0; text-align: center; }

/* 댓글 공감·베스트 댓글 */
.c-actions { display: flex; align-items: center; gap: 14px; margin-top: 2px; }
.clike { font: inherit; font-size: 13px; line-height: 1; padding: 6px 12px; border: 1px solid var(--line); background: #fff; color: var(--faint); border-radius: 999px; cursor: pointer; }
.clike .heart { color: #c9c3bb; }
.clike:hover { border-color: var(--moss); color: var(--moss); }
.clike.on { border-color: var(--moss); color: var(--moss); background: #f7f1ec; }
.clike.on .heart { color: #d4503f; }
.comment-best { margin: 0 0 26px; padding: 18px 20px 6px; background: #faf7f3; border: 1px solid var(--line); border-radius: 12px; }
.best-title { display: block; font-size: 15px; color: var(--moss); margin-bottom: 4px; }
.best-list { list-style: none; margin: 0; padding: 0; }
.best-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.best-list li:last-child { border-bottom: 0; }
.best-badge { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #fff; background: var(--moss); padding: 3px 7px; border-radius: 4px; }
.best-go { font-size: 13px; color: var(--faint); }
.best-go:hover { color: var(--moss); }

/* 글 아래 태그 */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; }
.post-tags a { font-size: 13px; line-height: 1; padding: 8px 13px; border-radius: 999px; background: #f3f1ea; color: var(--muted); }
.post-tags a:hover { background: #e9e4d8; color: var(--moss); }
.post-tags + .engage { margin-top: 24px; }

/* 글 하단 제품 배너 */
.banner-box { display: flex; flex-direction: column; gap: 14px; margin: 34px 0; }
.banner-box .banner { display: block; line-height: 0; }
.banner-box .banner img { width: 100%; height: auto; display: block; }

/* 배너 위 여백: 앞 문단의 아래 여백만 남기고 본문 간격과 맞춘다 */
.banner-box { margin-top: 0; }

/* 배너 그림: 본문 그림의 위아래 여백 규칙을 받지 않게 한다 */
.entry .banner-box img { margin: 0; }

/* 배너 링크: 본문 링크의 아래 선 제거 */
.entry .banner-box a.banner { border-bottom: 0; }

/* 맨 위로 버튼 */
.to-top { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 900; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--moss); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,.25); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.to-top[hidden] { display: none; }
.to-top.on { opacity: .92; transform: none; }
.to-top:hover { opacity: 1; }
@media (min-width: 900px) { .to-top { right: 28px; bottom: 28px; width: 50px; height: 50px; } }

/* 글 맨 위 접이식 목차 */
.entry h2 { scroll-margin-top: 24px; }
.toc { margin: 0 0 34px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 15px; line-height: 1.6; }
.toc summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: '+'; margin-left: auto; font-size: 20px; line-height: 1; color: var(--moss); }
.toc[open] summary::after { content: '\2212'; }
.toc summary span { color: var(--moss); font-weight: 500; }
.toc ol { margin: 0; padding: 4px 18px 16px 38px; }
.toc li { margin: 0 0 6px; padding-left: 4px; }
.toc li a { color: var(--ink); border-bottom: 0; }
.toc li a:hover { color: var(--moss); text-decoration: underline; }

/* 목차 표시: 번호 대신 짧은 선 (소제목의 번호와 겹치지 않게) */
.toc ol { list-style: none; padding-left: 18px; }
.toc li { padding-left: 14px; position: relative; }
.toc li::before { content: '-'; position: absolute; left: 0; color: var(--moss); }

/* 글자 크기 조절 */
.fs-ctl{display:inline-flex;align-items:center;gap:6px;margin-top:16px}
.fs-ctl .fs-lab{font-size:12px;color:var(--faint);margin-right:4px}
.fs-ctl button{appearance:none;border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:999px;min-width:28px;height:26px;padding:0 7px;line-height:1;cursor:pointer;font-family:inherit}
.fs-ctl button[aria-pressed="true"]{background:var(--moss);border-color:var(--moss);color:#fff}
.fs-ctl button:focus-visible{outline:2px solid var(--moss);outline-offset:2px}
.article-head .fs-wrap{display:block;text-align:center}

/* 이미지 크게 보기 */
.entry img { cursor: zoom-in; }
.entry a img { cursor: pointer; }
.lb { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .18s; touch-action: none; }
.lb.on { opacity: 1; }
.lb img { max-width: 96vw; max-height: 92vh; margin: 0; cursor: zoom-out; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb button { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }

/* 모바일 본문 이미지 */
@media (max-width: 600px) {
  .entry :is(.wp-block-image, .wp-caption, figure:has(> img, > picture, > a > img, > a > picture)) {
    max-width: 100%;
    margin-inline: auto;
  }
  .entry img {
    max-width: 100%;
    height: auto;
  }
  .entry .banner-box img { width: auto; }
}

/* 검색 */
.head-tools { display: flex; align-items: center; gap: 10px; }
.srch-btn { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--moss); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: all .2s; }
.srch-btn:hover, .srch-btn[aria-expanded="true"] { background: var(--moss); color: #fff; border-color: var(--moss); }
.srch { display: flex; gap: 8px; padding: 0 0 16px; }
.srch[hidden] { display: none; }
.srch input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 999px; padding: 0 20px; font-size: 16px; background: #fff; color: var(--ink); font-family: inherit; }
.srch input:focus { outline: 2px solid var(--moss); outline-offset: -1px; border-color: transparent; }
.srch button { height: 46px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--moss); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; }
@media (max-width: 600px) { .head-tools { gap: 8px; } .srch-btn { width: 34px; height: 34px; } .srch button { padding: 0 18px; } }

/* Caption paragraphs only. Existing image spacing is unchanged. */
.single-post .entry p.ajimo-caption {
  color: #555;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* Halve the image margin only where a caption follows. */
.single-post .entry figure.wp-block-image:has(> figcaption) img,
.single-post .entry figure.wp-block-image:has(+ p.ajimo-caption) img {
  /* The mobile full-width image rule also uses !important. */
  margin-bottom: 1em !important;
}

/* Category archive sorting */
.page-body--sortable { padding-top: 8px; }
.category-sort {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
}
.category-sort a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--moss);
  font: 500 13px/1.4 var(--sans);
  white-space: nowrap;
}
.category-sort a:hover { border-color: var(--moss); }
.category-sort a[aria-current="true"] {
  border-color: var(--moss);
  background: var(--moss);
  color: #fff;
}
.category-sort a:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 2px;
}
