/*
 * 블로그 공개 화면 스타일 (Tailwind 유틸리티 없이 이 파일만으로 구성)
 * - 목록: 필터 줄, 추천 글, 이미지 카드 그리드, 쇼츠 레일, 페이지 번호
 * - 상세: 대표 쇼츠, 관련 쇼츠, 같은 분류의 다른 글
 * 다크 모드는 사이트 공통 규칙대로 상위 요소의 .dark 클래스를 따른다.
 */

/* ---------- 색상·간격 변수 ---------- */
:root {
    --blog-bg: #e9e9e9; /* 사이트 전체 배경색(partials/page-background)과 같게 */
    --blog-surface: #fff;
    --blog-surface-hover: #ececec;
    --blog-text: #111827;
    --blog-text-secondary: #4b5563;
    --blog-text-muted: #6b7280;
    --blog-text-faint: #9ca3af;
    --blog-primary: #2563eb;
    --blog-primary-hover: #1d4ed8;
    --blog-accent: #3b82f6;
    --blog-strong: #111827;
    --blog-on-strong: #fff;
    --blog-media-bg: #f3f4f6;
    --blog-radius: .75rem;
    --blog-gutter: 1rem;
}
.dark {
    --blog-bg: #171b22;
    --blog-surface: #1f2937;
    --blog-surface-hover: #374151;
    --blog-text: #f3f4f6;
    --blog-text-secondary: #d1d5db;
    --blog-text-muted: #9ca3af;
    --blog-text-faint: #6b7280;
    --blog-primary: #3b82f6;
    --blog-primary-hover: #2563eb;
    --blog-accent: #60a5fa;
    --blog-strong: #f9fafb;
    --blog-on-strong: #111827;
    --blog-media-bg: #0b1220;
}
@media (min-width: 640px) { :root { --blog-gutter: 1.5rem; } }
@media (min-width: 1024px) { :root { --blog-gutter: 2rem; } }

/* 블로그 공개 화면은 사이트 공통 바탕 대신 블로그 바탕을 쓴다. */

/* ---------- 공통 ---------- */
.blog-page { color: var(--blog-text); }
.blog-wide { box-sizing: border-box; max-width: 1600px; margin-inline: auto; padding: 0 var(--blog-gutter) 4rem; }
.blog-article-page { padding-top: 1rem; }
@media (min-width: 640px) { .blog-article-page { padding-top: 2rem; } }
/* 링크 초기화는 블로그 부품 안에서만 한다(글 본문·댓글 링크 스타일은 건드리지 않는다). */
.blog-page :where(.blog-shot, .blog-featured, .blog-filter-bar, .blog-shorts, .blog-series-grid, .blog-filter-summary, .blog-section-head) a { color: inherit; text-decoration: none; }
.blog-page :focus-visible { outline: 2px solid var(--blog-accent); outline-offset: 3px; border-radius: 4px; }
.blog-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.blog-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-break { overflow-wrap: anywhere; word-break: keep-all; }

.blog-icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.blog-icon-xs { width: .75rem; height: .75rem; }
.blog-icon-sm { width: .875rem; height: .875rem; }
.blog-icon-md { width: 1.25rem; height: 1.25rem; }

/* 제목 앞 작은 재생 배지 */
.blog-badge-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: .375rem; background: var(--blog-primary); color: #fff; flex-shrink: 0; }
.blog-badge-icon.is-small { width: 1.25rem; height: 1.25rem; border-radius: .25rem; }

/* 섹션 제목 줄 */
.blog-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem .75rem; margin-bottom: 1.25rem; }
.blog-shorts-logo { display: inline-flex; flex-shrink: 0; margin-right: -.125rem; }
.blog-shorts-logo-icon { width: 1.75rem; height: 1.75rem; }
.blog-section-title { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.25rem; line-height: 1.75rem; font-weight: 700; letter-spacing: -.01em; }
.blog-section-count { margin-right: auto; font-size: var(--fs-sm, .875rem); color: var(--blog-text-muted); }
.blog-more-link { font-size: var(--fs-sm, .875rem); color: var(--blog-text-muted); }
.blog-more-link:hover { color: var(--blog-text); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 관리 링크 ---------- */
.blog-admin-links { display: flex; align-items: center; gap: .5rem; margin-left: auto; align-self: center; margin-block: -.5rem; font-size: var(--fs-sm, .875rem); } /* 음수 세로 여백: 버튼(36px)이 타이틀 줄보다 커도 줄 높이가 늘지 않게 */
.blog-admin-links a { color: var(--blog-text-muted); text-decoration: underline; text-underline-offset: 4px; }
.blog-admin-links .blog-admin-gear { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 9999px; text-decoration: none; transition: background-color .15s, color .15s; }
.blog-admin-links .blog-admin-gear:hover { background: rgb(0 0 0 / .06); color: var(--blog-text); }
.dark .blog-admin-links .blog-admin-gear:hover { background: rgb(255 255 255 / .08); }
.blog-admin-links .blog-admin-gear:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* ---------- 필터 줄: 둥근 분류 칩 + 둥근 검색창 ---------- */
.blog-filter-bar { display: flex; flex-direction: column; gap: .75rem; margin: 1rem calc(var(--blog-gutter) * -1) 2.5rem; padding: .75rem var(--blog-gutter);
    background: color-mix(in srgb, var(--blog-bg) 94%, transparent); }
.blog-filter-nav { order: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.blog-filter-search { order: 1; }
@media (min-width: 1024px) {
    .blog-filter-bar { position: sticky; top: 0; z-index: 20; flex-direction: row; align-items: center; justify-content: space-between; backdrop-filter: blur(8px); }
    .blog-filter-nav { order: 1; }
    .blog-filter-search { order: 2; max-width: 24rem; }
}
.blog-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem; border: 0; border-radius: 9999px; background: var(--blog-surface);
    font-size: var(--fs-sm, .875rem); font-weight: 500; color: var(--blog-text-secondary); transition: background-color .15s, color .15s; }
.blog-page a.blog-chip { color: var(--blog-text-secondary); }
.blog-page a.blog-chip:hover { background: var(--blog-surface-hover); color: var(--blog-text); }
.blog-page a.blog-chip[aria-current] { background: var(--blog-strong); color: var(--blog-on-strong); }
.blog-search { position: relative; display: flex; align-items: center; width: 100%; margin: 0; }
.blog-search input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 3.25rem 0 1.25rem; border: 1px solid transparent; border-radius: 9999px;
    background: var(--blog-surface); font: inherit; font-size: var(--fs-sm, .875rem); color: var(--blog-text); transition: border-color .15s, box-shadow .15s; }
/* iOS는 16px보다 작은 입력창을 누르면 페이지를 확대하고 그대로 둔다. 폰에서는 16px로 둔다. */
@media (max-width: 639.98px) { .blog-search input { font-size: 16px; } }
.blog-search input::placeholder { color: var(--blog-text-muted); }
.blog-search input:hover { box-shadow: 0 0 0 1px var(--blog-surface-hover); }
.blog-search input:focus { outline: none; border-color: var(--blog-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blog-accent) 25%, transparent); }
.blog-search-button { position: absolute; right: 4px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0;
    border-radius: 9999px; background: var(--blog-primary); color: #fff; cursor: pointer; transition: background-color .15s; }
.blog-search-button:hover { background: var(--blog-primary-hover); }

/* 검색·분류 결과 안내 */
.blog-filter-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1.5rem; font-size: var(--fs-sm, .875rem); color: var(--blog-text-secondary); }
.blog-filter-summary p { margin: 0; min-width: 0; }
.blog-page a.blog-link-button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem; border-radius: 9999px; background: var(--blog-surface); color: var(--blog-text); font-weight: 500; }
.blog-page a.blog-link-button:hover { background: var(--blog-surface-hover); }
.blog-empty { padding: 4rem 0; text-align: center; color: var(--blog-text-muted); }
.blog-empty p { margin: 0; }
.blog-empty p + p { margin-top: .5rem; font-size: var(--fs-sm, .875rem); }

/* ---------- 이미지 카드 그리드 ---------- */
.blog-shot-grid { display: grid; gap: 2.5rem 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .blog-shot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .blog-shot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .blog-shot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* 상세 화면 본문 열(사이드바 옆)은 폭이 좁아 열 수를 줄인다. */
@media (min-width: 1024px) and (max-width: 1279px) { .blog-shot-grid.is-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.blog-shot { min-width: 0; }
/* 폰: 글 목록은 왼쪽 썸네일(30%) + 오른쪽 제목·정보의 한 줄 목록 (추천 글 큰 카드는 그대로) */
@media (max-width: 639.98px) {
    .blog-shot-grid { gap: 1.25rem; }
    .blog-shot-grid .blog-shot { display: grid; grid-template-columns: 30% minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: .875rem; align-items: start; }
    .blog-shot-grid .blog-shot-media { grid-row: 1 / span 2; }
    .blog-shot-grid .blog-shot-placeholder { font-size: .625rem; letter-spacing: .2em; }
    .blog-shot-grid .blog-shot-title { margin-top: 0; }
    .blog-shot-grid .blog-shot-meta { margin-top: .25rem; }
    .blog-page .blog-shot-grid a.blog-shot-category { margin-left: 0; }
}
.blog-shot-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--blog-radius); background: var(--blog-media-bg); }
/* 이미지가 있으면 자리표시 배경을 지우고 이미지를 사방 1px 넓힌다.
   배경을 남겨 두면 둥근 모서리·소수점 폭 가장자리에서 배경색이 비쳐 테두리처럼 보인다. */
.blog-shot-media:has(> img) { background: transparent; }
.blog-shot-media img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: center; transition: transform .4s ease; }
.blog-shot-placeholder { display: flex; height: 100%; align-items: center; justify-content: center; font-size: var(--fs-xs, .75rem); letter-spacing: .3em; color: var(--blog-text-faint); }
.blog-shot-overlay { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: flex-end; padding: 1.25rem;
    background: linear-gradient(to top, rgb(0 0 0 / .78), rgb(0 0 0 / .1) 60%, transparent); color: #fff; opacity: 0; transition: opacity .25s ease; }
.blog-shot-overlay p { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-sm, .875rem); line-height: 1.375rem; }
@media (hover: hover) and (min-width: 640px) {
    .blog-shot-overlay { display: flex; }
    .blog-shot:hover .blog-shot-overlay, .blog-shot-media:focus-visible .blog-shot-overlay { opacity: 1; }
    .blog-shot:hover .blog-shot-media img { transform: scale(1.03); }
}
.blog-shot-title { margin: .75rem 0 0; font-size: var(--fs-sm, .9375rem); line-height: 1.5rem; font-weight: 600; letter-spacing: -.01em; }
.blog-shot-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.blog-shot-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin-top: .375rem; font-size: var(--fs-xs, .75rem); line-height: 1.25rem; color: var(--blog-text-secondary); }
.blog-shot-meta [data-blog-view-count] { white-space: nowrap; }
.blog-page a.blog-shot-category { margin-left: auto; color: var(--blog-text-muted); }
.blog-page a.blog-shot-category:hover { color: var(--blog-text); text-decoration: underline; }

/* ---------- 추천 글: 왼쪽 큰 글 1개, 오른쪽 작은 글 3개 ---------- */
.blog-featured-section { margin-bottom: 3rem; }
.blog-featured { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.blog-featured-main .blog-shot-media { margin-bottom: 1rem; }
.blog-featured-side { display: grid; grid-template-columns: 40% minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 1024px) {
    .blog-featured { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 2.5rem; row-gap: 1.25rem; align-items: start; }
    .blog-featured-main { grid-row: 1 / span 3; }
    .blog-featured-main .blog-shot-media { aspect-ratio: 16 / 9; }
    .blog-featured-side { grid-column: 2; grid-template-columns: 45% minmax(0, 1fr); }
}
.blog-page a.blog-featured-category { font-size: var(--fs-xs, .75rem); font-weight: 600; color: var(--blog-accent); }
.blog-page a.blog-featured-category:hover { text-decoration: underline; }
.blog-featured-title { margin: .25rem 0 0; font-size: var(--fs-base, 1rem); line-height: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.blog-featured-main .blog-featured-title { margin-top: .5rem; font-size: 1.5rem; line-height: 2rem; }
@media (min-width: 640px) { .blog-featured-main .blog-featured-title { font-size: 1.75rem; line-height: 2.25rem; } }
.blog-featured-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.blog-featured-summary { margin: .5rem 0 0; font-size: var(--fs-sm, .875rem); line-height: 1.5rem; color: var(--blog-text-secondary); }
@media (min-width: 640px) { .blog-featured-summary { font-size: var(--fs-base, 1rem); line-height: 1.75rem; } }
.blog-featured-date { margin: .375rem 0 0; font-size: var(--fs-xs, .75rem); color: var(--blog-text-muted); }

/* ---------- 시리즈 ---------- */
.blog-series-section { margin-bottom: 3rem; }
.blog-series-grid { display: grid; gap: .75rem; }
@media (min-width: 640px) { .blog-series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.blog-page a.blog-series-card { display: block; min-width: 0; padding: 1.25rem; border-radius: var(--blog-radius); background: var(--blog-surface); }
.blog-page a.blog-series-card:hover { background: var(--blog-surface-hover); }
.blog-series-card h3 { margin: 0; font-weight: 600; }
.blog-series-card p { margin: .5rem 0 0; font-size: var(--fs-sm, .875rem); color: var(--blog-text-muted); }

/* ---------- 쇼츠 레일 ---------- */
.blog-shorts-main { margin: 4rem 0; }
/* 제목 바로 옆에 채널 바로가기 아이콘, 넘겨보기 안내는 오른쪽 끝 */
.blog-page .blog-shorts .blog-section-head { justify-content: flex-start; align-items: center; }
/* 채널 바로가기는 제목 옆 외부 링크 아이콘만 (이름은 aria-label·title) */
.blog-page .blog-section-head a.blog-shorts-channel { display: grid; width: 1.75rem; height: 1.75rem; margin-left: -.375rem; place-items: center; border-radius: 9999px; color: var(--blog-text-muted); }
.blog-page .blog-section-head a.blog-shorts-channel:hover { background: rgba(100, 116, 139, .12); color: var(--blog-text); }
.blog-shorts-hint-wrap { margin-left: auto !important; }
.blog-shorts-hint { margin: 0; font-size: var(--fs-xs, .75rem); color: var(--blog-text-muted); }
.blog-shorts-track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: .75rem; margin: 0; padding: 0 0 .5rem; list-style: none;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
/* 가로 스크롤바는 숨기고 ← → 버튼(마우스 화면)이나 손가락으로 넘긴다. */
.blog-shorts-track::-webkit-scrollbar { display: none; }
.blog-shorts-arrows { display: flex; gap: .25rem; margin-left: auto; }
.blog-shorts-arrows[hidden] { display: none; }
/* 넘기기 버튼은 보조 조작이라 테두리·배경 없이 연한 회색 화살표만, 마우스를 올리면 진해진다 */
.blog-shorts-arrow { display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border: 0; border-radius: 9999px; background: transparent; color: #6b7280; font-size: .875rem; line-height: 1; cursor: pointer; transition: background-color .15s, color .15s; }
.blog-shorts-arrow:hover:not(:disabled) { background: #f3f4f6; color: #111827; }
.blog-shorts-arrow:disabled { opacity: .35; cursor: default; }
.blog-shorts-arrow:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.dark .blog-shorts-arrow { color: #9ca3af; }
.dark .blog-shorts-arrow:hover:not(:disabled) { background: #374151; color: #f9fafb; }
/* 마우스 화면: 버튼을 쓰고 안내 문구는 숨김 / 터치 화면: 안내 문구만 */
@media (hover: hover) and (pointer: fine) { .blog-shorts-hint { display: none; } }
@media (hover: none), (pointer: coarse) { .blog-shorts-arrows { display: none !important; } }
@media (min-width: 640px) { .blog-shorts-track { grid-auto-columns: 26%; } }
@media (min-width: 1024px) {
    .blog-shorts-track { grid-auto-columns: calc((100% - 4.5rem) / 7); }
    /* 한 줄에 다 들어가면 빈칸 없이 나눠 채운다(--rail-count는 개수). */
    .blog-shorts-track.is-fit { grid-auto-columns: calc((100% - (var(--rail-count) - 1) * .75rem) / var(--rail-count)); overflow: visible; }
    .blog-shorts-hint.is-fit { display: none; }
}
/* 글 상세 관련 쇼츠(최대 4개): 태블릿 이상은 4칸 한 줄, 폰은 2×2(약 800px) 대신 가로로 넘기는 한 줄 */
.blog-shorts-track.is-grid { grid-auto-flow: column; grid-auto-columns: 42%; }
@media (min-width: 640px) {
    .blog-shorts-track.is-grid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
    .blog-shorts-hint.is-grid-hint { display: none; }
}
.blog-short { min-width: 0; scroll-snap-align: start; }
.blog-short-link { display: block; border-radius: var(--blog-radius); }
.blog-short-media { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--blog-radius); background: #111827; }
.blog-short-media.is-loaded { background: transparent; }
/* 이미지를 사방 1px 넓혀 둥근 모서리·소수점 폭 가장자리에서 어두운 배경이 비치는 실선을 없앤다. */
.blog-short-media img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; transition: transform .4s ease; }
.blog-short-link:hover .blog-short-media img { transform: scale(1.04); }
.blog-short-play { position: absolute; left: .625rem; bottom: .625rem; display: inline-flex; align-items: center; justify-content: center;
    width: 2.25rem; height: 2.25rem; border-radius: 9999px; background: rgb(0 0 0 / .6); color: #fff; }
.blog-short-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .5rem;
    font-size: var(--fs-sm, .875rem); line-height: 1.25rem; font-weight: 500; color: var(--blog-text); }
.blog-short-link:hover .blog-short-title { text-decoration: underline; }

/* 상세: 댓글 다음의 관련 쇼츠·같은 분류의 다른 글 */
.blog-related-shorts { margin-top: 2rem; padding: 1.25rem; border-radius: 1rem; background: var(--blog-surface); }
@media (min-width: 640px) { .blog-related-shorts { padding: 2rem; } }
.blog-similar { margin-top: 2.5rem; }

/* ---------- 페이지 번호 ---------- */
.blog-pagination-wrap { margin-top: 4rem; }

@media (prefers-reduced-motion: reduce) {
    .blog-shot-media img, .blog-short-media img, .blog-shot-overlay { transition: none; }
}

/* ===================================================================
 * 글 상세 화면
 * =================================================================== */
.blog-article-layout { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.blog-article-main { width: 100%; min-width: 0; flex: 1 1 auto; }
@media (min-width: 1024px) { .blog-article-layout { flex-direction: row; } }

.blog-article { overflow: hidden; border-radius: 1rem; background: var(--blog-surface); }
.blog-article-header { padding: 1.25rem; }
.blog-article-content { padding: 1.25rem; }
@media (min-width: 640px) { .blog-article-header, .blog-article-content { padding: 2rem; } }
.blog-article-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.blog-breadcrumb { min-width: 0; font-size: var(--fs-xs, .75rem); line-height: 1.25rem; color: var(--blog-text-muted); }
.blog-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin: 0; padding: 0; list-style: none; }
.blog-breadcrumb a { color: inherit; text-decoration: none; }
.blog-breadcrumb a:hover { text-decoration: underline; }
.blog-page a.blog-article-edit { flex-shrink: 0; font-size: var(--fs-xs, .75rem); color: var(--blog-accent); text-decoration: none; }
.blog-page a.blog-article-edit:hover { text-decoration: underline; }
.blog-article-title { margin: 0; font-size: 1.625rem; line-height: 2.25rem; font-weight: 700; letter-spacing: -.02em; color: var(--blog-text); word-break: keep-all; overflow-wrap: anywhere; }
@media (min-width: 640px) { .blog-article-title { font-size: 2rem; line-height: 2.75rem; } }
.blog-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; font-size: var(--fs-xs, .75rem); line-height: 1.25rem; color: var(--blog-text-secondary); }
.blog-article-tag { padding: .25rem .5rem; border-radius: 9999px; background: var(--blog-bg); color: inherit; }
.blog-page a.blog-article-tag { color: var(--blog-text-secondary); text-decoration: none; }
.blog-page a.blog-article-tag:hover { text-decoration: underline; }
.blog-article-updated { padding: 0 .25rem; color: var(--blog-text-muted); }
.blog-article-meta [data-blog-view-count] { white-space: nowrap; }
.blog-article-cover { display: block; width: 100%; height: auto; }
.blog-article-text { color: var(--blog-text); }
.dark .blog-article-text { color: #e5e7eb; }
.blog-article-plain { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75rem; }
.blog-article-cta { margin-top: 2rem; }
.blog-article-cta a { color: var(--blog-primary); text-decoration: underline; overflow-wrap: anywhere; }
.blog-article-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.5rem; font-size: var(--fs-sm, .875rem); }
.blog-page a.blog-article-back { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem; border-radius: 9999px; background: var(--blog-bg); color: var(--blog-text); text-decoration: none; }
.blog-page a.blog-article-back:hover { background: var(--blog-surface-hover); }
.blog-article-footer .blog-more-link { text-decoration: none; }

/* 시리즈 이어 읽기 */
.blog-series-nav { margin-top: 2rem; padding: 1rem; border-radius: var(--blog-radius); background: var(--blog-bg); }
@media (min-width: 640px) { .blog-series-nav { padding: 1.25rem; } }
.blog-series-nav-eyebrow { margin: 0; font-size: var(--fs-xs, .75rem); font-weight: 500; color: var(--blog-text-muted); }
.blog-series-nav-title { margin: .25rem 0 0; font-size: var(--fs-lg, 1.125rem); font-weight: 700; color: var(--blog-text); scroll-margin-top: 8rem; }
.blog-series-nav-progress { margin: .5rem 0 0; font-size: var(--fs-sm, .875rem); color: var(--blog-text-secondary); }
.blog-series-nav-toc { margin-top: 1rem; }
.blog-series-nav-toc summary { min-height: 44px; padding: .75rem .5rem; border-radius: .5rem; font-size: var(--fs-sm, .875rem); font-weight: 500; cursor: pointer; }
.blog-series-nav-toc ol { display: grid; gap: .5rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.blog-page a.blog-series-nav-item { display: flex; align-items: flex-start; gap: .5rem; min-height: 44px; padding: .75rem; border-radius: .5rem; font-size: var(--fs-sm, .875rem); color: var(--blog-text-secondary); text-decoration: none; }
.blog-page a.blog-series-nav-item:hover { background: var(--blog-surface); }
.blog-page a.blog-series-nav-item[aria-current] { background: var(--blog-surface); color: var(--blog-text); }
.blog-series-nav-num { flex-shrink: 0; }
.blog-series-nav-current { margin-left: .5rem; font-size: var(--fs-xs, .75rem); font-weight: 600; }
.blog-series-nav-pager { display: grid; gap: .75rem; margin-top: 1rem; }
@media (min-width: 640px) { .blog-series-nav-pager.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.blog-page a.blog-series-nav-link { display: block; min-width: 0; min-height: 44px; padding: .75rem; border-radius: .5rem; background: var(--blog-surface); text-decoration: none; }
.blog-page a.blog-series-nav-link:hover { background: var(--blog-surface-hover); }
.blog-series-nav-label { display: block; font-size: var(--fs-xs, .75rem); color: var(--blog-text-muted); }
.blog-series-nav-link-title { display: block; margin-top: .25rem; font-size: var(--fs-sm, .875rem); font-weight: 500; color: var(--blog-text); }

/* 글 반응 */
.blog-reactions { margin-top: 2rem; scroll-margin-top: 160px; }
.blog-reactions-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; }
@media (min-width: 640px) { .blog-reactions-list { gap: 1rem; } }
.blog-post-reaction { display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 44px; min-height: 44px; padding: .5rem .25rem; border: 0; border-radius: .5rem;
    background: transparent; color: var(--blog-text-secondary); font: inherit; cursor: pointer; transition: background-color .15s, color .15s; }
@media (min-width: 640px) { .blog-post-reaction { padding-inline: .75rem; } }
.blog-post-reaction:hover { background: var(--blog-bg); }
.blog-post-reaction:disabled { opacity: .5; }
.blog-post-reaction[aria-pressed="true"] { color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 1px #93c5fd; }
.dark .blog-post-reaction[aria-pressed="true"] { color: #93c5fd; background: #172554; box-shadow: inset 0 0 0 1px #3b82f6; }
.blog-post-reaction-emoji { font-size: 1.5rem; line-height: 1; }
@media (min-width: 640px) { .blog-post-reaction-emoji { font-size: 1.875rem; } }
.blog-post-reaction-label { display: flex; align-items: center; gap: .25rem; font-size: var(--fs-xs, .75rem); }
.blog-post-reaction-long { display: none; }
@media (min-width: 640px) { .blog-post-reaction-short { display: none; } .blog-post-reaction-long { display: inline; } }
.blog-reactions-total { margin: .75rem 0 0; text-align: center; font-size: var(--fs-xs, .75rem); color: var(--blog-text-secondary); }
.blog-reactions-status { margin: .5rem 0 0; text-align: center; font-size: var(--fs-sm, .875rem); color: var(--blog-text-secondary); }
.blog-reactions-total[hidden], .blog-reactions-status[hidden] { display: none; }
.blog-reactions-login { padding-inline: .75rem; }

/* 공유하기: 구분선 없이 여백으로 나눈다. */
.blog-share { margin-top: 2rem; }
.blog-share-title { margin: 0; font-size: var(--fs-sm, .875rem); line-height: 1.25rem; font-weight: 600; color: var(--blog-text); }
.blog-share-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.blog-share-button { padding-inline: .75rem; font-size: var(--fs-sm, .875rem); font-weight: 500; white-space: nowrap; }
.blog-share-status { margin: .5rem 0 0; font-size: var(--fs-13, .8125rem); line-height: 1.25rem; color: var(--blog-text-secondary); }
.blog-share-fallback { margin-top: .5rem; }
.blog-share-fallback[hidden] { display: none; }
.blog-share-fallback label { display: block; font-size: var(--fs-sm, .875rem); color: var(--blog-text-secondary); }
.blog-share-fallback input { box-sizing: border-box; width: 100%; min-height: 44px; margin-top: .5rem; padding: 0 .75rem; border: 1px solid #d1d5db; border-radius: .5rem;
    background: var(--blog-surface); font: inherit; font-size: var(--fs-sm, .875rem); color: var(--blog-text); }
.dark .blog-share-fallback input { border-color: #4b5563; background: #111827; }

/* 사이드바: 사이트 공통 sir-sidebar-* 위에 블로그 배치만 더한다. */
.blog-sidebar { display: grid; gap: 1rem; width: 100%; flex-shrink: 0; }
@media (min-width: 1024px) { .blog-sidebar { width: 16rem; } }
.blog-sidebar-list { display: grid; gap: .25rem; }
.blog-sidebar-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.blog-sidebar-row > span:first-child { min-width: 0; }
.blog-sidebar-count { flex-shrink: 0; font-size: var(--fs-xs, .75rem); color: var(--blog-text-muted); }
.blog-sidebar-post { display: flex; align-items: flex-start; gap: .75rem; }
.blog-sidebar-post + .blog-sidebar-post { margin-top: .25rem; }
.blog-sidebar-thumb { width: 4rem; height: 3rem; flex-shrink: 0; overflow: hidden; border-radius: .375rem; background: var(--blog-media-bg); }
.blog-sidebar-thumb:has(> img) { position: relative; background: transparent; }
.blog-sidebar-thumb img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: center; }
.blog-sidebar-thumb img.is-contain { object-fit: contain; background-color: #100d25; }
.blog-sidebar-thumb-empty { display: flex; height: 100%; align-items: center; justify-content: center; font-size: var(--fs-xs, .75rem); letter-spacing: .1em; color: var(--blog-text-faint); }
.blog-sidebar-post-text { min-width: 0; flex: 1 1 auto; }
.blog-sidebar-post-text h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: var(--fs-13, .8125rem); line-height: 1.25rem; font-weight: 400; color: var(--blog-text); }
.blog-sidebar-post:hover h3 { text-decoration: underline; }
.blog-sidebar-post-text time { display: block; margin-top: .25rem; font-size: var(--fs-xs, .6875rem); line-height: 1rem; color: var(--blog-text-muted); }
.blog-sidebar-series { display: block; min-height: 44px; }
.blog-sidebar-series > span { display: block; }
.blog-sidebar-series .blog-sidebar-count { margin-top: .25rem; }
