/* 글 안의 코드 블록 꾸미기 (2026-11-08 사용자 요청: "코드 블록처럼 이쁘게")
   code-blocks.js 가 .post-content pre 를 .code-block 으로 감싸 위에 언어 이름과 복사 단추를 붙인다.
   언어를 적은 블록(<code class="language-python">)만 highlight.js 로 색을 입힌다. 색은 다크(기본)·라이트 두 벌 */
.post-content .code-block {
    margin: 24px 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    background: #0d1117;
}
.post-content .code-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px 8px 16px;
    background: #161b22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono);
    font-size: 12px;
    color: #8b949e;
}
.post-content .code-block-lang {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.04em;
}
.post-content .code-block-copy {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: transparent;
    color: #c9d1d9;
    font: inherit;
    cursor: pointer;
}
.post-content .code-block-copy:hover { background: rgba(255, 255, 255, 0.08); }
.post-content .code-block-copy.done { color: #3fb950; border-color: rgba(63, 185, 80, 0.5); }
.post-content .code-block pre {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 16px 18px;
    /* 한글 글꼴로 넘어가면 역슬래시가 ₩ 로 보인다. 영문 고정폭 글꼴을 먼저 둔다 */
    font-family: 'JetBrains Mono', Consolas, 'Cascadia Mono', Menlo, 'D2Coding', monospace;
    max-height: 640px;
    overflow: auto;
    font-size: 13.5px;
    line-height: 1.65;
    tab-size: 4;
}
.post-content .code-block pre code {
    color: #e6edf3;
    background: none;
    padding: 0;
    white-space: pre;
}

/* highlight.js 낱말 색(다크) */
.post-content .code-block .hljs-keyword,
.post-content .code-block .hljs-built_in,
.post-content .code-block .hljs-literal { color: #ff7b72; }
.post-content .code-block .hljs-string,
.post-content .code-block .hljs-regexp { color: #a5d6ff; }
.post-content .code-block .hljs-comment,
.post-content .code-block .hljs-quote { color: #8b949e; font-style: italic; }
.post-content .code-block .hljs-number { color: #79c0ff; }
.post-content .code-block .hljs-title,
.post-content .code-block .hljs-title.function_,
.post-content .code-block .hljs-section { color: #d2a8ff; }
.post-content .code-block .hljs-attr,
.post-content .code-block .hljs-variable,
.post-content .code-block .hljs-params,
.post-content .code-block .hljs-property { color: #ffa657; }
.post-content .code-block .hljs-meta { color: #7ee787; }
.post-content .code-block .hljs-subst { color: #e6edf3; }

/* 라이트 테마 */
[data-theme="light"] .post-content .code-block { background: #f6f8fa; border-color: rgba(20, 26, 51, 0.14); }
[data-theme="light"] .post-content .code-block-head { background: #eaeef2; border-bottom-color: rgba(20, 26, 51, 0.1); color: #57606a; }
[data-theme="light"] .post-content .code-block-copy { color: #24292f; border-color: rgba(20, 26, 51, 0.2); }
[data-theme="light"] .post-content .code-block-copy:hover { background: rgba(20, 26, 51, 0.06); }
[data-theme="light"] .post-content .code-block-copy.done { color: #1a7f37; border-color: rgba(26, 127, 55, 0.5); }
[data-theme="light"] .post-content .code-block pre code { color: #1f2328; }
[data-theme="light"] .post-content .code-block .hljs-keyword,
[data-theme="light"] .post-content .code-block .hljs-built_in,
[data-theme="light"] .post-content .code-block .hljs-literal { color: #cf222e; }
[data-theme="light"] .post-content .code-block .hljs-string,
[data-theme="light"] .post-content .code-block .hljs-regexp { color: #0a3069; }
[data-theme="light"] .post-content .code-block .hljs-comment,
[data-theme="light"] .post-content .code-block .hljs-quote { color: #6e7781; }
[data-theme="light"] .post-content .code-block .hljs-number { color: #0550ae; }
[data-theme="light"] .post-content .code-block .hljs-title,
[data-theme="light"] .post-content .code-block .hljs-title.function_,
[data-theme="light"] .post-content .code-block .hljs-section { color: #8250df; }
[data-theme="light"] .post-content .code-block .hljs-attr,
[data-theme="light"] .post-content .code-block .hljs-variable,
[data-theme="light"] .post-content .code-block .hljs-params,
[data-theme="light"] .post-content .code-block .hljs-property { color: #953800; }
[data-theme="light"] .post-content .code-block .hljs-meta { color: #116329; }
[data-theme="light"] .post-content .code-block .hljs-subst { color: #1f2328; }

@media (max-width: 480px) {
    .post-content .code-block pre { font-size: 12.5px; padding: 14px; max-height: 520px; }
}
