/*
Theme Name: VLog Custom Theme
Theme URI: https://dailybetter.blog
Author: Daily Better
Author URI: https://dailybetter.blog
Description: 청년 정책, IT, 자기계발, 라이프스타일을 다루는 커스텀 블로그 테마
Version: 3.0.18
Requires at least: 6.0
Tested up to: 6.4
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: vlog-theme
Tags: blog, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, modern, clean, responsive, mobile-optimized, accessibility-ready

  v3.0.0 — Premium refinement (동일 아이덴티티 유지, 품질만 상향)
  - 인디고 브랜드 컬러 유지, 무지개 카테고리 그라데이션 → 저채도 통일 배지
  - 좌측 색 세로바(page-header/privacy) 제거, 과한 그라데이션/글로우 절제
  - 타이포 위계·행간·여백 정돈, 한국어 장문 가독성 개선
  - 그림자/라운드 톤 정리, 다크모드 완성(수동 토글 + 시스템 선호)
*/

/* ==========================================================================
   CSS Variables & Design Tokens
   ========================================================================== */

:root {
    /* Brand Colors - Indigo (identity 유지) */
    --primary-color: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;

    /* Neutrals - Light Mode (slate, 정돈) */
    --text-color: #0f172a;
    --text-secondary: #46536a;
    --text-light: #94a3b8;
    --bg-color: #ffffff;
    --bg-secondary: #f7f8fb;
    --bg-tertiary: #eef1f6;
    --border-color: #e6e9ef;
    --border-subtle: rgba(15, 23, 42, 0.06);
    --card-bg: #ffffff;

    /* Category Colors - 단일 색조 저채도 (무지개 그라데이션 제거) */
    --category-youth: #6d5fe0;
    --category-it: #3b82f6;
    --category-self: #0ea371;
    --category-lifestyle: #e08a12;
    --category-etc: #64748b;

    /* Category Solid Colors (동일 값, 하위 호환) */
    --category-youth-solid: #6d5fe0;
    --category-it-solid: #3b82f6;
    --category-self-solid: #0ea371;
    --category-lifestyle-solid: #e08a12;
    --category-etc-solid: #64748b;

    /* Category tint backgrounds (배지 - 색채움 최소화) */
    --category-youth-tint: rgba(109, 95, 224, 0.10);
    --category-it-tint: rgba(59, 130, 246, 0.10);
    --category-self-tint: rgba(14, 163, 113, 0.10);
    --category-lifestyle-tint: rgba(224, 138, 18, 0.12);
    --category-etc-tint: rgba(100, 116, 139, 0.10);

    /* Shadows - 부드럽고 낮은 투명도 (프리미엄 elevation) */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 30px -8px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 48px -12px rgba(15, 23, 42, 0.14), 0 4px 10px rgba(15, 23, 42, 0.05);
    --shadow-2xl: 0 28px 60px -16px rgba(15, 23, 42, 0.20);

    /* Typography */
    --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Noto Sans KR", sans-serif;
    --font-heading: "Pretendard", -apple-system, BlinkMacSystemFont, "Noto Sans KR", sans-serif;
    --font-mono: ui-monospace, "SF Mono", Monaco, "Cascadia Code", "Courier New", monospace;

    /* Font Weights */
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;

    /* Spacing Scale */
    /* [2026-08-27 유동 오버홀] 여백 토큰을 clamp()로 — 화면 폭에 비례해 연속 반응(브레이크포인트 스냅 X).
       .container/.post-content 패딩·전 마진이 이 토큰을 쓰므로 토큰만 유동화하면 전 페이지가 화면에 맞춰 흐름.
       작은 xs/sm은 고정, 섹션급 lg~3xl일수록 큰 화면에서 더 넉넉(premium-ui: 숨쉬는 여백). */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: clamp(0.9rem, 0.83rem + 0.35vw, 1.125rem);
    --spacing-lg: clamp(1.15rem, 0.92rem + 1.05vw, 1.75rem);
    --spacing-xl: clamp(1.5rem, 1.13rem + 1.65vw, 2.5rem);
    --spacing-2xl: clamp(2rem, 1.35rem + 2.9vw, 3.5rem);
    --spacing-3xl: clamp(2.5rem, 1.5rem + 4.4vw, 5rem);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-full: 9999px;

    /* Container */
    --container-width: 1280px;
    --content-width: 760px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 240ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 360ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Glass / header */
    --header-bg: rgba(255, 255, 255, 0.72);
    --header-bg-scrolled: rgba(255, 255, 255, 0.9);
    --header-border: rgba(15, 23, 42, 0.06);
}

/* ==========================================================================
   Dark Mode Tokens — 시스템 선호 + 수동 토글(body.dark-mode) 모두 지원
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) {
        --text-color: #e8edf5;
        --text-secondary: #aab6c8;
        --text-light: #7c899e;
        --bg-color: #151b27;
        --bg-secondary: #0f141d;
        --bg-tertiary: #1c2333;
        --border-color: #29344a;
        --border-subtle: rgba(255, 255, 255, 0.07);
        --card-bg: #171e2b;

        --category-youth-tint: rgba(129, 140, 248, 0.16);
        --category-it-tint: rgba(96, 165, 250, 0.16);
        --category-self-tint: rgba(52, 211, 153, 0.16);
        --category-lifestyle-tint: rgba(245, 179, 66, 0.16);
        --category-etc-tint: rgba(148, 163, 184, 0.16);

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.55);
        --shadow-xl: 0 22px 50px -12px rgba(0, 0, 0, 0.6);

        --header-bg: rgba(15, 20, 29, 0.72);
        --header-bg-scrolled: rgba(15, 20, 29, 0.92);
        --header-border: rgba(255, 255, 255, 0.08);
    }
}

body.dark-mode {
    --text-color: #e8edf5;
    --text-secondary: #aab6c8;
    --text-light: #7c899e;
    --bg-color: #151b27;
    --bg-secondary: #0f141d;
    --bg-tertiary: #1c2333;
    --border-color: #29344a;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --card-bg: #171e2b;

    --category-youth-tint: rgba(129, 140, 248, 0.16);
    --category-it-tint: rgba(96, 165, 250, 0.16);
    --category-self-tint: rgba(52, 211, 153, 0.16);
    --category-lifestyle-tint: rgba(245, 179, 66, 0.16);
    --category-etc-tint: rgba(148, 163, 184, 0.16);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 22px 50px -12px rgba(0, 0, 0, 0.6);

    --header-bg: rgba(15, 20, 29, 0.72);
    --header-bg-scrolled: rgba(15, 20, 29, 0.92);
    --header-border: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: var(--font-base);
    font-size: clamp(1rem, 0.955rem + 0.2vw, 1.0625rem); /* [유동] 16→17px, 화면 비례 */
    line-height: 1.75;
    color: var(--text-color);
    background: #0f172a; /* footer 톤과 통일 (양옆 여백) */
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) { background: #0a0e15; }
}
body.dark-mode { background: #0a0e15; }

/* 모바일에서 모든 요소 강제 제한 */
@media (max-width: 768px) {
    html,
    body,
    #page,
    .site-main,
    .container,
    .single-post-layout,
    .single-post,
    .post-content-wrapper,
    article {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* [2026-08-27 모바일 우측 잘림 수정] 위 래퍼 overflow-x:hidden은 넘친 콘텐츠를 '잘라'버리므로
       (사용자 실증: 우측 여백 없이 글이 잘림), 콘텐츠 자체가 화면보다 넓어지지 않게 맞춘다.
       원인 실측: 본문 인라인 고정폭(width:480px/600px/768px 등)·white-space:nowrap 버튼·래퍼 없는 표. */
    .entry-content [style*="width"],
    .post-content [style*="width"] {
        max-width: 100% !important;   /* 인라인 고정폭 무력화 — 단말기 폭에 맞춰 축소 */
        box-sizing: border-box;
    }
    .entry-content img,
    .post-content img {
        max-width: 100% !important;
        height: auto !important;      /* 고정폭 이미지 비율 유지 축소 */
    }
    .entry-content table,
    .post-content table {
        /* [3.0.18] display:block+overflow-x는 3컬럼 비교표를 화면보다 넓게(306>295) 만들어 우측 잘림·
           가로스크롤 유발했음 → table-layout:fixed로 컬럼을 화면폭에 맞춰 나누고 셀 텍스트를 줄바꿈. */
        display: table;
        width: 100%;
        max-width: 100%;
        table-layout: fixed;
    }
    .entry-content th, .entry-content td,
    .post-content th, .post-content td {
        word-break: break-word;
        overflow-wrap: anywhere;
        padding: 0.5rem 0.6rem;       /* 모바일 셀 여백 축소 — 3컬럼도 여유 */
    }
    .entry-content [style*="nowrap"],
    .post-content [style*="nowrap"] {
        white-space: normal !important; /* 긴 버튼/문구 줄바꿈 허용 — nowrap 오버플로 방지 */
    }
}

/* 페이지 컨테이너 - footer를 하단에 고정 */
#page {
    background: var(--bg-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

.site-main {
    flex: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* 배경 - 절제된 단일 색조 (무지개 topographic 제거) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 1;
    background:
        radial-gradient(1200px 700px at 12% -5%, rgba(79, 70, 229, 0.04), transparent 60%),
        radial-gradient(1000px 600px at 100% 0%, rgba(6, 182, 212, 0.03), transparent 55%);
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light)::before {
        background:
            radial-gradient(1200px 700px at 12% -5%, rgba(129, 140, 248, 0.06), transparent 60%),
            radial-gradient(1000px 600px at 100% 0%, rgba(6, 182, 212, 0.05), transparent 55%);
    }
}
body.dark-mode::before {
    background:
        radial-gradient(1200px 700px at 12% -5%, rgba(129, 140, 248, 0.06), transparent 60%),
        radial-gradient(1000px 600px at 100% 0%, rgba(6, 182, 212, 0.05), transparent 55%);
}

::selection {
    background-color: rgba(79, 70, 229, 0.18);
    color: var(--text-color);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    line-height: 1.32;
    margin-bottom: var(--spacing-lg);
    color: var(--text-color);
    letter-spacing: -0.02em;
    word-break: keep-all;
}

h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.75rem);
    font-weight: var(--fw-extrabold);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

h3 {
    font-size: clamp(1.35rem, 2.6vw, 1.7rem);
}

h4 { font-size: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem); }   /* [유동] h1~h3처럼 화면 비례 */
h5 { font-size: clamp(1.1rem, 1.06rem + 0.2vw, 1.2rem); }
h6 { font-size: clamp(1.0rem, 0.97rem + 0.15vw, 1.075rem); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base);
    position: relative;
}

a:hover {
    color: var(--primary-dark);
}

strong, b {
    font-weight: var(--fw-semibold);
    color: var(--text-color);
}

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-tertiary);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    color: var(--primary-dark);
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) code { color: var(--primary-light); }
}
body.dark-mode code { color: var(--primary-light); }

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.content-wrapper {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* ==========================================================================
   Header - Refined Glassmorphism
   ========================================================================== */

.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border-bottom: 1px solid var(--header-border);
    padding: 0.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background var(--transition-base), box-shadow var(--transition-base);
    box-shadow: none;
    display: flex;
    align-items: flex-end;
}

.site-header.scrolled {
    background: var(--header-bg-scrolled);
    box-shadow: var(--shadow-sm);
}

.header-main {
    padding: 0.25rem 0;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 100;
}

@media (max-width: 768px) {
    .header-right {
        gap: 0.5rem;
    }

    .main-navigation {
        order: 1;
    }

    .theme-toggle {
        order: 2;
        margin-left: auto;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    position: relative;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 100;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.theme-toggle:hover,
.theme-toggle:active {
    border-color: var(--primary-color);
    transform: scale(1.04);
    box-shadow: var(--shadow-sm);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1;
}

.toggle-icon {
    font-size: 1.4rem;
    position: absolute;
    transition: all var(--transition-base);
    pointer-events: none;
}

/* Light mode - show sun, hide moon */
.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

/* 다크모드 아이콘 스와핑 (수동 토글) */
body.dark-mode .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

body.dark-mode .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

@media (max-width: 768px) {
    .theme-toggle {
        width: 2.75rem;
        height: 2.75rem;
        min-width: 44px;
        min-height: 44px;
    }

    .toggle-icon {
        font-size: 1.375rem;
    }
}

.site-logo a {
    font-size: 1.375rem;
    font-weight: var(--fw-medium);
    color: var(--text-color);
    letter-spacing: -0.01em;
    transition: opacity var(--transition-base);
    opacity: 0.92;
}

/* [2026-08-24] 커스텀 로고(PNG) — 검정 글자 로고가 다크 배경에 묻히던 것 반전으로 대응
   (그레이스케일 로고라 invert만으로 충분). 수동 토글(body.dark-mode)·시스템 선호 양쪽 커버.
   크기·정렬은 아래 "헤더 정렬 재조정" 블록에서 처리 */

/* [2026-08-24] 헤더 정렬·크기 재조정 — 커스터마이저 추가 CSS(인라인 !important 레거시)가
   ①로고 height:60px(태그라인 포함이라 글자가 작음) ②카테고리 메뉴를 absolute 오버레이
   padding-top:30px로 내려놓아, 로고는 위로 뜨고 바 아래가 비어 보였음. 인라인 블록이 더
   뒤에 로드되지만 !important 경쟁은 특이성으로 이기므로 셀렉터를 한 단계 깊게 써서 상쇄.
   태그라인("어제보다 나은 오늘을")은 브랜드 핵심(사용자 지시) — 단 PNG 축소 시 5px대로
   뭉개져서, 이미지는 워드마크만 크롭하고 태그라인은 header.php의 .site-tagline 실제
   텍스트(13px, 카테고리 링크 14px 수준)로 분리 렌더. 워드마크 글자 ≈15px */
.site-header .site-logo .custom-logo {
    height: 44px !important;
    width: auto !important;
    aspect-ratio: 365 / 205;
    object-fit: cover;
    object-position: top;
    display: block;
}

.site-header .site-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* [2026-08-24] 태그라인 폭은 위 워드마크(≈80px)와 나란히 떨어지게 — 13px로 키웠더니
   워드마크보다 옆으로 길게 튀어나와 "너무 크다"(사용자). 10px + 자간 압축으로 폭을
   워드마크·카테고리 항목 수준에 맞춤 */
/* [2026-08-24] 워드마크 = 원본 PNG 줄 단위 스프라이트 — 텍스트 렌더는 서체(슬랩 세리프)가
   달라져 기각(사용자). 원본 로고에서 daily(y19–105)·better(y115–181)를 각각 잘라 쌓아
   원본 서체 그대로 유지하면서 줄간격만 10px→2px 압축. 스케일 0.25배 기준 px 계산.
   다크모드는 그레이스케일 로고라 invert(1)로 반전 */
.site-wordmark {
    display: block;
    line-height: 0;
}

.site-wordmark .wm-l1,
.site-wordmark .wm-l2 {
    display: block;
    background-image: url('https://dailybetter.kr/wp-content/uploads/2026/07/dailybetter-logo-final.png');
    background-repeat: no-repeat;
    background-size: 91.25px auto;
}

.site-wordmark .wm-l1 {
    width: 50px;
    height: 22px;
    background-position: -3.75px -4.75px;
}

.site-wordmark .wm-l2 {
    width: 66px;
    height: 17px;
    background-position: -18.25px -28.75px;
    margin: 2px 0 0 14px;
}

body.dark-mode .site-wordmark .wm-l1,
body.dark-mode .site-wordmark .wm-l2 { filter: invert(1); }

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) .site-wordmark .wm-l1,
    body:not(.light-mode):not(.force-light) .site-wordmark .wm-l2 { filter: invert(1); }
}

.site-tagline {
    display: block;
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px solid var(--border-color);
    font-size: 0.625rem;
    letter-spacing: -0.02em;
    color: var(--text-secondary);
    line-height: 1;
    white-space: nowrap;
}

/* 헤더 아래 숨통 — 본문·배너가 헤더에 바로 붙어 답답하던 것(사용자) */
.site-main {
    padding-top: 1.25rem;
}

.site-header .site-logo .custom-logo-link {
    display: block !important;
    line-height: 0;
}

body .site-header {
    align-items: center !important;
    /* [2026-08-24] 0.3rem → 0.7rem: 로고 블록이 바 상하단에 5px 간격으로 붙어
       "여백이 아예 없다"(사용자) — 로고 주변 숨통 확보 */
    padding: 0.7rem 0 !important;
}

.site-header .header-main {
    padding: 0 !important;
    display: flex;
    align-items: center;
}

body .site-header .category-nav {
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.dark-mode .site-logo .custom-logo {
    filter: invert(1);
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) .site-logo .custom-logo {
        filter: invert(1);
    }
}

.site-logo a:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-xs);
}

.main-navigation a {
    color: var(--text-secondary);
    font-weight: var(--fw-medium);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.main-navigation a:hover {
    color: var(--primary-color);
    background: var(--bg-tertiary);
}

/* ==========================================================================
   Post Grid - Refined Card Layout
   ========================================================================== */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
}

.post-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    border: 1px solid var(--border-subtle);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

/* 표면 상단 하이라이트 (은은한 빛 립) */
.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) .post-card::before {
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    }
}
body.dark-mode .post-card::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-tertiary);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(15, 23, 42, 0.18) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.post-card:hover .post-thumbnail::after {
    opacity: 1;
}

.post-content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-categories {
    margin-bottom: var(--spacing-md);
}

/* 배지 - 저채도 틴트 + 색 텍스트 (색채움 최소화, 대문자/자간 제거) */
.post-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: var(--fw-semibold);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    margin-right: var(--spacing-xs);
    letter-spacing: 0;
    text-transform: none;
    background: var(--category-etc-tint);
    color: var(--category-etc-solid);
    transition: background var(--transition-base);
}

.post-category.category-youth-policy {
    background: var(--category-youth-tint);
    color: var(--category-youth-solid);
}

.post-category.category-it {
    background: var(--category-it-tint);
    color: var(--category-it-solid);
}

.post-category.category-self-development {
    background: var(--category-self-tint);
    color: var(--category-self-solid);
}

.post-category.category-lifestyle {
    background: var(--category-lifestyle-tint);
    color: var(--category-lifestyle-solid);
}

.post-category.category-etc {
    background: var(--category-etc-tint);
    color: var(--category-etc-solid);
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) .post-category { color: #cbd5e1; }
    body:not(.light-mode):not(.force-light) .post-category.category-youth-policy { color: #a5b4fc; }
    body:not(.light-mode):not(.force-light) .post-category.category-it { color: #93c5fd; }
    body:not(.light-mode):not(.force-light) .post-category.category-self-development { color: #6ee7b7; }
    body:not(.light-mode):not(.force-light) .post-category.category-lifestyle { color: #fcd34d; }
    body:not(.light-mode):not(.force-light) .post-category.category-etc { color: #cbd5e1; }
}
body.dark-mode .post-category { color: #cbd5e1; }
body.dark-mode .post-category.category-youth-policy { color: #a5b4fc; }
body.dark-mode .post-category.category-it { color: #93c5fd; }
body.dark-mode .post-category.category-self-development { color: #6ee7b7; }
body.dark-mode .post-category.category-lifestyle { color: #fcd34d; }
body.dark-mode .post-category.category-etc { color: #cbd5e1; }

.post-category:hover {
    background: var(--bg-tertiary);
}

.post-title {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.42;
    letter-spacing: -0.01em;
}

.post-title a {
    color: var(--text-color);
    background: linear-gradient(to right, var(--primary-color), var(--primary-color)) no-repeat;
    background-size: 0% 1.5px;
    background-position: left bottom;
    transition: background-size var(--transition-base), color var(--transition-base);
}

.post-card:hover .post-title a {
    background-size: 100% 1.5px;
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    flex: 1;
    line-height: 1.72;
    font-size: 0.95rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.8125rem;
    color: var(--text-light);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-subtle);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ==========================================================================
   Single Post Layout (3-column with sidebars)
   ========================================================================== */

.single-post-layout {
    display: grid;
    /* [2026-08-27 우측여백 근본수정] 1fr = minmax(auto,1fr)이라 안 줄어드는 넓은 콘텐츠(표 등)에
       트랙이 늘어나 컨테이너를 넘고 우측 패딩을 먹었음 → minmax(0,1fr)로 트랙이 컨테이너에 맞춰 축소. */
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-xl);
    max-width: 100%;
    width: 100%;
}

.single-post {
    padding: var(--spacing-lg) 0;
    width: 100%;
    max-width: 100%;
}

.toc-sidebar {
    display: none;
}

.post-nav-sidebar {
    display: none;
}

@media (min-width: 1200px) {
    .single-post-layout {
        grid-template-columns: 250px minmax(0, 1fr) 280px;
        max-width: var(--container-width);
        margin: 0 auto;
    }

    .toc-sidebar,
    .post-nav-sidebar {
        display: block;
    }

    /* 사이드바 sticky - 스크롤 시 따라오게 */
    .toc-wrapper,
    .post-nav-wrapper {
        position: sticky;
        top: 90px;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .single-post-layout {
        grid-template-columns: minmax(0, 1fr);
        max-width: 860px;
        margin: 0 auto;
    }
}

/* Post Header - 그라데이션 클립 제거, 또렷한 잉크 타이포 */
.post-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-2xl) var(--spacing-lg);
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
}

.post-header .post-title {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
    letter-spacing: -0.03em;
    line-height: 1.28;
    -webkit-text-fill-color: currentColor;
}

.post-featured-image {
    margin-bottom: var(--spacing-2xl);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Entry Content - 한국어 장문 가독성 최우선
   ========================================================================== */

.entry-content {
    font-size: clamp(1.05rem, 1.0rem + 0.28vw, 1.15rem); /* [유동] 본문 ~16.8→18.4px, 큰 화면서 가독성↑ */
    line-height: 1.85;
    color: var(--text-color);
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
}

.entry-content p {
    color: var(--text-color);
    margin-bottom: 1.35rem;
}

.entry-content > p:first-of-type {
    color: var(--text-color);
}

.entry-content br,
.post-excerpt br,
.archive-description br,
.post-content br {
    display: block !important;
    content: "" !important;
    margin: 0.4em 0 !important;
    line-height: 0 !important;
}

.post-excerpt,
.archive-description {
    white-space: normal;
}

.post-excerpt p,
.archive-description p {
    margin-bottom: 0.75em;
}

.entry-content h2,
.entry-content h3 {
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.entry-content h2 {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.entry-content ul,
.entry-content ol {
    margin: 1.35rem 0;
    padding-left: 1.5rem;
    color: var(--text-color);
}

.entry-content li {
    margin-bottom: 0.6rem;
    color: var(--text-color);
}

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

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: var(--spacing-2xl) 0;
    box-shadow: var(--shadow-md);
}

.entry-content figure {
    margin: var(--spacing-2xl) 0;
}

.entry-content figcaption {
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 0.75rem;
    line-height: 1.5;
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(79, 70, 229, 0.35);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
    transition: text-decoration-color var(--transition-base), color var(--transition-base);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

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

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) .entry-content a { color: var(--primary-light); text-decoration-color: rgba(129, 140, 248, 0.4); }
    body:not(.light-mode):not(.force-light) .entry-content a:hover { color: #a5b4fc; }
}
body.dark-mode .entry-content a { color: var(--primary-light); text-decoration-color: rgba(129, 140, 248, 0.4); }
body.dark-mode .entry-content a:hover { color: #a5b4fc; }

/* 인용구 - 편집적 좌측 규칙 (상태 스트라이프 아님) */
.entry-content blockquote,
.entry-content .wp-block-quote {
    margin: var(--spacing-xl) 0;
    padding: 0.5rem 0 0.5rem 1.5rem;
    border-left: 3px solid var(--primary-light);
    background: transparent;
    color: var(--text-secondary);
    font-style: normal;
}

.entry-content blockquote p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* 코드 블록 */
.entry-content pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    padding: 1.15rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: var(--spacing-xl) 0;
}

.entry-content code {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.entry-content pre code {
    white-space: pre;
    word-break: normal;
    background: transparent;
    padding: 0;
    color: inherit;
}

/* 표 - 깔끔한 편집 테이블 */
.entry-content table {
    border-collapse: collapse;
    margin: var(--spacing-xl) 0;
    font-size: 0.95rem;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.entry-content table th {
    background: var(--bg-tertiary);
    color: var(--text-color);
    font-weight: var(--fw-semibold);
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.entry-content table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.entry-content table tr:last-child td {
    border-bottom: none;
}

/* 구분선 */
.entry-content hr,
.entry-content .wp-block-separator {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-2xl) 0;
}

/* Gutenberg 표 블록 (과거 글 호환) */
.entry-content .wp-block-table table {
    width: 100%;
}

.entry-content .wp-block-table figcaption {
    text-align: center;
}

/* Gutenberg 코드 블록 (과거 글 호환) */
.entry-content .wp-block-code {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
    margin: var(--spacing-xl) 0;
}

/* WP 블록 요소 폭 제한 */
.entry-content .wp-block-image,
.entry-content .wp-block-embed,
.entry-content .wp-block-gallery,
.entry-content .wp-block-video,
.entry-content .wp-block-cover {
    max-width: 100%;
}

/* WP 버튼 블록 */
.entry-content .wp-block-button__link {
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 0.7rem 1.4rem;
    font-weight: var(--fw-semibold);
    transition: background var(--transition-base);
}

.entry-content .wp-block-button__link:hover {
    background: var(--primary-dark);
}

/* 버튼형 인라인 링크 (본문 신청 버튼류) 모바일 잘림 방지 */
.entry-content a[style*="inline-block"] {
    white-space: normal;
    max-width: 100%;
    word-break: keep-all;
}

/* Mermaid / 인라인 SVG 다이어그램 컨테이너 - 중앙 정렬·오버플로 대응 */
.entry-content svg {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--spacing-xl) auto;
}

/* ==========================================================================
   TOC Sidebar (좌측 목차) — 신규 정돈 스타일
   ========================================================================== */

.toc-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.25rem 1.35rem;
    box-shadow: var(--shadow-sm);
}

.toc-title {
    font-size: 0.9rem;
    font-weight: var(--fw-semibold);
    color: var(--text-color);
    margin-bottom: 0.9rem;
    letter-spacing: -0.01em;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toc-nav a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition-base), background var(--transition-base);
    word-break: keep-all;
}

.toc-nav a:hover,
.toc-nav a.active {
    color: var(--primary-color);
    background: var(--bg-tertiary);
}

/* ==========================================================================
   연관 추천 글 Sidebar (우측) — 신규 정돈 스타일
   ========================================================================== */

.post-nav-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.post-nav-title {
    font-size: 0.9rem;
    font-weight: var(--fw-semibold);
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.nav-item {
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: opacity var(--transition-base);
}

.nav-item:last-child {
    border-bottom: none;
}

.nav-item:hover {
    opacity: 0.85;
}

.nav-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: var(--fw-semibold);
    color: var(--text-light);
    margin-bottom: 0.35rem;
}

.nav-post-title {
    display: block;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-color);
    font-weight: var(--fw-medium);
    word-break: keep-all;
    transition: color var(--transition-base);
}

.nav-item:hover .nav-post-title {
    color: var(--primary-color);
}

/* ==========================================================================
   연관 추천 글 - 하단 그리드 (related-posts-section)
   ========================================================================== */

.related-posts-section {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-subtle);
}

.related-posts-title,
.section-title {
    /* section-title 은 functions.php 인라인 스타일이 우선 적용됨 (본문 내). 여기선 하단 위젯용 폴백. */
    font-size: 1.35rem;
    font-weight: var(--fw-bold);
    color: var(--text-color);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-lg);
}

.related-post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
}

.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.related-post-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-post-categories .post-category {
    margin-bottom: 0.25rem;
}

.related-post-title {
    font-size: 1rem;
    line-height: 1.45;
    color: var(--text-color);
    font-weight: var(--fw-semibold);
    word-break: keep-all;
}

.related-post-title a {
    color: var(--text-color);
    transition: color var(--transition-base);
}

.related-post-card:hover .related-post-title a {
    color: var(--primary-color);
}

.related-post-excerpt {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.related-post-meta {
    font-size: 0.78rem;
    color: var(--text-light);
}

/* ==========================================================================
   Post Footer / Tags
   ========================================================================== */

.post-footer {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-subtle);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.post-tags strong {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: var(--fw-semibold);
    margin-right: 0.25rem;
}

.post-tags .tag,
a.tag {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    transition: color var(--transition-base), background var(--transition-base);
}

.post-tags .tag:hover,
a.tag:hover {
    color: var(--primary-color);
    background: var(--category-it-tint);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: linear-gradient(180deg, #131a28 0%, #0f172a 100%);
    color: #94a3b8;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-content a {
    color: #cbd5e1;
}

.footer-content a:hover {
    color: #fff;
}

.footer-policy-links {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* ==========================================================================
   Category Navigation Bar
   ========================================================================== */

.category-nav {
    background: transparent;
    border-bottom: none;
    padding: 0 0 0.25rem 0;
    flex: 1;
    min-width: 0;
}

.category-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-menu li {
    position: relative;
}

.category-menu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: var(--fw-medium);
    transition: all var(--transition-base);
    position: relative;
}

.category-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.category-menu li a:hover::after {
    transform: scaleX(1);
    opacity: 0.5;
}

.category-menu li.active a::after {
    transform: scaleX(1);
}

.cat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transition: transform var(--transition-base);
}

.cat-youth .cat-dot { background: var(--category-youth-solid); }
.cat-youth a { color: var(--text-secondary); }
.cat-youth.active a,
.cat-youth a:hover { color: var(--category-youth-solid); }
.cat-youth.active a::after { background: var(--category-youth-solid); }

.cat-it .cat-dot { background: var(--category-it-solid); }
.cat-it a { color: var(--text-secondary); }
.cat-it.active a,
.cat-it a:hover { color: var(--category-it-solid); }
.cat-it.active a::after { background: var(--category-it-solid); }

.cat-self .cat-dot { background: var(--category-self-solid); }
.cat-self a { color: var(--text-secondary); }
.cat-self.active a,
.cat-self a:hover { color: var(--category-self-solid); }
.cat-self.active a::after { background: var(--category-self-solid); }

.cat-lifestyle .cat-dot { background: var(--category-lifestyle-solid); }
.cat-lifestyle a { color: var(--text-secondary); }
.cat-lifestyle.active a,
.cat-lifestyle a:hover { color: var(--category-lifestyle-solid); }
.cat-lifestyle.active a::after { background: var(--category-lifestyle-solid); }

.cat-etc .cat-dot { background: var(--category-etc-solid); }
.cat-etc a { color: var(--text-secondary); }
.cat-etc.active a,
.cat-etc a:hover { color: var(--category-etc-solid); }
.cat-etc.active a::after { background: var(--category-etc-solid); }

.category-menu li a:hover .cat-dot {
    transform: scale(1.4);
}

@media (max-width: 768px) {
    .category-menu {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 0.4rem 0.25rem;
        gap: 0.15rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-menu::-webkit-scrollbar {
        display: none;
    }

    .category-menu li a {
        padding: 0.5rem 0.85rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }
}

/* ==========================================================================
   Category / Archive Page Header — 좌측 색바 제거 (anti-pattern)
   ========================================================================== */

.page-header {
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-2xl);
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-subtle);
}

/* ══ [2026-08-24] AI 클리셰 좌측 색 세로바 전면 제거 (사용자 재지적, premium-ui #1) ══
   v3.0.0에서 카드 색바는 제거했지만 두 곳이 살아남았음: ①커스터마이저 인라인 CSS가
   카테고리별로 h2.section-title·.tip-box에 4px 색바를 !important로 강제 ②본문 인라인
   스타일(border-left: 4px solid ...)이 글마다 박힘. 인라인 CSS·인라인 스타일 모두
   "더 높은 특이성 + !important"로만 이길 수 있음. blockquote의 얇은 인용선은 관행 유지 */
body[class*="category-"] .entry-content h2.section-title,
body .entry-content h2.section-title {
    border-left: 0 !important;
    padding-left: 0 !important;
}

body[class*="category-"] .entry-content .tip-box,
body .entry-content .tip-box,
body .entry-content .action-box,
body .entry-content .philosophy-box,
body .entry-content div[style*="border-left"] {
    border-left-width: 1px !important;
}

/* ══ [2026-08-24] 본문 인라인 스타일 다크모드 정규화 (사용자: "어둡다가 갑자기 눈아픔") ══
   발행 글 본문은 생성 시점의 라이트 기준 인라인 스타일 고정이라 다크모드에서 두 증상:
   ①어두운 글자색(#334155 등 1,300여 개소)이 다크 배경에 묻혀 가독성 붕괴 ②밝은 박스
   배경(#eff6ff 등 500여 개소)이 그대로 떠서 눈부심. 전체 95개 글에서 실사용 색상값을
   전수 추출해 의미 보존 매핑: 중립 회색→테마 텍스트 변수, 시맨틱 색(경고 빨강·안내
   파랑·긍정 초록)→같은 계열의 밝은 톤, 밝은 틴트 배경→같은 색상의 저투명 다크 틴트 */
body.dark-mode .entry-content [style*="#eff6ff"],
body.dark-mode .entry-content [style*="#f0f7ff"] { background-color: rgba(96, 165, 250, 0.10) !important; }
body.dark-mode .entry-content [style*="#fff4f4"] { background-color: rgba(248, 113, 113, 0.10) !important; }
body.dark-mode .entry-content [style*="#f5f3ff"] { background-color: rgba(139, 92, 246, 0.10) !important; }
body.dark-mode .entry-content [style*="#ecfdf5"],
body.dark-mode .entry-content [style*="#f0fdf4"] { background-color: rgba(74, 222, 128, 0.08) !important; }
body.dark-mode .entry-content [style*="#fffbeb"] { background-color: rgba(245, 158, 11, 0.10) !important; }
body.dark-mode .entry-content [style*="background-color: #ffffff"],
body.dark-mode .entry-content [style*="background: #ffffff"],
body.dark-mode .entry-content [style*="#f8fafc"],
body.dark-mode .entry-content [style*="#f9fafb"] { background-color: var(--bg-tertiary) !important; }
body.dark-mode .entry-content [style*="color: #1e293b"],
body.dark-mode .entry-content [style*="color: #334155"],
body.dark-mode .entry-content [style*="color: #374151"],
body.dark-mode .entry-content [style*="color: #2d3748"],
body.dark-mode .entry-content [style*="color: #2c2c2c"] { color: var(--text-color) !important; }
body.dark-mode .entry-content [style*="color: #475569"],
body.dark-mode .entry-content [style*="color: #4b5563"] { color: var(--text-secondary) !important; }
body.dark-mode .entry-content [style*="color: #991b1b"],
body.dark-mode .entry-content [style*="color: #7f1d1d"],
body.dark-mode .entry-content [style*="color: #b91c1c"],
body.dark-mode .entry-content [style*="color: #dc2626"] { color: #fca5a5 !important; }
body.dark-mode .entry-content [style*="color: #16a34a"],
body.dark-mode .entry-content [style*="color: #065f46"] { color: #6ee7b7 !important; }
body.dark-mode .entry-content [style*="color: #1e3a8a"] { color: #93c5fd !important; }
body.dark-mode .entry-content .tip-box,
body.dark-mode .entry-content .action-box { background-color: var(--bg-tertiary) !important; border-color: var(--border-color) !important; }
body.dark-mode .entry-content .tip-box h3,
body.dark-mode .entry-content .tip-box p,
body.dark-mode .entry-content .tip-box li,
body.dark-mode .entry-content .action-box h3,
body.dark-mode .entry-content .action-box p,
body.dark-mode .entry-content .action-box li { color: var(--text-color); }
/* 소제목 다크 가독성 — base.css가 #2c2c2c !important(라이트 기준)로 고정한 것 상쇄 */
body.dark-mode .entry-content h2.section-title,
body.dark-mode .entry-content h3.sub-section-title { color: var(--text-color) !important; }
/* 인사말·마무리 문구 등 base.css 고정 어두운 글자(!important 포함) 다크 상쇄 — 전수 대응 */
body.dark-mode .entry-content .intro-greeting,
body.dark-mode .entry-content .dream-message,
body.dark-mode .entry-content .brand-footer-box p { color: var(--text-color) !important; }

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) .entry-content [style*="#eff6ff"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="#f0f7ff"] { background-color: rgba(96, 165, 250, 0.10) !important; }
    body:not(.light-mode):not(.force-light) .entry-content [style*="#fff4f4"] { background-color: rgba(248, 113, 113, 0.10) !important; }
    body:not(.light-mode):not(.force-light) .entry-content [style*="#f5f3ff"] { background-color: rgba(139, 92, 246, 0.10) !important; }
    body:not(.light-mode):not(.force-light) .entry-content [style*="#ecfdf5"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="#f0fdf4"] { background-color: rgba(74, 222, 128, 0.08) !important; }
    body:not(.light-mode):not(.force-light) .entry-content [style*="#fffbeb"] { background-color: rgba(245, 158, 11, 0.10) !important; }
    body:not(.light-mode):not(.force-light) .entry-content [style*="background-color: #ffffff"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="background: #ffffff"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="#f8fafc"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="#f9fafb"] { background-color: var(--bg-tertiary) !important; }
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #1e293b"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #334155"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #374151"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #2d3748"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #2c2c2c"] { color: var(--text-color) !important; }
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #475569"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #4b5563"] { color: var(--text-secondary) !important; }
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #991b1b"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #7f1d1d"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #b91c1c"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #dc2626"] { color: #fca5a5 !important; }
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #16a34a"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #065f46"] { color: #6ee7b7 !important; }
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #1e3a8a"] { color: #93c5fd !important; }
    body:not(.light-mode):not(.force-light) .entry-content .tip-box,
    body:not(.light-mode):not(.force-light) .entry-content .action-box { background-color: var(--bg-tertiary) !important; border-color: var(--border-color) !important; }
    body:not(.light-mode):not(.force-light) .entry-content .tip-box h3,
    body:not(.light-mode):not(.force-light) .entry-content .tip-box p,
    body:not(.light-mode):not(.force-light) .entry-content .tip-box li,
    body:not(.light-mode):not(.force-light) .entry-content .action-box h3,
    body:not(.light-mode):not(.force-light) .entry-content .action-box p,
    body:not(.light-mode):not(.force-light) .entry-content .action-box li { color: var(--text-color); }
    /* 소제목 다크 가독성 — base.css의 #2c2c2c !important(라이트 기준) 상쇄 */
    body:not(.light-mode):not(.force-light) .entry-content h2.section-title,
    body:not(.light-mode):not(.force-light) .entry-content h3.sub-section-title { color: var(--text-color) !important; }
    /* 인사말·마무리 문구 등 base.css 고정 어두운 글자(!important 포함) 다크 상쇄 — 전수 대응 */
    body:not(.light-mode):not(.force-light) .entry-content .intro-greeting,
    body:not(.light-mode):not(.force-light) .entry-content .dream-message,
    body:not(.light-mode):not(.force-light) .entry-content .brand-footer-box p { color: var(--text-color) !important; }
}

/* [2026-08-24] 카테고리/아카이브 배너 다크모드 누락 수정 — custom.css의 `.page-header
   {background:#fafafa}`가 뒤에 로드돼 이기면서, 시스템 다크 선호일 때 다크 화면에 흰
   배너가 반전돼 보였음(수동 토글 body.dark-mode 경로만 custom.css에 대응돼 있었음).
   더 높은 특이성으로 시스템 선호 경로를 커버 */
@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) .page-header {
        background: var(--card-bg);
        border-color: var(--border-subtle);
    }
}

.page-header .page-title {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    margin-bottom: var(--spacing-sm);
    font-weight: var(--fw-bold);
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.page-header .archive-description {
    font-size: 1rem;
    line-height: 1.7;
    margin-top: var(--spacing-sm);
    color: var(--text-secondary);
}

/* 카테고리 식별은 좌측 스트라이프 대신 '제목 색상'으로만 (절제) */
.category-youth_tips .page-header .page-title,
.category-youth-tips .page-header .page-title,
.category-youth-policy .page-header .page-title,
.category-youth_policy .page-header .page-title {
    color: var(--category-youth-solid);
}

.category-it .page-header .page-title {
    color: var(--category-it-solid);
}

.category-selfdevelop .page-header .page-title,
.category-self-develop .page-header .page-title,
.category-self-development .page-header .page-title,
.category-self_development .page-header .page-title {
    color: var(--category-self-solid);
}

.category-life .page-header .page-title,
.category-lifestyle .page-header .page-title {
    color: var(--category-lifestyle-solid);
}

.category-etc .page-header .page-title {
    color: var(--category-etc-solid);
}

@media (max-width: 768px) {
    .page-header {
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-xl);
    }

    .page-header .page-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blur-bg {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.animate-in {
    animation: fadeInUp var(--transition-slow) ease-out;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 2000px 100%;
    animation: shimmer 2s infinite linear;
}

/* ==========================================================================
   PC버전/모바일버전 전환 기능
   ========================================================================== */

.viewport-toggle-wrapper {
    text-align: center;
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.viewport-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: var(--fw-medium);
    cursor: pointer;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.viewport-toggle-btn:hover,
.viewport-toggle-btn:active {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    transform: scale(1.02);
}

.viewport-toggle-btn .toggle-text {
    display: none;
}

@media (max-width: 768px) {
    .viewport-toggle-btn .mobile-view {
        display: inline;
    }
}

@media (min-width: 769px) {
    .viewport-toggle-btn .desktop-view {
        display: inline;
    }
}

body.force-desktop-view .viewport-toggle-btn .mobile-view {
    display: none !important;
}

body.force-desktop-view .viewport-toggle-btn .desktop-view {
    display: inline !important;
}

body.force-desktop-view {
    min-width: 1024px;
}

@media (max-width: 768px) {
    body.force-desktop-view {
        overflow-x: auto;
    }

    body.force-desktop-view #page {
        min-width: 1024px;
        width: 100%;
    }
}

/* ==========================================================================
   전역 반응형 유틸 (이미지/테이블/iframe)
   ========================================================================== */

img {
    max-width: 100%;
    height: auto;
}

table {
    max-width: 100%;
}

iframe {
    max-width: 100%;
}

@media (max-width: 768px) {
    iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* 한글/영문 혼합 텍스트 최적화 */
.entry-content p,
.entry-content li,
.entry-content span,
.entry-content div:not(.post-meta) {
    word-break: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ==========================================================================
   모바일 반응형
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
    }

    body {
        font-size: 16px;
    }

    .header-content {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-xs);
    }

    .main-navigation a {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8125rem;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .post-card .post-content {
        padding: 1.5rem !important;
    }

    .post-card .post-categories {
        margin-bottom: 1rem !important;
    }

    .post-card .post-title {
        margin-bottom: 0.9rem !important;
        line-height: 1.45 !important;
        font-size: 1.2rem !important;
    }

    .post-card .post-excerpt {
        margin-bottom: 1.25rem !important;
        line-height: 1.75 !important;
        font-size: 0.9375rem !important;
    }

    .post-card .post-excerpt p {
        margin-bottom: 0.75rem !important;
    }

    .post-card .post-meta {
        margin-top: 0.9rem !important;
        padding-top: 0.9rem !important;
    }

    .site-header {
        overflow: hidden;
        max-width: 100%;
    }

    .header-content {
        width: 100%;
        max-width: 100%;
    }

    .container {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .post-content {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .single-post-layout,
    .single-post,
    .post-content-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0 !important;
        margin: 0;
        box-sizing: border-box;
    }

    .post-header {
        padding: 1.5rem 1.25rem;
        margin-bottom: 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }

    .post-title {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
        line-height: 1.32;
        margin-bottom: 1rem;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: keep-all !important;
        max-width: 100% !important;
        width: 100%;
        white-space: normal !important;
    }

    .post-meta {
        font-size: 0.8125rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .post-categories {
        margin-bottom: 1rem;
    }

    /* 본문 - 모바일 가독성 */
    .entry-content {
        padding: 0 !important;
        font-size: 1.0625rem;
        line-height: 1.8;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .entry-content * {
        box-sizing: border-box;
        max-width: 100%;
    }

    .entry-content h1 {
        font-size: 1.7rem;
        margin-top: 2.25rem;
        margin-bottom: 1rem;
        line-height: 1.32;
    }

    .entry-content h2 {
        font-size: 1.45rem;
        margin-top: 2rem;
        margin-bottom: 0.85rem;
        line-height: 1.35;
    }

    .entry-content h3 {
        font-size: 1.22rem;
        margin-top: 1.75rem;
        margin-bottom: 0.7rem;
        line-height: 1.4;
    }

    .entry-content h4,
    .entry-content h5,
    .entry-content h6 {
        font-size: 1.1rem;
        margin-top: 1.5rem;
        margin-bottom: 0.7rem;
        line-height: 1.4;
    }

    .entry-content p {
        margin-bottom: 1.2rem;
    }

    .entry-content ul,
    .entry-content ol {
        margin: 1.2rem 0;
        padding-left: 1.5rem;
    }

    .entry-content li {
        margin-bottom: 0.6rem;
    }

    .entry-content pre {
        font-size: 0.8125rem;
        padding: 1rem;
        margin: 1.25rem 0;
        overflow-x: auto;
    }

    .entry-content table {
        display: table;               /* [3.0.18] table-layout 작동하도록 block 제거 */
        width: 100%;
        table-layout: fixed;
        font-size: 0.875rem;
        margin: 1.5rem 0;
    }

    .entry-content figure,
    .entry-content img {
        margin: 1.5rem 0;
    }

    .entry-content blockquote {
        margin: 1.5rem 0;
        padding: 0.5rem 0 0.5rem 1.25rem;
    }

    /* 관련글 사이드바 카드 → 모바일에서 하단 그리드 1열 */
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* 작은 화면 (iPhone SE 등) */
@media (max-width: 375px) {
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .entry-content {
        font-size: 1rem;
    }

    .entry-content h1 { font-size: 1.5rem; }
    .entry-content h2 { font-size: 1.35rem; }
    .entry-content h3 { font-size: 1.15rem; }
}

/* 중간 화면 */
@media (min-width: 376px) and (max-width: 414px) {
    .container {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

/* 큰 모바일 */
@media (min-width: 415px) and (max-width: 768px) {
    .container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .entry-content {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Privacy Policy / 정책 페이지 — 좌측 색바 제거, 절제
   ========================================================================== */

.privacy-policy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.privacy-main-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    letter-spacing: -0.02em;
}

.privacy-intro {
    font-size: 1.05rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.privacy-section {
    margin-bottom: 2.5rem;
}

.privacy-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.privacy-box {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-subtle);
}

.privacy-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.privacy-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    line-height: 1.7;
}

.privacy-list li:last-child {
    border-bottom: none;
}

.privacy-list li strong {
    color: var(--primary-color);
    font-weight: 600;
}

.privacy-note {
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.privacy-last-updated {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-light);
    font-size: 0.9375rem;
}

@media (max-width: 768px) {
    .privacy-policy-content { padding: 1.5rem 1rem; }
    .privacy-main-title { font-size: 1.5rem; margin-bottom: 1rem; padding-bottom: 0.75rem; }
    .privacy-intro { font-size: 1rem; margin-bottom: 2rem; }
    .privacy-section { margin-bottom: 2rem; }
    .privacy-section-title { font-size: 1.15rem; margin-bottom: 0.75rem; }
    .privacy-box { padding: 1rem; }
    .privacy-list li { padding: 0.5rem 0; font-size: 0.9375rem; }
    .privacy-note { padding: 0.75rem; font-size: 0.875rem; }
    .privacy-last-updated { margin-top: 2rem; padding-top: 1.5rem; font-size: 0.875rem; }
}

@media (min-width: 1024px) {
    .privacy-policy-content { padding: 3rem 2rem; }
    .privacy-main-title { font-size: 2.4rem; }
    .privacy-section-title { font-size: 1.45rem; }
    .privacy-box { padding: 2rem; }
}

/* ==========================================================================
   댓글 폼 - 개인정보 동의 체크박스
   ========================================================================== */

.comment-form-privacy-consent {
    margin: 1.5rem 0 1rem 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: all var(--transition-base);
}

.comment-form-privacy-consent:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.comment-form-privacy-consent input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.comment-form-privacy-consent label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.comment-form-privacy-consent label a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: var(--fw-semibold);
    transition: color var(--transition-base);
}

.comment-form-privacy-consent label a:hover {
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .comment-form-privacy-consent { padding: 0.875rem; gap: 0.625rem; }
    .comment-form-privacy-consent label { font-size: 0.875rem; }
    .comment-form-privacy-consent input[type="checkbox"] { width: 1.125rem; height: 1.125rem; }
}

/* ==========================================================================
   Dark Mode - 컴포넌트 특수 케이스 & 본문 인라인 박스 대응
   (대부분은 CSS 변수로 자동 대응. 여기선 var()로 처리 안 되는 것만.)
   ========================================================================== */

body.dark-mode .comment-form input[type="text"],
body.dark-mode .comment-form input[type="email"],
body.dark-mode .comment-form input[type="url"],
body.dark-mode .comment-form textarea {
    background: var(--bg-tertiary);
    color: var(--text-color);
    border-color: var(--border-color);
}

body.dark-mode .comment-form input:focus,
body.dark-mode .comment-form textarea:focus {
    border-color: var(--primary-light);
    outline: none;
}

body.dark-mode .comment-form .submit {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

body.dark-mode .comment-form .submit:hover {
    background: var(--primary-dark);
}

/* 본문 인라인 스타일 박스(밝은 배경) — 다크모드에서 어둡게 톤다운.
   functions.php/블로그 생성기의 인라인 색을 다크에서만 안전 오버라이드. */
body.dark-mode .entry-content [style*="background-color: #f"],
body.dark-mode .entry-content [style*="background-color:#f"],
body.dark-mode .entry-content [style*="background: #f"],
body.dark-mode .entry-content [style*="background:#f"],
body.dark-mode .entry-content [style*="background-color: #e"],
body.dark-mode .entry-content [style*="background-color:#e"] {
    background-color: rgba(255, 255, 255, 0.04) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

body.dark-mode .entry-content [style*="border: 1px solid #"],
body.dark-mode .entry-content [style*="border:1px solid #"] {
    border-color: var(--border-color) !important;
}

/* 어두운 인라인 텍스트 → 밝게 (가독성 확보) */
body.dark-mode .entry-content [style*="color: #0"],
body.dark-mode .entry-content [style*="color:#0"],
body.dark-mode .entry-content [style*="color: #1"],
body.dark-mode .entry-content [style*="color:#1"],
body.dark-mode .entry-content [style*="color: #2"],
body.dark-mode .entry-content [style*="color:#2"],
body.dark-mode .entry-content [style*="color: #3"],
body.dark-mode .entry-content [style*="color:#3"] {
    color: var(--text-color) !important;
}

@media (prefers-color-scheme: dark) {
    body:not(.light-mode):not(.force-light) .entry-content [style*="background-color: #f"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="background-color:#f"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="background: #f"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="background:#f"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="background-color: #e"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="background-color:#e"] {
        background-color: rgba(255, 255, 255, 0.04) !important;
        background: rgba(255, 255, 255, 0.04) !important;
    }

    body:not(.light-mode):not(.force-light) .entry-content [style*="border: 1px solid #"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="border:1px solid #"] {
        border-color: var(--border-color) !important;
    }

    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #0"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color:#0"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #1"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color:#1"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #2"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color:#2"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color: #3"],
    body:not(.light-mode):not(.force-light) .entry-content [style*="color:#3"] {
        color: var(--text-color) !important;
    }
}
