@charset "utf-8";

/* ============================================================================
   [CLS 수정 v1.6.8] Pretendard 폴백 폰트 메트릭 정합

   Pretendard 는 font-display:swap 으로 로드됩니다(배포처 CSS, @font-face 92개).
   즉 글자가 먼저 폴백 폰트로 그려졌다가 Pretendard 가 도착하면 교체되는데,
   두 폰트의 크기가 달라서 줄바꿈이 바뀌고 카드가 밀립니다 → 레이아웃 시프트.

   v1.6.7 에서 Tailwind JIT 를 걷어내 렌더링이 빨라지자 이 시프트가 드러나
   CLS 가 0.008 → 0.131 로 뛰었습니다(기준 0.1).

   100px 기준 실측값:
     Pretendard   너비 2161 · ascent 95  · descent 24
     sans-serif   너비 2239 · ascent 116 · descent 29   ← 3.6% 넓고 22% 높다
   → 폴백 페이스의 메트릭을 Pretendard 에 맞춰 교체 시 리플로우를 없앱니다.
        size-adjust      2161/2239 = 96.5%
        ascent-override    95/96.5 = 98.4%   (size-adjust 적용 후 em 기준)
        descent-override   24/96.5 = 24.9%
   ============================================================================ */
@font-face {
    font-family: 'Pretendard fallback';
    src: local('Noto Sans KR'), local('Noto Sans CJK KR'), local('Malgun Gothic'),
         local('Apple SD Gothic Neo'), local('Roboto'), local('Arial');
    size-adjust: 96.5%;
    ascent-override: 98.4%;
    descent-override: 24.9%;
    line-gap-override: 0%;
}

/* =========================================
   0. CSS Variables (The Essential Dark Theme)
   ========================================= */
:root {
    /* Base Colors */
    --bg-body: #18181b;
    /* 딥 다크 배경 (Deep Dark) */
    --bg-surface: #27272a;
    /* 카드/표면 기본 (Surface) */
    --bg-surface-hover: #3f3f46;

    /* Typography */
    --text-primary: #e4e4e7;
    /* 주 텍스트 (Light Gray) */
    --text-secondary: #a1a1aa;
    /* 보조 텍스트 (Muted) */
    --text-tertiary: #8B8B96;
    /* [접근성 2026-09-14] 원래 #71717a 였으나 어두운 배경 위 대비가 3.50 으로
       WCAG AA(4.5:1) 미달이었습니다. #8B8B96 은 5.04 로 통과합니다. */
    /* 매우 흐린 텍스트 (Dim) */

    /* ╔═══════════════════════════════════════════════════════════════════╗
       ║  🎨 테마 포인트 컬러 — 여기 한 줄만 바꾸면 전체가 따라옵니다        ║
       ║                                                                   ║
       ║  아래 --accent-rgb 값만 고치면                                     ║
       ║    · 헤더 메뉴 / 카테고리 / 카드 테두리 호버                        ║
       ║    · 이전글·다음글 카드 호버                                        ║
       ║    · 본문 h3 소제목 / 인라인 코드                                   ║
       ║    · 태그, 목차, 버튼, 글로우 그림자                                ║
       ║  전부 한 번에 바뀝니다. (skin.html 의 Tailwind 설정도 이 값을 읽음) ║
       ║                                                                   ║
       ║  ⚠️ #RRGGBB 가 아니라 "R G B" 숫자 3개 (쉼표 없이 공백) 입니다.      ║
       ║     Tailwind 의 투명도 표기(/20, /40 …)를 쓰려면 이 형식이어야 함.  ║
       ║                                                                   ║
       ║  자주 쓰는 값                                                      ║
       ║    민트          18 185 129   /  호버  63 227 168   ← StarFin      ║
       ║    보라        192 132 252   /  호버 216 180 254   ← StarAid       ║
       ║    파랑 (현재)  96 165 250   /  호버 147 197 253   ← StarTech      ║
       ║    핑크        244 114 182   /  호버 249 168 212   ← StarCare      ║
       ║    주황        251 146  60   /  호버 253 186 116   ← StarTrip      ║
       ║                                                                   ║
       ║  ※ StarFin 브랜드 그라디언트는 #3FE3A8 → #0E9F72 입니다.            ║
       ║     짙은 쪽(#0E9F72)을 그대로 본문 링크색으로 쓰면 딥네이비 배경에서 ║
       ║     대비가 5.5:1 로 떨어져, 같은 계열에서 살짝 밝힌 #12B981(7.5:1)  ║
       ║     을 메인으로 씁니다. 로고 그라디언트는 브랜드 방향(밝은→짙은)    ║
       ║     을 그대로 유지합니다.                                          ║
       ╚═══════════════════════════════════════════════════════════════════╝ */
    --accent-rgb: 96 165 250;
    --accent-hover-rgb: 147 197 253;

    /* 아래 3줄은 위 값에서 자동 계산됩니다. 직접 고치지 마세요. */
    --accent-color: rgb(var(--accent-rgb));
    --accent-color-hover: rgb(var(--accent-hover-rgb));
    /* 보조 포인트 컬러였지만, 호버 색 통일을 위해 메인 색과 같은 값을 씁니다.
       다시 다른 색으로 나누고 싶으면 이 줄만 별도 색으로 바꾸면 됩니다. */
    --accent-blue: rgb(var(--accent-rgb));

    /* Layout Borders */
    --border-subtle: rgba(255, 255, 255, 0.05);
    /* 경계선만 살짝 (매우 연한 흰색 선) */
    --border-medium: rgba(255, 255, 255, 0.1);

    /* Shadows - 가벼운 엘리베이션 */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 15px -3px rgb(var(--accent-rgb) / 0.15);
    /* 은은한 엑센트 글로우 */
}


/* =========================================
   1. Global Resets & Tistory Overrides
   ========================================= */
#tistory-toolbar,
.tt_toolbar_container,
.plugin_author,
div[data-tistory-react-app="Namecard"],
#tistorytoolbarid,
.tt_menubar,
#kakaoWrap #kakaoHead,
.tistoryProfileLayerTrigger {
    display: none !important;
}

/* Force Vertical Scrollbar to prevent layout shift */
html {
    overflow-y: scroll;
}

/* Guestbook Input Reset */
input[type="text"],
input[type="password"],
textarea {
    appearance: none;
    -webkit-appearance: none;
}

/* Mobile Scrollbar Hide */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Syntax Highlighting */
/* Syntax Highlighting & Code Blocks */
.hljs,
pre,
code,
.prose pre,
.prose code {
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    font-family: 'JetBrains Mono', monospace !important;
}

.hljs {
    display: block;
    overflow-x: auto;
    padding: 1.25rem !important;
    border-radius: 0.75rem !important;
    line-height: 1.6 !important;
    font-size: 0.9rem !important;
    border: 1px solid var(--border-subtle) !important;
    /* 약간의 구분선 추가 */
}

/* Custom Scrollbar for Code Blocks */
.hljs::-webkit-scrollbar {
    height: 6px;
    /* 더 얇고 미니멀하게 */
}

.hljs::-webkit-scrollbar-track {
    background: transparent;
}

.hljs::-webkit-scrollbar-thumb {
    background: var(--bg-surface-hover);
    border-radius: 4px;
}

.hljs::-webkit-scrollbar-thumb:hover {
    background: #5c6370;
}

/* Atom One Dark Syntax Colors (Forced) */
.hljs-comment,
.hljs-quote {
    color: #5c6370 !important;
    font-style: normal !important;
}

.hljs-doctag,
.hljs-keyword,
.hljs-formula {
    color: #c678dd !important;
    /* Purple */
}

.hljs-built_in {
    color: #e5c07b !important;
    /* Soft Gold/Yellow for print(), etc. */
}

.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
    color: #e06c75 !important;
    /* Red */
}

.hljs-literal {
    color: #56b6c2 !important;
    /* Cyan */
}

.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta .hljs-string {
    color: #98c379 !important;
    /* Green */
}

.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
    color: #d19a66 !important;
    /* Orange */
}

.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
    color: #60a5fa !important;
    /* Brighter Blue */
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: bold;
}

.hljs-link {
    text-decoration: underline;
}

/* Ensure contrast for inline code */
.prose pre code {
    background-color: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    border: none !important;
}

/* Prose Image Radius */
.prose img {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

/* Remove default P margins */
.tt_article_useless_p_margin p {
    margin: 1.5em 0;
}

/* -------------------------------------------------------------------------- */
/*                        Tistory Image Caption Styling                       */
/* -------------------------------------------------------------------------- */
.prose figure figcaption,
.prose figcaption,
figure[data-ke-type="image"] figcaption,
figure.imageblock figcaption,
figure.imagegridblock figcaption,
.tt_article_useless_p_margin figcaption,
.tt_article_useless_p_margin .cap1 {
    font-size: 0.75rem !important;
    /* Smaller than Body 3 (size14 = 0.875rem) */
    color: var(--text-muted) !important;
    margin-top: 0.25rem !important;
    /* Pull aggressively closer to the image */
    padding-top: 0 !important;
    text-align: center;
    line-height: 1.4;
}

/* -------------------------------------------------------------------------- */
/*                        Tistory Typography Overrides                        */
/* -------------------------------------------------------------------------- */
/* 1. Bold (볼드) - Reset Tailwind override */
.prose b,
.prose strong,
.tt_article_useless_p_margin b,
.tt_article_useless_p_margin strong,
p[data-ke-size] b,
p[data-ke-size] strong {
    font-weight: 700 !important;
    color: #ffffff !important;
    /* Make it pop in dark mode */
}

/* 2. Italic (기울임꼴) */
.prose i,
.prose em,
.tt_article_useless_p_margin i,
.tt_article_useless_p_margin em {
    font-style: italic !important;
}

/* 3. Underline (밑줄) */
.prose u,
.tt_article_useless_p_margin u {
    text-decoration: underline !important;
    text-underline-offset: 4px;
    text-decoration-color: var(--accent-color) !important;
    /* Mint underline */
}

/* 4. Strikethrough (취소선) */
.prose s,
.prose strike,
.prose del,
.tt_article_useless_p_margin s,
.tt_article_useless_p_margin strike,
.tt_article_useless_p_margin del {
    text-decoration: line-through !important;
    text-decoration-color: var(--text-tertiary) !important;
    color: var(--text-secondary) !important;
}

/* 5. Tistory Body Sizes (본문 1, 2, 3) */
/* 본문 1 (큰 크기 - size18/size20) */
.prose p[data-ke-size="size18"],
.tt_article_useless_p_margin p[data-ke-size="size18"],
.prose p[data-ke-size="size20"],
.tt_article_useless_p_margin p[data-ke-size="size20"] {
    font-size: 1.15rem !important;
    line-height: 1.8 !important;
    color: var(--text-primary) !important;
}

/* 본문 2 (기본 크기 - size16) */
.prose p[data-ke-size="size16"],
.tt_article_useless_p_margin p[data-ke-size="size16"] {
    font-size: 1.0rem !important;
    line-height: 1.7 !important;
}

/* 본문 3 (작은 크기 - size14) */
.prose p[data-ke-size="size14"],
.tt_article_useless_p_margin p[data-ke-size="size14"] {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    color: var(--text-secondary) !important;
}

/* Headings Contrast Fixes */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.tt_article_useless_p_margin h1,
.tt_article_useless_p_margin h2,
.tt_article_useless_p_margin h3,
.tt_article_useless_p_margin h4 {
    color: #ffffff !important;
    font-weight: 700 !important;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
}

.prose h2,
.tt_article_useless_p_margin h2 {
    border-left: 4px solid var(--accent-color);
    padding-left: 14px;
}

/* ══════════════════════════════════════════════════════════════
   Tistory Editor Table — v1.1.0 재설계

   [기존 문제]
     .prose table * 에 background-color 를 !important 로 걸어서
     모든 자식 요소 배경이 고정됐습니다. 그 결과
       · 줄무늬(zebra) 적용 불가 → 열이 많으면 행을 눈으로 못 따라감
       · 행 호버 표시 불가
     또 모든 셀에 1px 전체 테두리를 둘러 격자가 빡빡했고,
     카드 UI 인데 표만 모서리가 각졌습니다.

   [재설계 원칙]
     · 세로 줄을 없애고 가로 줄만 남김 (다크모드에서 선이 적을수록 깔끔)
     · 헤더는 액센트 톤 + 아래 2px 액센트 라인으로 구분
     · 짝수 행에 아주 옅은 줄무늬 → 시선 추적
     · 첫 열은 항목명이므로 약간 밝게·굵게
     · 모서리 라운드 + 가로 스크롤(모바일 대응, script.js SECTION 11)
   ══════════════════════════════════════════════════════════════ */
.prose table,
.tt_article_useless_p_margin table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background-color: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    font-size: 0.92rem !important;
    margin: 1.75rem 0 !important;
}

/* 셀 공통 — 가로 줄만 */
.prose table th,
.prose table td,
.tt_article_useless_p_margin table th,
.tt_article_useless_p_margin table td {
    border: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 0.7rem 0.9rem !important;
    text-align: left !important;
    vertical-align: top !important;
    word-break: keep-all !important;
    /* 한글이 어절 단위로 끊기도록 */
    line-height: 1.6 !important;
    background-color: transparent !important;
}

/* 헤더 */
.prose table th,
.prose table thead td,
.tt_article_useless_p_margin table th,
.tt_article_useless_p_margin table thead td {
    background-color: rgb(var(--accent-rgb) / 0.12) !important;
    border-bottom: 2px solid rgb(var(--accent-rgb) / 0.55) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* 줄무늬 — 짝수 행만 아주 옅게 */
.prose table tbody tr:nth-child(even) td,
.tt_article_useless_p_margin table tbody tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.022) !important;
}

/* 행 호버 */
.prose table tbody tr:hover td,
.tt_article_useless_p_margin table tbody tr:hover td {
    background-color: rgb(var(--accent-rgb) / 0.07) !important;
}

/* 첫 열(항목명) 강조 */
.prose table tbody td:first-child,
.tt_article_useless_p_margin table tbody td:first-child {
    font-weight: 600 !important;
    color: #ffffff !important;
}

/* 마지막 행은 아래 줄 제거 (라운드 모서리와 겹침 방지) */
.prose table tbody tr:last-child td,
.tt_article_useless_p_margin table tbody tr:last-child td {
    border-bottom: none !important;
}

/* 숫자 열을 오른쪽 정렬하고 싶을 때 쓰는 유틸 (원고에서 class 로 지정) */
.prose table td.num,
.prose table th.num {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

/* 모바일: 글자만 살짝 줄임 (가로 스크롤은 script.js 가 래퍼로 처리) */
@media (max-width: 640px) {

    .prose table,
    .tt_article_useless_p_margin table {
        font-size: 0.86rem !important;
    }

    .prose table th,
    .prose table td,
    .tt_article_useless_p_margin table th,
    .tt_article_useless_p_margin table td {
        padding: 0.6rem 0.7rem !important;
    }
}

/* 표 가로 스크롤 래퍼 (script.js SECTION 11 이 자동 생성)
   바깥(.lm-table-wrap)은 스크롤하지 않고 페이드만 담당,
   안쪽(.lm-table-scroll)이 실제로 가로 스크롤한다.
   페이드를 안쪽에 두면 스크롤 시 함께 밀려나 잔상이 생긴다. */
.lm-table-wrap {
    position: relative;
    margin: 1.75rem 0;
}

.lm-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

.lm-table-scroll>table {
    margin: 0 !important;
    min-width: 460px;
}

/* 최소 너비를 열 개수에 맞춘다 (script.js 가 data-cols 를 붙인다).
   일괄 460px 이면 2열 표까지 폰에서 불필요하게 가로 스크롤이 생긴다. */
.lm-table-scroll>table[data-cols="1"],
.lm-table-scroll>table[data-cols="2"] {
    min-width: 0;
    width: 100%;
}

.lm-table-scroll>table[data-cols="3"] {
    min-width: 420px;
}

.lm-table-scroll>table[data-cols="4"],
.lm-table-scroll>table[data-cols="4+"] {
    min-width: 520px;
}

/* 2열 표는 폰에서 첫 열이 지나치게 좁아지지 않게 비율을 고정한다 */
@media (max-width: 600px) {
    .lm-table-scroll>table[data-cols="2"] th:first-child,
    .lm-table-scroll>table[data-cols="2"] td:first-child {
        width: 38%;
    }
}

/* 스크롤 가능함을 알리는 우측 페이드.
   바깥 래퍼에 붙이므로 스크롤해도 제자리에 고정된다.
   끝까지 스크롤하면 script.js 가 is-scrollable 을 떼어 부드럽게 사라진다. */
.lm-table-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 28px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--bg-body));
    border-radius: 0 12px 12px 0;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.lm-table-wrap.is-scrollable::after {
    opacity: 1;
}

/* Tistory OpenGraph Bookmark Hover Fix (Prevent Jitter) */
figure[data-ke-type="opengraph"] a,
figure[data-ke-type="opengraph"] a:hover {
    transform: none !important;
    text-decoration: none !important;
}

figure[data-ke-type="opengraph"] {
    border: 1px solid var(--border-medium) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

figure[data-ke-type="opengraph"]:hover {
    border-color: var(--accent-color) !important;
    box-shadow: var(--shadow-glow) !important;
}

figure[data-ke-type="opengraph"] .og-text {
    background-color: var(--bg-surface) !important;
}

figure[data-ke-type="opengraph"] .og-title,
figure[data-ke-type="opengraph"] .og-desc,
figure[data-ke-type="opengraph"] .og-host {
    color: var(--text-primary) !important;
    font-family: inherit !important;
}

/* =========================================
   2. Layout & Post Limits
   ========================================= */
/* Ensure desktop has height for 9 posts + pagination */
#main-layout main {
    position: relative !important;
    min-height: 1600px !important;
    padding-bottom: 120px !important;
}

@media (max-width: 1280px) {
    #main-layout main {
        min-height: 2000px !important;
    }
}

@media (max-width: 768px) {
    #main-layout main {
        min-height: auto !important;
        padding-bottom: 80px !important;
    }
}

/* Hide posts > 9 */
#main-layout main>article:nth-of-type(n+10) {
    display: none !important;
}

/* =========================================
   3. Pagination Design
   ========================================= */
.pagination {
    position: relative !important;
    /* Flow naturally after content */
    margin-top: 60px !important;
    /* Space from content */
    margin-bottom: 40px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    gap: 8px;
    z-index: 10;
}

/* Anti-Flicker Cloak */
.cloak-until-loaded {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.cloak-until-loaded.loaded {
    opacity: 1;
}

.pagination a,
.pagination span {
    pointer-events: auto;
    padding: 8px 14px;
    /* 더 편안한 클릭 영역 */
    border-radius: 8px;
    /* 통일된 곡률 */
    background: transparent;
    /* 배경 날리고 텍스트만 */
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination .selected,
.pagination .current {
    background: transparent !important;
    color: var(--accent-color) !important;
    border: 1px solid var(--accent-color) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    outline: none !important;
    backdrop-filter: none !important;
    /* 기본 상태에서는 어떤 종류의 빛 효과도 나지 않도록 모두 강제 제거 */
    font-weight: 700;
}

/* 호버 시에만 테마색(민트) 빛(glow)이 나도록 설정 */
.pagination a:hover,
.pagination span:hover {
    background: var(--bg-surface-hover) !important;
    color: #ffffff !important;
    border-color: var(--accent-color) !important;
    box-shadow: var(--shadow-glow) !important;
    /* 테마색(민트) 글로우 */
}

/* =========================================
   6. Search Input Design (Global)
   ========================================= */
/* 4. FOUC Prevention (JS-Triggered Fade-In) */
#sidebar-desktop,
#toc-container,
#guestbook-container,
#guestbook-list,
#guestbook-form {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* State when JS adds this class */
#sidebar-desktop.is-loaded,
#toc-container.is-loaded,
#guestbook-container.is-loaded,
#guestbook-list.is-loaded,
#guestbook-form.is-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 5. Sleek Dark Tag Design (Reference Match) */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    /* Compact gap */
    margin-top: 3rem;
    font-size: 0 !important;
}

.tag-container a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    /* 더 컴팩트하고 알리오 느낌 */
    padding: 0 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    /* 보더리스 미니멀리즘 */
    border: 1px solid var(--border-medium);
    border-radius: 16px;
    /* 완전 둥근 Pill 스타일 */
    transition: all 0.2s ease;
    text-decoration: none;
}

/* Add Hash (#) Prefix */
.tag-container a::before {
    content: "#";
    margin-right: 4px;
    color: var(--accent-color);
    /* 엑센트로 포인트 */
    opacity: 0.7;
}

.tag-container a:hover {
    background: var(--border-subtle);
    color: var(--text-primary);
    border-color: var(--accent-color-hover);
}

/* Hide the old icon if it exists in HTML, as reference doesn't emphasize it */
.tag-container i {
    display: none !important;
}

/* 6. HIDE Tistory Default Elements (Reset) */
/* Sympathy, Share, Stats, Etc */
.container_postbtn {
    display: none !important;
}

/* Related Articles (Another Category) */
.another_category {
    display: none !important;
}

/* Additional Tistory Injected Layers (Statistics, Etc) */
/* [Extended] 8. Modern Comment Section Styling */
/* Input Box Visibility Fix */
#comments-section textarea {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
}

#comments-section textarea:focus {
    background-color: var(--bg-body) !important;
    /* 약간 들어간 느낌 */
    border-color: var(--accent-color) !important;
}

/* Admin (Owner) Styling */
li.rp_admin .rp_admin-avatar {
    border: 2px solid var(--accent-color) !important;
}

li.rp_admin .flex-1 .flex span:first-child {
    color: var(--accent-color) !important;
}

/* Add Checkmark Badge for Owner */
li.rp_admin .flex-1 .flex span:first-child::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 6px;
    font-size: 0.85rem;
    color: var(--accent-color);
}

/* Secret Comment Styling */
/* Secret Comment Styling - Clean Text Only */
li.rp_secret .text-zinc-300 {
    color: #a1a1aa !important;
    font-size: 0.95rem;
    /* Standard size */
    opacity: 0.8;
}

/* Remove the previous lock from content */
li.rp_secret .text-zinc-300::before {
    content: none !important;
}

/* Add Lock Icon to Header (Next to Date/Report) */
/* Lock Icon Removed as per preference */
li.rp_secret .flex.items-baseline::after {
    content: none !important;
}

/* Avatar Placeholder Random Colors (Simulation) */
/* Guest Avatars (DiceBear Enhanced) */
/* Only target images that are explicitly avatars */
li:not(.rp_admin) img.guest-avatar-enhanced,
li:not(.rp_admin) .profile-image img {
    background-color: #f4f4f5;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease;
}

li:not(.rp_admin):hover img.guest-avatar-enhanced {
    transform: scale(1.1) rotate(5deg);
}

/* Fix Emojis & Content Images */
/* Ensure emojis inside the comment text content do NOT get avatar styling */
.text-zinc-300 img {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: inline-block !important;
    vertical-align: middle;
    margin: 0 2px;
    box-shadow: none !important;
    transform: none !important;
}

/* Input Form Focus Effects */
textarea:focus {
    box-shadow: none !important;
}

/* Checkbox Customization */
input[type="checkbox"]:checked {
    background-color: transparent !important;
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%2314b8a6' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e") !important;
}

.another_category a {
    color: var(--text-primary) !important;
    text-decoration: none !important;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 60vw;
    /* Prevent overflow */
}

.another_category tr:hover td a {
    color: var(--accent-color) !important;
}

/* Date */
.another_category td.date {
    font-size: 0.85rem !important;
    color: #71717a !important;
    /* text-zinc-500 */
    min-width: 80px;
    text-align: right;
}

/* -------------------------------------------------------------------------- */
/*                          Link Embed (OpenGraph) Styling                    */
/* -------------------------------------------------------------------------- */
figure[data-ke-type="opengraph"] {
    margin: 2rem 0;
    width: 100%;
}

figure[data-ke-type="opengraph"] a {
    display: flex !important;
    min-height: 140px !important;
    height: auto !important;
    border: 1px solid var(--border-subtle) !important;
    /* 선 얇게 */
    border-radius: 12px !important;
    background-color: transparent !important;
    /* 배경 날리고 보더리스화 */
    text-decoration: none !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    /* 그림자 삭제로 깔끔함 유지 */
}

figure[data-ke-type="opengraph"] a:hover {
    background-color: var(--bg-surface) !important;
    border-color: var(--border-medium) !important;
    transform: translateY(-2px);
}

/* Image Section */
figure[data-ke-type="opengraph"] .og-image {
    width: 25% !important;
    min-width: 140px !important;
    max-width: 200px !important;
    height: 100% !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background-size: cover !important;
    background-position: center !important;
    position: relative;
    overflow: hidden;
}

/* Subtle overlay on image */
figure[data-ke-type="opengraph"] .og-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
}

/* Text Container */
figure[data-ke-type="opengraph"] .og-text {
    flex: 1 !important;
    padding: 1.25rem 1.5rem !important;
    /* Reverted padding */
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    background: transparent !important;
    height: 100% !important;
    /* Ensure full height for margin-top: auto to work */
}

/* Title */
figure[data-ke-type="opengraph"] .og-title {
    font-family: 'Pretendard', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #f4f4f5 !important;
    /* zinc-100 */
    margin-bottom: 0.5rem !important;
    line-height: 1.4 !important;

    /* Ellipsis */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

/* Description */
figure[data-ke-type="opengraph"] .og-desc {
    font-family: 'Pretendard', sans-serif !important;
    font-size: 0.875rem !important;
    /* 14px */
    color: #a1a1aa !important;
    /* zinc-400 */
    line-height: 1.5 !important;
    margin-bottom: 0 !important;
    /* Removed auto margin from desc */

    /* Multi-line ellipsis (2 lines) */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
    word-break: keep-all !important;
    /* Prevent mid-word breaks for Korean */
}

/* Host/URL */
figure[data-ke-type="opengraph"] .og-host {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.75rem !important;
    color: var(--text-tertiary) !important;
    margin-top: 0 !important;
    position: absolute !important;
    bottom: -17px !important;
    left: 1.5rem !important;
    width: calc(100% - 3rem) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

figure[data-ke-type="opengraph"] .og-host::before {
    content: '\f0c1';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: var(--accent-color);
    opacity: 0.7;
}

/* Mobile Adjustments */
/* Mobile Adjustments (Link Embed Card Style) */
@media (max-width: 1024px) {

    /* 0. Parent Figure: Flush Left Reset */
    html body figure[data-ke-type="opengraph"] {
        margin: 20px 0 !important;
        /* Mobile Vertical Spacing */
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 1. Container: Horizontal Flex Layout */
    html body figure[data-ke-type="opengraph"] a {
        display: flex !important;
        flex-direction: row !important;
        height: 80px !important;
        min-height: 80px !important;
        margin: 0 !important;
        padding: 0 !important;
        text-decoration: none !important;
        background: transparent !important;
        border: 1px solid var(--border-subtle) !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }

    /* 2. Image: Thumbnail Style (Left) */
    html body figure[data-ke-type="opengraph"] .og-image {
        display: block !important;
        width: 85px !important;
        /* Larger Thumbnail */
        min-width: 85px !important;
        height: 100% !important;
        margin: 0 !important;
        border: none !important;
        border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding: 0 !important;
        object-fit: cover !important;
    }

    /* 3. Text Container: Flex Grow (Right) */
    html body figure[data-ke-type="opengraph"] .og-text {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        flex: 1 !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 1rem !important;
        /* Side Padding */
        text-align: left !important;
        background: transparent !important;
        border: none !important;
        box-sizing: border-box !important;
    }

    /* 4. Title */
    html body figure[data-ke-type="opengraph"] .og-title {
        display: -webkit-box !important;
        /* Required for line-clamp */
        -webkit-box-orient: vertical !important;
        /* Required for line-clamp */
        font-size: 0.75rem !important;
        /* Compact Title */
        line-height: 1.35 !important;
        margin-bottom: 0.25rem !important;
        white-space: normal !important;
        word-break: break-all !important;
        color: #f4f4f5 !important;
        opacity: 1 !important;
        -webkit-line-clamp: 2 !important;
        /* Limit lines */
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* 5. Description: Hidden */
    html body figure[data-ke-type="opengraph"] .og-desc {
        display: none !important;
    }

    /* 6. Host / URL */
    html body figure[data-ke-type="opengraph"] .og-host {
        display: block !important;
        position: static !important;
        margin: 0 !important;
        font-size: 0.7rem !important;
        /* Smaller Host */
        color: #a1a1aa !important;
        opacity: 0.8 !important;
    }
}

/* -------------------------------------------------------------------------- */
/*                        Refined Comment Form Styling                        */
/* -------------------------------------------------------------------------- */

/* 1. Comment Form Container */
.comment-form-box {
    background: transparent !important;
    /* 그라데이션 제거, 백그라운드와 통일하여 가볍게 */
    border: 1px solid var(--border-subtle) !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .comment-form-box {
        background: transparent !important;
        border-radius: 0;
        border-left: none !important;
        border-right: none !important;
    }
}

/* 2. Textarea Styling */
.comment-form-box textarea {
    background-color: var(--bg-surface) !important;
    border: none !important;
    /* 박스선 보이지 않도록 깔끔하게 */
    border-radius: 8px !important;
    padding: 1rem !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: var(--text-primary) !important;
    transition: all 0.2s ease !important;
    height: 100px !important;
}

.comment-form-box textarea::placeholder {
    color: var(--text-tertiary) !important;
    font-weight: 400;
}

.comment-form-box textarea:focus {
    background-color: var(--bg-body) !important;
    box-shadow: inset 0 0 0 1px var(--accent-color) !important;
    /* 보더 대신 내부 링으로 깔끔한 포커스 효과 */
}

/* 3. Submit Button Styling */
.comment-form-box button {
    background: transparent !important;
    color: var(--accent-color) !important;
    /* 플랫 디자인: 바탕색 없이 텍스트 포인트 */
    font-weight: 600 !important;
    border: 1px solid var(--border-medium) !important;
    padding: 0.5rem 1.75rem !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    cursor: pointer;
}

.comment-form-box button:hover {
    background: var(--bg-surface-hover) !important;
    border-color: var(--accent-color) !important;
    transform: none;
    box-shadow: none;
}

.comment-form-box button:active {
    transform: scale(0.98);
}

/* 4. Guest Input Fields - Completely Hidden (Logged-in only) */
.comment-form-box input[type="text"],
.comment-form-box input[type="password"] {
    display: none !important;
}

/* 5. Secret Checkbox Styling */
.comment-form-box label {
    margin-right: 1.5rem !important;
    /* More spacing after checkbox */
    display: flex !important;
    align-items: center !important;
}

.comment-form-box label span {
    font-size: 0.9rem !important;
    color: #a1a1aa !important;
    /* zinc-400 */
    font-weight: 500;
}

.comment-form-box label:hover span {
    color: var(--accent-color) !important;
}

.comment-form-box input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.1rem !important;
    height: 1.1rem !important;
    border: 1px solid var(--border-medium) !important;
    border-radius: 4px !important;
    background-color: transparent !important;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    vertical-align: middle;
    margin-right: 8px !important;
}

.comment-form-box input[type="checkbox"]:checked {
    background-color: transparent !important;
    /* 체크박스 배경색 제거, 테두리 포인트 */
    border-color: var(--accent-color) !important;
}

.comment-form-box input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    color: var(--accent-color);
    /* 엑센트 아이콘 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.comment-form-box input[type="checkbox"]:hover {
    border-color: var(--accent-color) !important;
}

/* -------------------------------------------------------------------------- */
/*                          Blockquote / Quote Styling                        */
/* -------------------------------------------------------------------------- */

/* Common Blockquote Reset */
.prose blockquote,
.tt_article_useless_p_margin blockquote {
    margin: 2rem 0 !important;
    padding: 1.5rem 2rem !important;
    word-break: break-all;
    color: #e4e4e7 !important;
    /* zinc-200 */
}

.prose blockquote p,
.tt_article_useless_p_margin blockquote p {
    margin: 0 !important;
    line-height: 1.7 !important;
}

/* Remove Automatic Quotes (Tailwind Typography Reset) */
.prose blockquote p:first-of-type::before,
.prose blockquote p:last-of-type::after,
.tt_article_useless_p_margin blockquote p:first-of-type::before,
.tt_article_useless_p_margin blockquote p:last-of-type::after {
    content: none !important;
}

/* Style 1: Centered Quote (인용1) - Editor Style Adapted */
.prose blockquote[data-ke-style="style1"],
.tt_article_useless_p_margin blockquote[data-ke-style="style1"] {
    position: relative !important;
    text-align: center !important;
    background: transparent !important;
    /* No box, like editor */
    border: none !important;
    padding-top: 4rem !important;
    padding-bottom: 2rem !important;
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    color: #f4f4f5 !important;
    /* Brighter text for focus */
}

/* Style 1 Icon (Replaces default BG image for better dark mode control) */
.prose blockquote[data-ke-style="style1"]::before,
.tt_article_useless_p_margin blockquote[data-ke-style="style1"]::before {
    content: '\f10d';
    /* FontAwesome Quote Left */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 2.5rem;
    color: #71717a;
    /* zinc-500 (Gray like editor) */
    opacity: 0.5;
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
}

/* Style 2: Left Line (인용2) */
.prose blockquote[data-ke-style="style2"],
.tt_article_useless_p_margin blockquote[data-ke-style="style2"] {
    border-left: 3px solid var(--accent-color) !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    background: transparent !important;
    /* 배경 날려서 본문과 녹아들게 */
    padding-left: 1.25rem !important;
    /* 약간의 들여쓰기만 유지 */
    border-radius: 0 !important;
}

/* Style 3: Box (인용3) */
.prose blockquote[data-ke-style="style3"],
.tt_article_useless_p_margin blockquote[data-ke-style="style3"] {
    border: 1px solid var(--border-subtle) !important;
    background: transparent !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
}

/* Fallback / Default Blockquote Styling */
.prose blockquote:not([data-ke-style]),
.tt_article_useless_p_margin blockquote:not([data-ke-style]) {
    border-left: 4px solid #71717a !important;
    /* Neutral for user blocks */
    background: rgba(255, 255, 255, 0.02) !important;
}

/* -------------------------------------------------------------------------- */
/*                          Content Link Styling                              */
/* -------------------------------------------------------------------------- */
.tt_article_useless_p_margin a,
.prose a {
    color: var(--accent-color) !important;
    text-decoration: none !important;
    border-bottom: 1px dashed var(--border-medium);
    /* 실선에서 점선으로 더 가볍게 */
    transition: all 0.2s ease;
}

.tt_article_useless_p_margin a:hover,
.prose a:hover {
    color: var(--accent-color-hover) !important;
    border-bottom: 1px solid var(--accent-color);
    background: transparent;
}

/* -------------------------------------------------------------------------- */
/*                        Post Navigation (Prev/Next)                         */
/* -------------------------------------------------------------------------- */
.nav-card {
    position: relative;
    background-color: transparent !important;
    /* 카드 배경 제거 */
    border: 1px solid var(--border-subtle) !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
    overflow: hidden;
    transition: all 0.2s ease;
    text-decoration: none !important;
    box-shadow: none !important;
}

.nav-card:hover {
    /* [v1.1.0] 원래 var(--border-medium)(흰색 10%) 이라 이 카드만 호버 테두리가
       회색이었습니다. 글 목록 카드(accent 40%)와 색을 맞춰 통일했습니다.
       ※ 중립 테두리로 되돌리려면 var(--border-medium) 으로 바꾸세요. */
    border-color: rgb(var(--accent-rgb) / 0.4) !important;
    background-color: var(--bg-surface) !important;
    /* 약간 떠오르는 느낌만 */
    transform: none;
}

/* Gradient Overlay - 완전히 날려서 깔끔하게 */
.nav-card .hover-gradient {
    display: none !important;
}

/* Content Layer */
.nav-card .relative {
    position: relative;
    z-index: 10;
}

/* Icon Circle */
.nav-card .icon-circle {
    display: none !important;
    /* 네비 카드 아이콘 원 제거 */
}

/* Text Styles */
.nav-card h4 {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    line-height: 1.4 !important;
    margin-top: 0.5rem !important;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-card:hover h4 {
    color: var(--accent-color) !important;
}

.nav-card .label {
    font-size: 0.75rem;
    font-weight: 500;
    /* 조금 덜 강하게 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.nav-card:hover .label {
    color: var(--text-secondary);
}

/* Custom Tag Styling - Subtle/Text Only */
.tag-container a {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 0.5rem 0 0 !important;

    color: var(--text-tertiary) !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    font-family: monospace, ui-monospace, SFMono-Regular !important;
    text-decoration: none !important;

    transition: color 0.2s ease !important;
    display: inline-block !important;
}

.tag-container a:hover {
    color: var(--accent-color) !important;
    background: transparent !important;
    text-decoration: none !important;
}

/* Optional: Add hash if missing (Visual flair) */
.tag-container a::before {
    /* ... previous content ... */
    content: "#";
    margin-right: 1px;
    opacity: 0.5;
}

/* =========================================
   7. Content Typography System (Theme Match)
   ========================================= */

/* Main Content Wrapper */
.tt_article_useless_p_margin,
.prose {
    color: var(--text-primary);
    line-height: 1.8;
}

/* Title 1 (H2) */
.tt_article_useless_p_margin h2,
.prose h2 {
    font-size: 1.6rem !important;
    /* 조금 더 담백한 크기 */
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-top: 3.5rem !important;
    margin-bottom: 1.25rem !important;
    letter-spacing: -0.01em !important;
    line-height: 1.4 !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    /* 밑줄을 은은하게 추가하여 구분 */
    padding-bottom: 0.5rem !important;
}

/* Title 2 (H3) */
.tt_article_useless_p_margin h3,
.prose h3 {
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    /* [v1.1.0] 원래 var(--text-primary)(회색) 이었습니다.
       skin.html 에는 prose-h3:text-accentBlue 가 지정돼 있었지만
       이 !important 규칙에 눌려서 실제로는 한 번도 적용되지 않았습니다.
       호버 색 통일에 맞춰 포인트 컬러로 살렸습니다.
       ※ 소제목을 다시 회색으로 되돌리려면 아래 한 줄만
         color: var(--text-primary) !important;  로 바꾸세요. */
    color: var(--accent-color) !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.5 !important;
}

/* Title 3 (H4) */
.tt_article_useless_p_margin h4,
.prose h4 {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    margin-top: 2rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.5 !important;
}

/* Body Text (P) - Default Paragraph */
.tt_article_useless_p_margin p,
.prose p {
    font-size: 1.0625rem !important;
    /* 17px - optimal reading size */
    color: #d4d4d8 !important;
    /* zinc-300 */
    margin-bottom: 1.5rem !important;
    line-height: 1.8 !important;
    /* Relaxed reading */
    word-break: break-all;
}

/* List Styling */
.tt_article_useless_p_margin ul,
.tt_article_useless_p_margin ol {
    margin-bottom: 1.5rem !important;
    padding-left: 1.5rem !important;
    color: #d4d4d8 !important;
}

.tt_article_useless_p_margin li {
    margin-bottom: 0.5rem !important;
    line-height: 1.7 !important;
}

.tt_article_useless_p_margin ul {
    list-style-type: disc !important;
}

/* ... previous content ... */
.tt_article_useless_p_margin ol {
    list-style-type: decimal !important;
}

/* =========================================
   8. Horizontal Rule (Divider) System
   ========================================= */
.tt_article_useless_p_margin hr,
.prose hr {
    display: block;
    border: 0;
    margin: 3rem auto !important;
    opacity: 1 !important;
}

/* Style 1: Dots (· · ·) */
.tt_article_useless_p_margin hr[data-ke-style="style1"],
.prose hr[data-ke-style="style1"] {
    background: transparent !important;
    height: 30px !important;
    width: 100% !important;
    position: relative;
}

.tt_article_useless_p_margin hr[data-ke-style="style1"]::after,
.prose hr[data-ke-style="style1"]::after {
    content: "· · ·";
    font-size: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-tertiary);
    letter-spacing: 8px;
    text-indent: 8px !important;
}

/* Style 2: Thick Short Line (-) */
.tt_article_useless_p_margin hr[data-ke-style="style2"],
.prose hr[data-ke-style="style2"] {
    height: 3px !important;
    width: 50px !important;
    background-color: #a1a1aa !important;
    /* zinc-400 */
    border-radius: 99px;
}

/* Style 3: Zigzag (~) - Brighter & Clean SVG */
.tt_article_useless_p_margin hr[data-ke-style="style3"],
.prose hr[data-ke-style="style3"] {
    height: 15px !important;
    width: 110px !important;
    background-color: transparent !important;
    /* Stroke brighten to #e4e4e7 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 6'%3E%3Cpath d='M0 5L6 1L12 5' fill='none' stroke='%23e4e4e7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: repeat-x !important;
    background-size: 12px 6px !important;
    background-position: center !important;
    border: none !important;
    opacity: 1 !important;
}

/* Reset previous pseudo-element styling if any exists */
.tt_article_useless_p_margin hr[data-ke-style="style3"]::after,
.prose hr[data-ke-style="style3"]::after {
    display: none !important;
}

/* Style 4: Vertical Line (|) */
.tt_article_useless_p_margin hr[data-ke-style="style4"],
.prose hr[data-ke-style="style4"] {
    width: 2px !important;
    height: 50px !important;
    background-color: #a1a1aa !important;
    /* zinc-400 */
}

/* Style 5: Full Solid Line (─) */
.tt_article_useless_p_margin hr[data-ke-style="style5"],
.prose hr[data-ke-style="style5"] {
    height: 1px !important;
    width: 100% !important;
    background-color: #52525b !important;
    /* zinc-600 */
}

/* Style 6: Double Line (=) */
.tt_article_useless_p_margin hr[data-ke-style="style6"],
.prose hr[data-ke-style="style6"] {
    height: 6px !important;
    width: 100% !important;
    border-top: 1px solid #52525b !important;
    border-bottom: 1px solid #52525b !important;
    background: transparent !important;
}

/* Style 7: Diamond (-◇-) - Gradient Approach (Clean) */
.tt_article_useless_p_margin hr[data-ke-style="style7"],
.prose hr[data-ke-style="style7"] {
    border: none !important;
    height: 20px !important;
    width: 100% !important;
    position: relative;
    /* Gradient line with gap */
    background: linear-gradient(to right, #52525b 0%, #52525b 45%, transparent 45%, transparent 55%, #52525b 55%, #52525b 100%) !important;
    background-size: 100% 1px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.tt_article_useless_p_margin hr[data-ke-style="style7"]::after,
.prose hr[data-ke-style="style7"]::after {
    content: "◇";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent !important;
    color: #e4e4e7 !important;
    /* zinc-200 (Bright) */
    font-size: 16px;
    line-height: normal;
}

/* Style 8: Circle (-○-) - Gradient Approach (Clean) */
.tt_article_useless_p_margin hr[data-ke-style="style8"],
.prose hr[data-ke-style="style8"] {
    border: none !important;
    height: 20px !important;
    width: 100% !important;
    position: relative;
    /* Gradient line with gap */
    background: linear-gradient(to right, #52525b 0%, #52525b 45%, transparent 45%, transparent 55%, #52525b 55%, #52525b 100%) !important;
    background-size: 100% 1px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.tt_article_useless_p_margin hr[data-ke-style="style8"]::after,
.prose hr[data-ke-style="style8"]::after {
    content: "○";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent !important;
    color: #e4e4e7 !important;
    /* zinc-200 (Bright) */
    font-size: 16px;
    line-height: normal;
}


/* ████████████████████████████████████████████████████████████████████████
   ██                                                                    ██
   ██   LUMORA LITE — SEO / 애드센스 최적화 추가분  (v1.1.0)               ██
   ██                                                                    ██
   ██   ⚠️ 이 줄 아래는 전부 "추가된" 코드입니다.                            ██
   ██      위쪽 원본 코드는 하나도 건드리지 않았습니다.                       ██
   ██      되돌리고 싶으면 이 줄부터 파일 끝까지 지우면 원본 상태가 됩니다.     ██
   ██                                                                    ██
   ██   모든 클래스/ID 는 lm- 접두사를 씁니다 (Lumora Mod).                 ██
   ██   → 원본 스타일이나 Tailwind 유틸리티와 절대 충돌하지 않습니다.         ██
   ██                                                                    ██
   ██   목차                                                              ██
   ██     A. 안전장치 (콘텐츠 강제 표시)                                    ██
   ██     B. 홈 전용 H1                                                   ██
   ██     C. 목록 카드 링크화 / 썸네일                                      ██
   ██     D. 애드센스 영역 (CLS 방어)                                      ██
   ██     E. 하단 플로팅 바 ↔ 앵커광고 충돌 방지  ★중요★                    ██
   ██     F. 읽기 진행률 바                                                ██
   ██     G. 관련글                                                       ██
   ██     H. 모바일 목차                                                   ██
   ██                                                                    ██
   ████████████████████████████████████████████████████████████████████████ */


/* ════════════════════════════════════════════════════════════
   A. 안전장치 — JS가 실패해도 본문이 반드시 보이게
   ------------------------------------------------------------
   원본은 .cloak-until-loaded { opacity:0 } 로 콘텐츠를 가려두고
   JS가 .loaded 를 붙여야만 보여줍니다.
   즉 JS가 한 번 깨지면 글이 통째로 안 보입니다.
   → 3초가 지나면 JS와 무관하게 무조건 드러나도록 보험을 겁니다.
   ════════════════════════════════════════════════════════════ */
.cloak-until-loaded {
    animation: lmForceReveal 0s linear 3s forwards;
}

@keyframes lmForceReveal {
    to {
        opacity: 1;
    }
}

/* 모션 최소화를 선호하는 사용자 배려 (접근성) */
@media (prefers-reduced-motion: reduce) {

    .cloak-until-loaded,
    #sidebar-desktop,
    #toc-container,
    #guestbook-container,
    #guestbook-list,
    #guestbook-form {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}


/* ════════════════════════════════════════════════════════════
   B. 홈 전용 H1 / 설명
   ------------------------------------------------------------
   기본은 숨김. 티스토리가 홈에 부여하는 body id(#tt-body-index)
   에서만 노출합니다. 글/카테고리/검색 페이지에는 나타나지 않습니다.
   ════════════════════════════════════════════════════════════ */
#lm-home-h1,
#lm-home-desc {
    display: none;
}

#tt-body-index #lm-home-h1,
#tt-body-index #lm-home-desc {
    display: block;
}

/* 설명이 비어 있으면 불필요한 여백이 생기지 않도록 */
#lm-home-desc:empty {
    display: none !important;
}


/* ════════════════════════════════════════════════════════════
   C. 목록 카드 링크화 + 썸네일
   ------------------------------------------------------------
   카드를 <a> 로 감쌌기 때문에, 링크 기본 스타일(밑줄/색상)이
   카드 안으로 새어 들어오지 않도록 차단합니다.
   ════════════════════════════════════════════════════════════ */
main a.no-underline,
main a.no-underline:hover,
main a.no-underline:visited {
    text-decoration: none !important;
    color: inherit;
}

/* 키보드 Tab 이동 시 어디에 있는지 보이게 (접근성 + 원래 없던 기능) */
main a.no-underline:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 18px;
}

/* --- 대표 이미지 썸네일 --- */
/* 카드의 padding(p-7 = 1.75rem)만큼 음수 마진을 줘서 위쪽 전체 폭을 채웁니다 */
.lm-thumb {
    margin: -1.75rem -1.75rem 1.25rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-surface-hover);
    border-radius: 16px 16px 0 0;
    /* flex 컨테이너 안에서 눌리지 않도록 고정 */
    flex: none;
}

.lm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.group:hover .lm-thumb img {
    transform: scale(1.05);
}

/* aspect-ratio 미지원 구형 브라우저 대비 */
@supports not (aspect-ratio: 16 / 9) {
    .lm-thumb {
        height: 180px;
    }
}


/* ════════════════════════════════════════════════════════════
   D. 애드센스 영역
   ------------------------------------------------------------
   ★ min-height 가 핵심입니다.
     광고는 늦게 로드되는데 그때 높이가 0 → 280px 로 튀면
     본문이 아래로 밀립니다. 이게 CLS(레이아웃 변경) 점수를 깎고,
     CLS 는 구글 검색 순위 요소입니다.
     미리 자리를 잡아두면 광고가 떠도 글이 흔들리지 않습니다.
   ════════════════════════════════════════════════════════════ */
.lm-ad {
    display: block;
    width: 100%;
    margin: 1.75rem 0;
    min-height: 280px;
    overflow: hidden;
    /* 광고 로딩 전 빈 공간이 덜 어색하도록 아주 옅은 바탕 */
    background: rgba(255, 255, 255, 0.015);
    border-radius: 12px;
}

.lm-ad .adsbygoogle {
    display: block;
    width: 100%;
}

@media (max-width: 767px) {
    .lm-ad {
        min-height: 250px;
        margin: 1.25rem 0;
    }
}

/* 본문 중간 자동 삽입 광고 (script.js SECTION 10)
   in-article 포맷은 높이가 유동적이라 상·하단보다 낮게 잡습니다. */
.lm-ad--mid {
    min-height: 200px;
    margin: 2.25rem 0;
}

@media (max-width: 767px) {
    .lm-ad--mid {
        min-height: 180px;
        margin: 1.5rem 0;
    }
}

/* 광고임을 알리는 작은 라벨 — 애드센스 정책상 권장(콘텐츠와 혼동 방지) */
.lm-ad::before {
    content: "AD";
    display: block;
    text-align: right;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    opacity: 0.5;
    padding: 4px 6px 2px 0;
}


/* ════════════════════════════════════════════════════════════
   E. ★중요★ 하단 플로팅 바 ↔ 애드센스 앵커 광고 충돌 방지
   ------------------------------------------------------------
   문제: 플로팅 바가 bottom:2rem(=32px), 높이 54px 에 있는데
         애드센스 '앵커 광고'는 화면 최하단 전체 폭을 차지합니다.
         → 정확히 겹침 → 오클릭 유발 → 정책 위반 소지

   해결: ① 모바일/태블릿에서는 무조건 위로 올림 (정적 안전장치)
         ② 앵커 광고가 실제로 감지되면 그 높이만큼 더 올림 (동적)
            (script.js SECTION 7 이 body 에 .lm-anchor-ad 를 붙입니다)
   ════════════════════════════════════════════════════════════ */

/* ① 정적 안전장치
      애드센스를 설정한 경우에만(body.lm-ads-enabled) 모바일에서 미리 올려둡니다.
      → 광고를 안 쓰는 블로그는 원래 위치(bottom:2rem) 그대로 유지되어
        불필요하게 바가 떠 보이지 않습니다.
      script.js SECTION 1 이 이 클래스를 붙입니다. */
@media (max-width: 1023px) {

    body.lm-ads-enabled #lm-action-bar,
    body.lm-anchor-ad #lm-action-bar {
        bottom: 6.5rem;
    }
}

/* ② 동적 정밀 보정 — 실제로 감지된 앵커 광고 높이 + 여유 16px
      (①보다 뒤에 선언되어 있고 선택자 특이도가 같으므로 이쪽이 최종 적용됩니다) */
body.lm-anchor-ad #lm-action-bar {
    bottom: calc(var(--lm-anchor-h, 90px) + 1rem);
}

/* iOS 홈 인디케이터(아래쪽 바) 영역 확보 */
#lm-action-bar {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transition: bottom 0.25s ease;
}


/* ════════════════════════════════════════════════════════════
   F. 읽기 진행률 바
   ------------------------------------------------------------
   기본은 숨김. script.js 가 '글 페이지'라고 판단했을 때만
   .lm-progress--on 을 붙여 활성화합니다.
   ════════════════════════════════════════════════════════════ */
#lm-progress {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-blue));
    transition: width 0.1s linear;
    pointer-events: none;
    will-change: width;
}

#lm-progress.lm-progress--on {
    display: block;
}


/* ════════════════════════════════════════════════════════════
   G. 관련글 영역 (script.js 가 RSS를 읽어 채웁니다)
   ------------------------------------------------------------
   내용이 없으면 #lm-related 는 비어 있으므로 아무것도 안 보입니다.
   ════════════════════════════════════════════════════════════ */
.lm-related-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
}

.lm-related-title i {
    color: var(--accent-color);
    font-size: 1rem;
}

.lm-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .lm-related-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.lm-related-item {
    /* 제목을 2줄까지만 보이게 하려면 -webkit-box 가 필요합니다 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.55;
    text-decoration: none !important;
    word-break: keep-all;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.lm-related-item:hover {
    border-color: rgb(var(--accent-rgb) / 0.4);
    background: var(--bg-surface-hover);
    color: #fff;
    transform: translateY(-2px);
}

.lm-related-item:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}


/* ════════════════════════════════════════════════════════════
   H. 모바일 목차 (기존 목차는 1280px 이상에서만 보였습니다)
   ------------------------------------------------------------
   본문 맨 위에 접이식(<details>)으로 삽입됩니다.
   1280px 이상에서는 오른쪽 사이드 목차가 있으므로 숨깁니다.
   ════════════════════════════════════════════════════════════ */
#lm-mobile-toc {
    margin: 0 0 2rem;
    padding: 1rem 1.1rem;
    background: rgba(39, 39, 42, 0.5);
    border: 1px solid var(--border-medium);
    border-radius: 14px;
}

#lm-mobile-toc>summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--accent-color);
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 기본 삼각형 마커 제거 (크롬/사파리) */
#lm-mobile-toc>summary::-webkit-details-marker {
    display: none;
}

#lm-mobile-toc>summary::after {
    content: "▾";
    margin-left: auto;
    transition: transform 0.2s ease;
}

#lm-mobile-toc[open]>summary::after {
    transform: rotate(180deg);
}

#lm-mobile-toc ul {
    list-style: none !important;
    margin: 0.85rem 0 0 !important;
    padding: 0.85rem 0 0 !important;
    border-top: 1px solid var(--border-subtle);
}

#lm-mobile-toc li {
    margin: 0 !important;
    padding: 0 !important;
}

#lm-mobile-toc li::marker {
    content: none;
}

#lm-mobile-toc a {
    display: block;
    padding: 0.4rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none !important;
    word-break: keep-all;
    transition: color 0.2s ease;
}

#lm-mobile-toc a:hover {
    color: var(--accent-color);
}

#lm-mobile-toc a.lm-toc-h3 {
    padding-left: 1rem;
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

/* 데스크탑(1280px↑)에는 오른쪽 사이드 목차가 있으므로 중복 숨김 */
@media (min-width: 1280px) {
    #lm-mobile-toc {
        display: none;
    }
}


/* ════════════════════════════════════════════════════════════
   I. 잡다한 마감
   ════════════════════════════════════════════════════════════ */

/* 글이 짧을 때 화면 한 바닥이 텅 비는 문제 완화 */
@media (max-width: 767px) {
    .min-h-screen {
        min-height: 60vh;
    }
}

/* ════════════════════════════════════════════════════════════
   J. 포스팅 본문 컴포넌트 키트  📝

   티스토리 에디터 기본 서식만으로는 정보성 글의 가독성에 한계가 있어
   원고에 바로 붙여넣어 쓸 수 있는 블록 5종을 정의합니다.
   HTML 모드에서 아래 클래스를 그대로 쓰면 됩니다.

     .lm-summary  글 맨 위 핵심 요약 (결론 먼저 → 이탈 방지)
     .lm-note     정보 / 참고
     .lm-warn     주의 / 마감일 / 자격 제한
     .lm-steps    신청 절차 1-2-3
     .lm-check    체크리스트
     .lm-source   출처 · 면책 (YMYL 필수)

   ⚠ 클래스 이름을 바꾸지 마세요. 원고 템플릿이 이 이름을 씁니다.
   ════════════════════════════════════════════════════════════ */

/* --- 공통 박스 --- */
.prose .lm-summary,
.prose .lm-note,
.prose .lm-warn,
.prose .lm-source,
.tt_article_useless_p_margin .lm-summary,
.tt_article_useless_p_margin .lm-note,
.tt_article_useless_p_margin .lm-warn,
.tt_article_useless_p_margin .lm-source {
    position: relative;
    margin: 1.75rem 0 !important;
    padding: 1.15rem 1.3rem 1.15rem 1.3rem !important;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    font-size: 0.95rem !important;
    line-height: 1.75 !important;
    word-break: keep-all;
}

.prose .lm-summary p,
.prose .lm-note p,
.prose .lm-warn p,
.prose .lm-source p,
.tt_article_useless_p_margin .lm-summary p,
.tt_article_useless_p_margin .lm-note p,
.tt_article_useless_p_margin .lm-warn p,
.tt_article_useless_p_margin .lm-source p {
    margin: 0 0 0.5rem 0 !important;
}

.prose .lm-summary p:last-child,
.prose .lm-note p:last-child,
.prose .lm-warn p:last-child,
.prose .lm-source p:last-child {
    margin-bottom: 0 !important;
}

/* ⚠️ [중요] 티스토리 에디터는 저장할 때 <b class="lm-title"> 의 class 를 삭제합니다.
   (2026-09-14 실측 확인 — 발행 후 .lm-title 개수 0)
   그래서 클래스에만 의존하면 박스 제목의 색 구분이 전부 사라집니다.
   → 아래 선택자들은 "박스 안 첫 번째 <b>" 를 제목으로 간주해
     클래스가 없어도 동일하게 스타일이 먹도록 합니다.
   ※ 원고에는 여전히 class="lm-title" 을 붙여도 됩니다(있으면 있는 대로 적용). */
.prose .lm-summary>b:first-child,
.prose .lm-note>b:first-child,
.prose .lm-warn>b:first-child,
.prose .lm-source>b:first-child,
.tt_article_useless_p_margin .lm-summary>b:first-child,
.tt_article_useless_p_margin .lm-note>b:first-child,
.tt_article_useless_p_margin .lm-warn>b:first-child,
.tt_article_useless_p_margin .lm-source>b:first-child,
.prose .lm-title,
.tt_article_useless_p_margin .lm-title {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.55rem;
}

/* --- 핵심 요약 (액센트) --- */
.prose .lm-summary,
.tt_article_useless_p_margin .lm-summary {
    background: rgb(var(--accent-rgb) / 0.07);
    border-color: rgb(var(--accent-rgb) / 0.3);
}

.prose .lm-summary>b:first-child,
.tt_article_useless_p_margin .lm-summary>b:first-child,
.prose .lm-summary .lm-title,
.tt_article_useless_p_margin .lm-summary .lm-title {
    color: var(--accent-color) !important;
}

/* --- 정보 / 참고 (중립) --- */
.prose .lm-note,
.tt_article_useless_p_margin .lm-note {
    background: rgba(255, 255, 255, 0.03);
}

.prose .lm-note>b:first-child,
.tt_article_useless_p_margin .lm-note>b:first-child,
.prose .lm-note .lm-title,
.tt_article_useless_p_margin .lm-note .lm-title {
    color: var(--text-secondary) !important;
}

/* --- 주의 (앰버) --- */
.prose .lm-warn,
.tt_article_useless_p_margin .lm-warn {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.32);
}

.prose .lm-warn>b:first-child,
.tt_article_useless_p_margin .lm-warn>b:first-child,
.prose .lm-warn .lm-title,
.tt_article_useless_p_margin .lm-warn .lm-title {
    color: #fbbf24 !important;
}

/* --- 출처 / 면책 (작고 조용하게) --- */
.prose .lm-source,
.tt_article_useless_p_margin .lm-source {
    background: transparent;
    border-style: dashed;
    font-size: 0.85rem !important;
    color: var(--text-tertiary) !important;
    line-height: 1.65 !important;
}

.prose .lm-source>b:first-child,
.tt_article_useless_p_margin .lm-source>b:first-child,
.prose .lm-source .lm-title,
.tt_article_useless_p_margin .lm-source .lm-title {
    color: var(--text-secondary) !important;
    font-size: 0.82rem;
}

.prose .lm-source a,
.tt_article_useless_p_margin .lm-source a {
    color: var(--text-secondary) !important;
}

/* --- 절차 (번호 스텝) --- */
.prose .lm-steps,
.tt_article_useless_p_margin .lm-steps {
    counter-reset: lmstep;
    list-style: none !important;
    margin: 1.75rem 0 !important;
    padding: 0 !important;
}

.prose .lm-steps>li,
.tt_article_useless_p_margin .lm-steps>li {
    counter-increment: lmstep;
    position: relative;
    list-style: none !important;
    margin: 0 0 0.75rem 0 !important;
    padding: 0.85rem 1rem 0.85rem 3.1rem !important;
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.7;
    word-break: keep-all;
}

.prose .lm-steps>li::marker,
.tt_article_useless_p_margin .lm-steps>li::marker {
    content: none;
}

.prose .lm-steps>li::before,
.tt_article_useless_p_margin .lm-steps>li::before {
    content: counter(lmstep);
    position: absolute;
    left: 0.9rem;
    top: 0.85rem;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    background: rgb(var(--accent-rgb) / 0.16);
    border: 1px solid rgb(var(--accent-rgb) / 0.45);
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
}

/* --- 체크리스트 --- */
.prose .lm-check,
.tt_article_useless_p_margin .lm-check {
    list-style: none !important;
    margin: 1.5rem 0 !important;
    padding: 0 !important;
}

.prose .lm-check>li,
.tt_article_useless_p_margin .lm-check>li {
    list-style: none !important;
    position: relative;
    margin: 0 0 0.5rem 0 !important;
    padding-left: 1.85rem !important;
    font-size: 0.95rem;
    line-height: 1.7;
    word-break: keep-all;
}

.prose .lm-check>li::marker,
.tt_article_useless_p_margin .lm-check>li::marker {
    content: none;
}

.prose .lm-check>li::before,
.tt_article_useless_p_margin .lm-check>li::before {
    content: "\f00c";
    /* FontAwesome check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.18rem;
    font-size: 0.8rem;
    color: var(--accent-color);
}

/* 모바일 여백 축소 */
@media (max-width: 640px) {

    .prose .lm-summary,
    .prose .lm-note,
    .prose .lm-warn,
    .prose .lm-source {
        padding: 1rem 1.05rem !important;
        margin: 1.35rem 0 !important;
    }

    .prose .lm-steps>li {
        padding: 0.75rem 0.85rem 0.75rem 2.9rem !important;
    }
}


/* ════════════════════════════════════════════════════════════
   K. 접근성 보정  ♿  (2026-09-14 Lighthouse 기준 실측 후 추가)

   측정에서 나온 문제
     · 클릭 가능한 요소 28개 중 23개가 44px 미만 → tap-targets 감점
     · 태그 링크가 높이 30px 로 가장 작았음
     · 모바일 검색/메뉴 버튼이 40x40

   손가락으로 정확히 누르기 어려우면 모바일 사용자가 이탈합니다.
   체류시간이 광고 노출과 직결되므로 수익에도 영향이 있습니다.
   ════════════════════════════════════════════════════════════ */

/* 태그 링크 — 높이 30px → 44px */
.tag-container a {
    display: inline-flex !important;
    align-items: center;
    min-height: 44px;
    padding: 0 0.5rem !important;
}

/* 헤더 아이콘 버튼 40x40 → 44x44 */
header button.w-10,
#mobile-menu button.w-10 {
    width: 44px !important;
    height: 44px !important;
}

/* 하단 플로팅 바 버튼 — 아이콘만 있어 실제 터치 영역이 작음 */
#lm-action-bar button {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

/* 푸터 SNS 아이콘 32px → 44px 터치 영역 (겉보기 크기는 유지) */
footer a.w-8 {
    position: relative;
}

footer a.w-8::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
}

/* 관련글 카드 — 최소 높이 확보 */
.lm-related-item {
    min-height: 44px;
}

/* 모바일 목차 링크 38px → 44px */
#lm-mobile-toc a {
    min-height: 44px;
    display: flex !important;
    align-items: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* 키보드 포커스 표시 (전역) — 키보드 사용자가 위치를 알 수 있어야 합니다 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 4px;
}


/* 공유 성공 토스트 */
.lm-toast {
    position: fixed;
    left: 50%;
    bottom: 9.5rem;
    transform: translateX(-50%) translateY(8px);
    z-index: 90;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    background: rgba(24, 24, 27, 0.95);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.lm-toast.lm-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Custom Line Clamp for Dynamic Summaries */
.line-clamp-6 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
}

/* Guestbook Reply Fix */
#guestbook-list ul li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

#guestbook-list ul li .group\/reply {
    background: transparent !important;
}

/* Guestbook Reply Description Force */
.reply-desc {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: #e4e4e7 !important;
    /* Zinc-200 */
    min-height: 20px;
    height: auto !important;
}

.reply-desc * {
    color: #e4e4e7 !important;
}

/* Guestbook Reply Meta Force */
.guest-reply-name {
    display: inline-block !important;
    color: #e4e4e7 !important;
    /* Zinc-200 */
    opacity: 1 !important;
    visibility: visible !important;
}

.guest-reply-date {
    display: inline-block !important;
    color: #71717a !important;
    /* Zinc-500 */
    opacity: 1 !important;
    visibility: visible !important;
}

/* Styling Tistory 'Load More Comments' Button */
.tt_more_preview_comments_wrap {
    background-color: transparent !important;
    border: 1px solid var(--border-medium) !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    margin: 20px auto !important;
    width: fit-content !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
}

.tt_more_preview_comments_wrap:hover {
    background-color: var(--bg-surface) !important;
}

.tt_more_preview_comments_text {
    color: var(--text-secondary) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

.tt_more_preview_comments_wrap:hover .tt_more_preview_comments_text {
    color: var(--text-primary) !important;
}

/* -------------------------------------------------------------------------- */
/* TISTORY SYSTEM OVERRIDES (Anti-Wobble / CLS Fix) */
/* -------------------------------------------------------------------------- */

/* Hide Tistory Toolbar completely to prevent top-shift on load */
#tistorytoolbarid,
.tt_menubar,
.tt-menubar {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* Ensure body doesn't possess padding from Tistory scripts */
body,
html {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Fix for potential margin collapse on Home Page */
#main-layout {
    padding-top: 3rem !important;
    /* Ensure consistent spacing */
}

/* -------------------------------------------------------------------------- */
/* ANTI-FLICKER / CLOAK STYLES (Fixes Scroll Shift) */
/* -------------------------------------------------------------------------- */
.cloak-until-loaded {
    /* Use visibility:hidden to PRESERVE SPACE during load */
    /* Do NOT use display:none, causing CLS/Wobble */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.cloak-until-loaded.loaded {
    visibility: visible;
    opacity: 1;
}

/* -------------------------------------------------------------------------- */
/* MOBILE OPTIMIZATION: Separators & Blockquotes */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {

    /* Blockquote Adjustments */
    .prose blockquote,
    .tt_article_useless_p_margin blockquote {
        margin: 1.5rem 0 !important;
        padding: 1.25rem 1rem !important;
    }

    /* Style 1: Centered Quote (Icon) */
    .prose blockquote[data-ke-style="style1"] .tt_article_useless_p_margin blockquote[data-ke-style="style1"] {
        padding-top: 3rem !important;
        font-size: 1rem !important;
    }

    /* Style 1 Icon Resize */
    .prose blockquote[data-ke-style="style1"]::before,
    .tt_article_useless_p_margin blockquote[data-ke-style="style1"]::before {
        font-size: 1.75rem !important;
        top: 0.25rem !important;
    }

    /* Horizontal Rule (HR) Adjustments */
    .tt_article_useless_p_margin hr,
    .prose hr {
        margin: 2.5rem auto !important;
    }

    /* Style 1: Dots */
    .tt_article_useless_p_margin hr[data-ke-style="style1"]::after,
    .prose hr[data-ke-style="style1"]::after {
        font-size: 28px !important;
        font-size: 28px !important;
        letter-spacing: 8px !important;
        text-indent: 8px !important;
        /* Perfect center alignment */
        margin-right: 0 !important;
    }

    /* Style 3: Zigzag */
    .tt_article_useless_p_margin hr[data-ke-style="style3"],
    .prose hr[data-ke-style="style3"] {
        width: 80px !important;
        height: 12px !important;
        background-size: 10px 5px !important;
    }

    /* Style 4: Vertical Line */
    .tt_article_useless_p_margin hr[data-ke-style="style4"],
    .prose hr[data-ke-style="style4"] {
        height: 24px !important;
    }
}

/* 11. Prev/Next Post Empty State Fallbacks */
#prev-post-container:empty,
#next-post-container:empty,
#prev-post-container.empty-nav,
#next-post-container.empty-nav {
    visibility: hidden;
    pointer-events: none;
}

/* ============================================================
   12. [접근성 v1.6.8] 페이지네이션 화면낭독기 전용 텍스트

   이전/다음 버튼은 아이콘뿐이라 접근 가능한 이름이 없었다.
   첫 페이지에서는 [##_prev_page_##] 가 href 없이 렌더되는데,
   href 없는 <a> 는 링크가 아니라서 aria-label 을 붙이면 ARIA 위반이 된다
   ("Elements must only use permitted ARIA attributes" 실측).
   그래서 .sr-only 텍스트로 이름을 주는데, 위의
   `.pagination a, .pagination span { padding: 8px 14px }` 가 선택자 특이도로
   .sr-only 의 padding:0 을 이겨서 1px 이어야 할 요소가 28x16px 로 부푼다.
   → 페이지네이션 안에서만 원래 크기로 되돌린다.
   ============================================================ */
.pagination .sr-only {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
/* ═══════════════════════════════════════════════════════════════════════════
   SECTION K. 본문 계산기 (script.js SECTION 12 가 생성)

   글에는 data-* 선언만 있고, 실제 UI 는 스크립트가 만듭니다.
   선언용 요소(.lm-calc-def)는 화면에서 감추되 DOM 에는 남겨
   자바스크립트가 꺼져 있거나 크롤러가 읽을 때 내용이 보이게 합니다.
   ═══════════════════════════════════════════════════════════════════════════ */

.prose .lm-calc {
    margin: 2.2rem 0;
}

/* 선언용 요소 — JS 가 돌면 감춤. is-ready 가 붙기 전에는 그대로 보입니다. */
.prose .lm-calc .lm-calc-def {
    display: none;
}

.prose .lm-calc-box {
    background: rgb(var(--accent-rgb) / 0.05);
    border: 1px solid rgb(var(--accent-rgb) / 0.28);
    border-radius: 16px;
    padding: 1.4rem 1.3rem 1.1rem;
}

.prose .lm-calc-title {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--accent-color) !important;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.prose .lm-calc-title::before {
    content: "";
    width: 4px;
    height: 1.05em;
    border-radius: 2px;
    background: var(--accent-color);
    flex: 0 0 auto;
}

/* ── 입력 ────────────────────────────────────────────────────────────── */
.prose .lm-calc-inputs {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.1rem;
}

.prose .lm-calc-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.prose .lm-calc-field label {
    font-size: .93rem;
    color: var(--text-sub);
    margin: 0;
}

.prose .lm-calc-control {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex: 1 1 180px;
    justify-content: flex-end;
}

.prose input.lm-calc-input {
    width: 100%;
    max-width: 200px;
    text-align: right;
    font-family: var(--font-mono, monospace);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: rgb(0 0 0 / 0.28);
    border: 1px solid rgb(255 255 255 / 0.14);
    border-radius: 10px;
    padding: .55rem .7rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -moz-appearance: textfield;
}

.prose input.lm-calc-input:focus {
    border-color: rgb(var(--accent-rgb) / 0.7);
    box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.16);
}

.prose .lm-calc-unit {
    font-size: .9rem;
    color: var(--text-sub);
    flex: 0 0 auto;
}

/* ── 결과 ────────────────────────────────────────────────────────────── */
.prose .lm-calc-outputs {
    border-top: 1px dashed rgb(255 255 255 / 0.14);
    padding-top: .9rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.prose .lm-calc-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.prose .lm-calc-rlabel {
    font-size: .93rem;
    color: var(--text-sub);
}

.prose .lm-calc-rvalue {
    font-family: var(--font-mono, monospace);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

/* 합계·실수령액처럼 강조할 줄 */
.prose .lm-calc-result.is-strong {
    margin-top: .35rem;
    padding-top: .65rem;
    border-top: 1px solid rgb(var(--accent-rgb) / 0.3);
}

.prose .lm-calc-result.is-strong .lm-calc-rlabel {
    color: #fff;
    font-weight: 600;
}

.prose .lm-calc-result.is-strong .lm-calc-rvalue {
    font-size: 1.22rem;
    color: var(--accent-color) !important;
}

.prose .lm-calc-note {
    margin: 1rem 0 0;
    font-size: .8rem;
    color: var(--text-dim, #8B8B96);
    line-height: 1.5;
}

@media (max-width: 480px) {
    .prose .lm-calc-box { padding: 1.15rem 1rem 1rem; }
    .prose .lm-calc-field { flex-direction: column; align-items: stretch; gap: .35rem; }
    .prose .lm-calc-control { justify-content: stretch; }
    .prose input.lm-calc-input { max-width: none; }
}

/* data-help — 입력·결과에 붙이는 한 줄 설명.
   처음 보는 용어(통상임금, 소정근로시간 등)에서 막히면 계산기를 쓰다 맙니다. */
.prose .lm-calc-labwrap {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    flex: 1 1 auto;
    min-width: 0;
}

.prose .lm-calc-help {
    font-size: .78rem;
    line-height: 1.45;
    color: var(--text-dim, #8B8B96);
}

.prose .lm-calc-rhelp {
    font-size: .78rem;
    line-height: 1.45;
    color: var(--text-dim, #8B8B96);
    margin: -.25rem 0 .1rem;
    padding-left: .1rem;
}

@media (max-width: 480px) {
    .prose .lm-calc-labwrap { flex: 1 1 100%; }
}

/* 드롭다운(data-options)·날짜(data-type="date") 입력 */
.prose select.lm-calc-select,
.prose input.lm-calc-date {
    width: 100%;
    max-width: 200px;
    text-align: right;
    font-family: var(--font-mono, monospace);
    font-size: .98rem;
    font-weight: 600;
    color: #fff;
    background: rgb(0 0 0 / 0.28);
    border: 1px solid rgb(255 255 255 / 0.14);
    border-radius: 10px;
    padding: .55rem .7rem;
    outline: none;
}

.prose select.lm-calc-select {
    text-align: left;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgb(var(--accent-rgb)) 50%),
                      linear-gradient(135deg, rgb(var(--accent-rgb)) 50%, transparent 50%);
    background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2rem;
}

.prose select.lm-calc-select option {
    background: #15161d;
    color: #fff;
}

.prose select.lm-calc-select:focus,
.prose input.lm-calc-date:focus {
    border-color: rgb(var(--accent-rgb) / 0.7);
    box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.16);
}

/* 구간표 — 본문에 보이는 표 그대로가 계산 데이터입니다. */
.prose table[data-bracket] {
    font-variant-numeric: tabular-nums;
}

/* [v-fix 2026-09-23] 모바일(480px 이하)에서 필드가 세로 배치로 바뀌면
   PC용 flex-basis(180px·100%)가 '높이'로 해석돼 입력칸마다 180px 빈 공간이 생겼다.
   세로 배치에서는 내용 높이만 차지하게 한다. (항목 233px → 약 90px) */
@media (max-width: 480px) {
    .prose .lm-calc-labwrap,
    .prose .lm-calc-control { flex: 0 0 auto; }
}



/* ============================================================
   SECTION M. 티스토리 블로그 메뉴  [##_blog_menu_##]
   ------------------------------------------------------------
   「꾸미기 → 메뉴」에서 구성한 항목이 여기로 들어옵니다.
   티스토리가 만드는 마크업(클래스 이름)은 공개돼 있지 않으므로
   ul / li / a 태그 선택자로만 스타일을 겁니다. 그래야 티스토리가
   마크업을 바꿔도 깨지지 않습니다.
   ============================================================ */

/* ── 데스크톱 헤더 ─────────────────────────────────────── */
.lm-blogmenu,
.lm-blogmenu ul {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lm-blogmenu ul ul {
    display: none;
}

/* 항목이 많아도 헤더가 밀리지 않게 — 넘치면 가로로만 흐릅니다 */
.lm-blogmenu {
    max-width: min(52vw, 640px);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lm-blogmenu::-webkit-scrollbar {
    display: none;
}

.lm-blogmenu li {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lm-blogmenu li::before,
.lm-blogmenu li::marker {
    content: none;
}

.lm-blogmenu a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-sub, #a1a1aa);
    white-space: nowrap;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease;
}

.lm-blogmenu a:hover {
    color: #fff;
    background: rgb(255 255 255 / 0.05);
}

/* 현재 보고 있는 메뉴 — 티스토리가 쓰는 표시 클래스를 모두 대응 */
.lm-blogmenu li.selected > a,
.lm-blogmenu li.on > a,
.lm-blogmenu li.active > a,
.lm-blogmenu li[aria-current] > a,
.lm-blogmenu a[aria-current] {
    color: rgb(var(--accent-hover-rgb));
    background: rgb(var(--accent-rgb) / 0.10);
}

/* 메뉴 항목이 6개를 넘어가면 살짝 좁혀 한 줄에 더 담습니다 */
@media (max-width: 1280px) {
    .lm-blogmenu a {
        padding: 0.5rem 0.55rem;
        font-size: 14px;
    }
}

/* ── 모바일 서랍 ───────────────────────────────────────── */
.lm-blogmenu-m,
.lm-blogmenu-m ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lm-blogmenu-m ul ul {
    display: none;
}

.lm-blogmenu-m li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lm-blogmenu-m li::before,
.lm-blogmenu-m li::marker {
    content: none;
}

.lm-blogmenu-m a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    border: 1px solid rgb(255 255 255 / 0.06);
    border-radius: 1rem;
    background: linear-gradient(to bottom right, rgb(39 39 42 / 0.5), rgb(24 24 27 / 0.5));
    color: #e4e4e7;
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.lm-blogmenu-m a:hover,
.lm-blogmenu-m a:active {
    border-color: rgb(var(--accent-rgb) / 0.3);
    color: #fff;
}

.lm-blogmenu-m li.selected > a,
.lm-blogmenu-m li.on > a,
.lm-blogmenu-m li.active > a,
.lm-blogmenu-m li[aria-current] > a,
.lm-blogmenu-m a[aria-current] {
    border-color: rgb(var(--accent-rgb) / 0.45);
    color: rgb(var(--accent-hover-rgb));
}

/* 메뉴를 하나도 만들지 않았거나 치환자가 비어 있을 때 빈 여백이 남지 않게 */
.lm-blogmenu:empty,
.lm-blogmenu-m:empty {
    display: none;
}

