/* ============================================================
   컴공돌멩이 디자인 시스템 (2026-07 전면 리디자인)
   실측 기반 계획: ~/.claude/plans/calm-cuddling-nova.md
   원상복구: 이 파일 비우기 or mu-plugins 파일 삭제
   ============================================================ */

/* ---------- 폰트 ---------- */
@font-face {
    font-family: 'Pretendard Variable';
    font-weight: 45 920;
    font-style: normal;
    font-display: swap;
    src: url('assets/fonts/PretendardVariable.woff2') format('woff2-variations');
}

/* ---------- A. 디자인 토큰 ---------- */
:root {
    --cg-bg: #0b0b0e;
    --cg-surface: #151519;
    --cg-surface-hover: #1b1b21;
    --cg-deep: #101014;
    --cg-border: #26262c;
    --cg-border-hover: #3d3d46;
    --cg-heading: #f4f4f5;
    --cg-text: #dcdce1;
    --cg-muted: #8e8e99;
    --cg-accent: #a5b4fc;
    --cg-accent-dim: rgba(165, 180, 252, 0.12);
    --cg-font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
        system-ui, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    --cg-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas,
        'Liberation Mono', monospace;
    --cg-r-sm: 8px;
    --cg-r-md: 12px;
    --cg-r-lg: 16px;
    --cg-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ---------- 전역 ---------- */
body,
button,
input,
select,
textarea {
    font-family: var(--cg-font) !important;
}

body,
body.ast-separate-container {
    background-color: var(--cg-bg) !important;
    color: var(--cg-text);
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    font-weight: 430; /* Pretendard Variable: 400보다 미세하게 굵게 — 다크모드 가독성 */
    word-break: keep-all; /* 한글 단어 단위 줄바꿈 (중간 끊김 방지) */
    overflow-wrap: anywhere;
}

::selection {
    background: var(--cg-accent);
    color: #0b0b0e;
}

::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: var(--cg-bg);
}
::-webkit-scrollbar-thumb {
    background: #2c2c34;
    border-radius: 6px;
    border: 3px solid var(--cg-bg);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cg-border-hover);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
    font-family: var(--cg-font) !important;
    color: var(--cg-heading);
}

/* ---------- B. 글 페이지 타이포그래피 ---------- */
.ast-article-single .entry-title,
.entry-header .entry-title {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.entry-content p {
    font-size: 17.5px;
    line-height: 1.8;
    margin-bottom: 1.25em;
}

.entry-content h2 {
    font-size: 25px;
    font-weight: 700;
    margin-top: 56px;
    margin-bottom: 16px;
    letter-spacing: -0.015em;
}

.entry-content h3 {
    font-size: 20px;
    font-weight: 650;
    margin-top: 36px;
    margin-bottom: 12px;
}

.entry-content ul,
.entry-content ol {
    margin: 18px 0;
    padding-left: 22px;
}

.entry-content li {
    font-size: 17.5px;
    line-height: 1.75;
    margin-bottom: 8px;
}

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

/* 본문 링크: 유일 액센트 + 은은한 밑줄 */
.entry-content a {
    color: var(--cg-accent);
    text-decoration: underline;
    text-decoration-color: rgba(165, 180, 252, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease;
}

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

/* 글 상단 메타: 액센트 오남용 제거 → 뮤트 */
.entry-meta,
.entry-meta a,
.entry-meta .posted-by,
.entry-meta .published,
.read-more a {
    color: var(--cg-muted) !important;
    font-size: 13.5px;
    font-weight: 400;
}

.entry-meta a:hover {
    color: var(--cg-accent) !important;
}

/* 본문 이미지 */
.entry-content img {
    border-radius: var(--cg-r-md);
    border: 1px solid var(--cg-border);
}

/* blockquote */
.entry-content blockquote {
    border-left: 3px solid var(--cg-accent);
    background: var(--cg-surface);
    border-radius: var(--cg-r-sm);
    padding: 16px 20px;
    margin: 24px 0;
    color: var(--cg-text);
}

/* 글 본문 카드 배경 — 배경은 .ast-article-inner 가 칠하므로 함께 강제 */
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-single .ast-article-inner,
.ast-separate-container article .ast-article-inner,
.ast-separate-container .comments-area {
    background-color: var(--cg-surface) !important;
}

.ast-separate-container .ast-article-single,
.ast-separate-container .comments-area {
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-r-lg);
}

/* ---------- C. 코드 ---------- */
.entry-content pre {
    background: var(--cg-deep) !important;
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-r-md);
    padding: 18px 20px;
    margin: 28px 0;
    overflow-x: auto;
}

.entry-content pre,
.entry-content pre code {
    font-family: var(--cg-mono) !important;
    font-size: 15px;
    line-height: 1.7;
    letter-spacing: 0;
}

.entry-content pre code {
    background: transparent !important;
    padding: 0;
}

/* 인라인 코드 칩 */
.entry-content p > code,
.entry-content li > code {
    font-family: var(--cg-mono);
    font-size: 13.5px;
    background: var(--cg-surface-hover);
    border: 1px solid var(--cg-border);
    border-radius: 6px;
    padding: 2px 7px;
    color: var(--cg-accent);
}

/* highlight.js 커스텀 다크 토큰 (팔레트 조화) */
.hljs { color: #d4d4d8; background: transparent; }
.hljs-comment, .hljs-quote { color: #71717a; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type { color: #c4b5fd; }
.hljs-string, .hljs-regexp, .hljs-addition { color: #86efac; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #fca5a5; }
.hljs-title, .hljs-title.function_, .hljs-section { color: #93c5fd; }
.hljs-title.class_, .hljs-name { color: #fcd34d; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-params { color: #e4e4e7; }
.hljs-built_in, .hljs-builtin-name { color: #67e8f9; }
.hljs-meta, .hljs-deletion { color: #f0abfc; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* ---------- D. 목차 (LuckyWP) ---------- */
.lwptoc .lwptoc_i {
    background: var(--cg-surface) !important;
    border: 1px solid var(--cg-border);
    border-radius: 14px;
    padding: 20px 22px;
}

.lwptoc_header {
    margin-bottom: 8px;
}

.lwptoc_title {
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cg-muted) !important;
}

.lwptoc_toggle,
.lwptoc_toggle a,
.lwptoc_toggle_label {
    font-size: 11px !important;
    color: var(--cg-muted) !important;
}

.lwptoc_item a,
.lwptoc_item a:visited {
    font-size: 14.5px;
    line-height: 2;
    color: var(--cg-text) !important;
    text-decoration: none;
    transition: color 0.15s ease;
}

.lwptoc_item a:hover {
    color: var(--cg-accent) !important;
}

.lwptoc_item_number {
    color: var(--cg-muted) !important;
}

/* ---------- E-0. 홈 히어로(컴팩트) + 카테고리 칩 클라우드 ---------- */
.cg-hero {
    max-width: 1200px;
    margin: 4px auto 26px;
    padding: 10px 8px 0;
    text-align: center;
}

.cg-hero h2 {
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--cg-heading);
    margin: 0 0 6px;
}

.cg-hero p {
    font-size: 14px;
    color: var(--cg-muted);
    margin: 0 0 16px;
}

/* 카테고리 칩 클라우드 (우아한형: 헤더 아닌 콘텐츠 상단) */
.cg-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 900px;
    margin: 0 auto;
}

.cg-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--cg-text);
    background: var(--cg-surface);
    border: 1px solid var(--cg-border);
    border-radius: 999px;
    padding: 6px 14px;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease,
        border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.cg-cat:hover {
    transform: translateY(-2px);
    background: var(--cg-surface-hover);
    border-color: var(--cg-border-hover);
    color: var(--cg-heading);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.cg-cat-n {
    font-size: 11px;
    color: var(--cg-muted);
}

.cg-cat-all {
    background: var(--cg-accent);
    border-color: var(--cg-accent);
    color: #0b0b0e;
    font-weight: 700;
}

.cg-cat-all:hover {
    background: var(--cg-accent);
    color: #0b0b0e;
}

/* 칩 컬러 코딩 (카드 라벨과 동일 계열) */
.cg-cat-working-holiday { color: #fcd34d; border-color: rgba(252, 211, 77, 0.25); }
.cg-cat-woowacourse, .cg-cat-ssafy { color: #6ee7b7; border-color: rgba(110, 231, 183, 0.25); }
.cg-cat-coding-practices, .cg-cat-coding-challenges, .cg-cat-quick-tips {
    color: #67e8f9; border-color: rgba(103, 232, 249, 0.25);
}

/* 현재 카테고리 하이라이트 */
.cg-cat-active,
.cg-cat-active:hover {
    background: var(--cg-accent) !important;
    border-color: var(--cg-accent) !important;
    color: #0b0b0e !important;
    font-weight: 700;
}

.cg-cat-active .cg-cat-n {
    color: rgba(11, 11, 14, 0.6);
}

/* 카테고리 페이지 상단 칩 바 */
.cg-cats-bar {
    max-width: 1200px;
    margin: 14px auto 20px;
    padding: 0 8px;
}

.cg-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto 18px;
    padding: 0 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--cg-heading);
}

.cg-section-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--cg-muted);
    background: var(--cg-surface);
    border: 1px solid var(--cg-border);
    border-radius: 999px;
    padding: 2px 9px;
}

/* ---------- E-1. 첫 글 피처드 카드 (홈 1페이지만) ---------- */
body.blog:not(.paged) .ast-blog-layout-4-grid .ast-row > article:first-child {
    grid-column: span 2;
}

body.blog:not(.paged) .ast-blog-layout-4-grid .ast-row > article:first-child .ast-blog-featured-section img {
    aspect-ratio: 21 / 9;
}

body.blog:not(.paged) .ast-blog-layout-4-grid .ast-row > article:first-child .entry-title {
    font-size: 23px;
}

@media (max-width: 921px) {
    body.blog:not(.paged) .ast-blog-layout-4-grid .ast-row > article:first-child {
        grid-column: span 2;
    }
}

@media (max-width: 544px) {
    body.blog:not(.paged) .ast-blog-layout-4-grid .ast-row > article:first-child {
        grid-column: auto;
    }
}

/* ---------- E-2. 카테고리 컬러 코딩 (계열별 은은한 구분) ----------
   여행/기록 = 앰버, 부트캠프 = 그린, 실전/팁 = 시안, 코어 dev = 인디고(기본) */
article.category-working-holiday .ast-taxonomy-container a {
    color: #fcd34d !important;
    background: rgba(252, 211, 77, 0.10);
}

article.category-woowacourse .ast-taxonomy-container a,
article.category-ssafy .ast-taxonomy-container a {
    color: #6ee7b7 !important;
    background: rgba(110, 231, 183, 0.10);
}

article.category-coding-practices .ast-taxonomy-container a,
article.category-coding-challenges .ast-taxonomy-container a,
article.category-quick-tips .ast-taxonomy-container a {
    color: #67e8f9 !important;
    background: rgba(103, 232, 249, 0.10);
}

/* ---------- E. 홈/아카이브 카드 ---------- */
/* 그리드: Astra flex(-1em 마진, 칼럼패딩 0 → 카드 맞닿음 실측)를
   CSS Grid 로 교체 — 균일 28px 간격, 동일 높이 카드 */
.ast-blog-layout-4-grid .ast-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.ast-blog-layout-4-grid .ast-row > article {
    width: auto !important;
    max-width: 100%;
    margin-bottom: 0 !important;
}

@media (max-width: 921px) {
    .ast-blog-layout-4-grid .ast-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 544px) {
    .ast-blog-layout-4-grid .ast-row {
        grid-template-columns: 1fr;
    }
}

/* 배경 페인트 주체는 내부 .ast-article-inner — 함께 강제 통일 */
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-post .ast-article-inner {
    background-color: var(--cg-surface) !important;
}

.ast-separate-container .ast-article-post {
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-r-lg);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease, background-color 0.2s ease;
}

.ast-separate-container .ast-article-post:hover,
.ast-separate-container .ast-article-post:hover .ast-article-inner {
    background-color: var(--cg-surface-hover) !important;
}

.ast-separate-container .ast-article-post:hover {
    transform: translateY(-4px);
    border-color: var(--cg-border-hover);
    box-shadow: var(--cg-shadow);
}

/* 카드 패딩 균일 고정 (이미지 유무 무관 동일 레이아웃) */
.ast-separate-container .ast-article-post .ast-article-inner {
    padding: 24px !important;
}

/* 썸네일: 인셋 + 라운드 (카드 여백 안에서 살짝 띄움)
   Astra는 remove-featured-img-padding 시 .post-thumb-img-content 에
   -1.5em 네거티브 마진을 걸므로(실측) 그 요소를 직접 0으로 강제 */
.ast-article-post .ast-blog-featured-section {
    margin: 0 0 18px !important;
}

.ast-article-post.remove-featured-img-padding .blog-layout-4 .post-content .ast-blog-featured-section .post-thumb-img-content,
.ast-article-post .post-thumb-img-content {
    margin: 0 !important;
}

.ast-article-post .ast-blog-featured-section img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover !important;
    border-radius: 10px;
    border: 1px solid var(--cg-border);
    transition: transform 0.3s ease;
    display: block;
}

.ast-article-post:hover .ast-blog-featured-section img {
    transform: scale(1.03);
}

.ast-article-post .post-thumb-img-content {
    overflow: hidden;
    border-radius: 10px;
}

/* 카테고리 라벨: 위계 붕괴 수정 → 칩 */
.ast-article-post .ast-taxonomy-container a {
    display: inline-block;
    font-size: 12px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cg-accent) !important;
    background: var(--cg-accent-dim);
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: 4px;
    text-decoration: none;
}

/* 카드 제목: 2줄 클램프, 가독성 강조(더 밝고 크게) */
.ast-article-post .entry-title {
    font-size: 19.5px;
    font-weight: 750;
    line-height: 1.5;
    margin-top: 10px;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    word-break: keep-all;
}

.ast-article-post .entry-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fafafa !important;
    transition: color 0.15s ease;
}

.ast-article-post .entry-title a:hover {
    color: var(--cg-accent);
}

/* 발췌문: 3줄 클램프, 뮤트 */
.ast-article-post .ast-excerpt-container p,
.ast-article-post .entry-content p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15.5px;
    line-height: 1.7;
    color: #a7a7b3;
    margin-bottom: 0;
}

/* 카드 메타: 작성자 숨김(1인 블로그), 날짜만 뮤트로.
   font-size:0 트릭 = "/" 구분자 텍스트노드까지 제거 */
.ast-article-post .entry-meta {
    font-size: 0 !important;
}

.ast-article-post .entry-meta .posted-by,
.ast-article-post .entry-meta .vcard {
    display: none;
}

.ast-article-post .entry-meta .posted-on,
.ast-article-post .entry-meta .published,
.ast-article-post .entry-meta .posted-on * {
    color: var(--cg-muted) !important;
    font-size: 13px !important;
}

/* ---------- F. 헤더/네비 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(11, 11, 14, 0.88) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cg-border);
}

/* 헤더 내부 모든 행/바의 개별 배경 제거 → 단일 톤 (2단 투톤 문제 해결) */
.site-header .ast-primary-header-bar,
.site-header .ast-above-header-bar,
.site-header .ast-below-header-bar,
.site-header [class*="site-header-primary-section"],
.site-header [class*="site-header-above-section"],
.site-header [class*="site-header-below-section"],
.site-header .site-primary-header-wrap,
.site-header .site-secondary-header-wrap,
.site-header .ast-header-sticked,
.site-header .main-header-bar {
    background: transparent !important;
    background-color: transparent !important;
}

.site-header .site-primary-header-wrap,
.site-header .site-header-primary-section-left,
.site-header .ast-primary-header-bar {
    min-height: 56px !important;
}

.site-header .site-secondary-header-wrap,
.site-header .ast-below-header-bar {
    min-height: 48px !important;
}

.ast-primary-header-bar .site-branding,
.site-header-primary-section-left {
    padding-top: 6px;
    padding-bottom: 6px;
}

.site-title,
.site-title a {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--cg-heading) !important;
    letter-spacing: -0.02em;
}

/* 데스크탑: 헤더의 카테고리 메뉴 숨김 (우아한형 — 헤더는 로고+검색만)
   카테고리 접근 = 홈 히어로 칩 클라우드. 모바일 햄버거 메뉴는 유지 */
@media (min-width: 922px) {
    .site-header .site-secondary-header-wrap,
    .site-header .ast-below-header-bar,
    .site-header [data-section="section-hb-menu-1"],
    .site-header .main-header-bar-navigation {
        display: none !important;
    }
}

/* 메뉴 칩 스타일 (모바일 메뉴 등 노출되는 곳에서 사용) */
.main-header-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 880px;
    margin: 0 auto;
    padding: 4px 0 10px;
}

.main-header-menu .menu-item {
    margin: 0 !important;
}

.main-header-menu .menu-link {
    display: inline-flex;
    align-items: center;
    font-size: 13.5px !important;
    font-weight: 500;
    line-height: 1.4 !important;
    color: var(--cg-text) !important;
    background: var(--cg-surface);
    border: 1px solid var(--cg-border) !important;
    border-radius: 999px !important;
    padding: 6px 14px !important;
    margin: 0;
    box-shadow: none !important;
    text-decoration: none !important;
    transition: transform 0.18s ease, background 0.18s ease,
        border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.main-header-menu .menu-item:hover > .menu-link {
    transform: translateY(-2px);
    background: var(--cg-surface-hover);
    border-color: var(--cg-border-hover) !important;
    color: var(--cg-heading) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

/* Astra 활성표시(밑줄 pseudo/보더) 전부 제거 */
.main-header-menu .menu-link::before,
.main-header-menu .menu-link::after,
.main-header-menu .menu-item.current-menu-item .menu-link::before,
.main-header-menu .menu-item.current-menu-item .menu-link::after {
    display: none !important;
    content: none !important;
}

.main-header-menu .current-menu-item > .menu-link,
.main-header-menu .current_page_item > .menu-link {
    color: #0b0b0e !important;
    background: var(--cg-accent) !important;
    border-color: var(--cg-accent) !important;
    font-weight: 700;
}

/* 드롭다운: 다크 패널 */
.main-header-menu .sub-menu {
    background: var(--cg-surface) !important;
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-r-md);
    box-shadow: var(--cg-shadow);
    padding: 6px;
    margin-top: 6px;
}

.main-header-menu .sub-menu .menu-link {
    font-size: 14px !important;
    border-radius: var(--cg-r-sm);
    padding: 8px 14px !important;
    border-bottom: none !important;
}

.main-header-menu .sub-menu .menu-item:hover > .menu-link {
    background: var(--cg-surface-hover);
    color: var(--cg-accent) !important;
}

/* 헤더 아래 구 메뉴줄(secondary) 배경 정리 */
.ast-above-header,
.ast-below-header,
[data-section="section-header-builder"] .site-secondary-header-wrap {
    background: transparent !important;
}

/* ---------- G. 기타 ---------- */
/* 페이지네이션: 원형 버튼 */
.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--cg-surface) !important;
    border: 1px solid var(--cg-border);
    color: var(--cg-text) !important;
    font-size: 14.5px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.navigation.pagination .page-numbers:hover {
    border-color: var(--cg-accent);
    color: var(--cg-accent) !important;
}

.navigation.pagination .page-numbers.current {
    background: var(--cg-accent) !important;
    border-color: var(--cg-accent);
    color: #0b0b0e !important;
    font-weight: 700;
}

/* 사이드바 위젯 */
.ast-separate-container .widget-area .widget,
.ast-separate-container .sidebar-main .widget,
#secondary .widget {
    background: var(--cg-surface) !important;
    border: 1px solid var(--cg-border);
    border-radius: 14px;
    padding: 24px !important;
    margin-bottom: 24px;
}

/* 최근 글 위젯: 소제목 부여 (위젯에 제목이 없어 정체불명이던 문제) */
#secondary .widget_recent_entries::before {
    content: '최근 글';
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cg-muted);
    margin-bottom: 14px;
}

#secondary .widget .wp-block-heading,
#secondary .widget-title {
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cg-muted) !important;
    margin-bottom: 14px;
}

#secondary .widget a {
    font-size: 14.5px;
    line-height: 1.9;
    color: var(--cg-text);
    text-decoration: none;
    transition: color 0.15s ease;
}

#secondary .widget a:hover {
    color: var(--cg-accent);
}

#secondary .widget li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cg-border);
}

#secondary .widget li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 이전/다음 글 네비 */
.post-navigation .nav-links > * {
    background: var(--cg-surface);
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-r-md);
    padding: 14px 18px;
    transition: border-color 0.15s ease;
}

.post-navigation .nav-links > *:hover {
    border-color: var(--cg-border-hover);
}

.post-navigation a {
    color: var(--cg-text);
}

.post-navigation a:hover {
    color: var(--cg-accent);
}

/* 카테고리/아카이브 페이지 타이틀 배너 — 컴팩트 */
.ast-archive-description {
    background: var(--cg-surface) !important;
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-r-md);
    padding: 16px 24px !important;
    margin-bottom: 24px;
}

.ast-archive-description .page-title,
.ast-archive-title {
    color: var(--cg-heading) !important;
    font-size: 22px !important;
    margin-bottom: 0 !important;
}

/* 목차 이중 박스 해소: lwptoc 를 담은 사이드바 위젯은 겉껍데기 제거 */
#secondary .widget:has(.lwptoc) {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* 본문 나란히 이미지 행 (마이그레이션 마크다운 표 잔재 변환분) */
.entry-content .cg-img-row {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.entry-content .cg-img-row img {
    width: 50%;
    min-width: 0;
    height: auto;
    object-fit: cover;
}

@media (max-width: 544px) {
    .entry-content .cg-img-row {
        flex-direction: column;
    }
    .entry-content .cg-img-row img {
        width: 100%;
    }
}

/* 관련 게시물 (Astra 내장) */
.ast-single-related-posts-container {
    background: transparent !important;
    padding-left: 0;
    padding-right: 0;
}

/* 관련 게시물: 빈 세로공간 제거(등높이 스트레치 해제) + 메타 정리 */
.ast-related-posts-wrapper {
    align-items: start !important;
}

.ast-related-post {
    height: auto !important;
}

.ast-related-post .comments-link,
.ast-related-post .posted-by {
    display: none !important;
}

/* 메타 구분자("/") 텍스트노드 제거 → 카테고리 링크만 표시 */
.ast-related-post .entry-meta {
    font-size: 0 !important;
}

.ast-related-post .entry-meta a[href*="/category/"] {
    font-size: 12.5px !important;
    color: var(--cg-muted) !important;
}

.ast-related-post .entry-meta a[href*="/category/"]:hover {
    color: var(--cg-accent) !important;
}

.ast-related-post img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--cg-r-sm);
    border: 1px solid var(--cg-border);
    margin-bottom: 12px;
}

.ast-related-posts-title {
    font-size: 20px !important;
    font-weight: 700;
    color: var(--cg-heading) !important;
    margin-bottom: 18px;
}

.ast-related-post {
    background: var(--cg-surface) !important;
    border: 1px solid var(--cg-border) !important;
    border-radius: var(--cg-r-md);
    padding: 18px 20px !important;
    transition: border-color 0.15s ease;
}

/* 카드 내부 요소 간격 (제목/이미지/메타가 모서리에 붙는 문제) */
.ast-related-post .entry-header,
.ast-related-post .entry-title {
    margin: 0 0 10px !important;
    padding: 0 !important;
}

.ast-related-post .entry-title a {
    line-height: 1.45;
    word-break: keep-all;
}

.ast-related-post .entry-meta {
    margin: 0 !important;
    padding: 0 !important;
}

.ast-related-post:hover {
    border-color: var(--cg-border-hover);
}

.ast-related-post .entry-title a {
    color: var(--cg-heading) !important;
    font-size: 16px;
}

.ast-related-post .entry-title a:hover {
    color: var(--cg-accent) !important;
}

.ast-related-post .entry-meta,
.ast-related-post .entry-meta * {
    color: var(--cg-muted) !important;
    font-size: 12.5px;
}

/* 푸터 — 새 팔레트로 재디자인 (구 남색/구 스타일 잔재 제거) */
.site-footer,
.site-footer [class*="ast-footer"],
.site-footer .ast-builder-grid-row,
.site-footer [class*="site-footer-section"] {
    background: var(--cg-bg) !important;
    background-color: var(--cg-bg) !important;
}

.site-footer {
    border-top: 1px solid var(--cg-border);
    margin-top: 48px;
    padding: 8px 0;
}

.site-footer,
.site-footer p,
.site-footer .ast-footer-copyright,
.site-footer .ast-footer-copyright * {
    font-size: 13px !important;
    color: var(--cg-muted) !important;
}

.site-footer a {
    font-size: 13px !important;
    color: var(--cg-text) !important;
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-footer a:hover {
    color: var(--cg-accent) !important;
}

/* 푸터 메뉴: 작은 칩 간격 */
.site-footer .menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 18px;
}

.site-footer .menu a {
    padding: 4px 0;
}

/* 검색 아이콘 */
.astra-search-icon {
    color: var(--cg-text);
}

.astra-search-icon:hover {
    color: var(--cg-accent);
}
