/* ============================================================
   blog.0xCC2C Ghost Theme
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.min.css');
@import url('https://cdn.jsdelivr.net/npm/galmuri/dist/galmuri.css');

/* ── 토큰 ── */
:root {
  --bg:         #1a1a1a;
  --bg2:        #202020;
  --bg3:        #282828;
  --surface:    #303030;
  --border:     #3a3a3a;
  --border2:    #4a3060;
  --purple:     #6C3699;
  --purple-l:   #8a4bbf;
  --purple-d:   #4a2570;
  --purple-dim: rgba(108,54,153,.12);
  --green:      #9ECE62;
  --text:       #e8e8e8;
  --muted:      #888;
  --dimmed:     #555;
  --fp: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --fg: 'Galmuri7', monospace;
  --fm: 'Galmuri7Condensed', monospace;
  --r:      6px;
  --r-lg:   10px;
  --header-h: 58px;
  --sidebar-w: 280px;
  --t: .18s ease;
  --shadow: rgba(0,0,0,.45);
}

/* ── 라이트 테마 ── */
@media (prefers-color-scheme:light) {
  :root {
    --bg:#f2f0f5; --bg2:#faf9fc; --bg3:#ede9f5; --surface:#e4dff0;
    --border:#d0c8e0; --border2:#a07ccc;
    --text:#1e1830; --muted:#6b5f80; --dimmed:#a090b8;
    --shadow:rgba(80,40,120,.1);
  }
}
[data-theme="dark"] {
  --bg:#1a1a1a; --bg2:#202020; --bg3:#282828; --surface:#303030;
  --border:#3a3a3a; --border2:#4a3060;
  --text:#e8e8e8; --muted:#888; --dimmed:#555; --shadow:rgba(0,0,0,.45);
}
[data-theme="light"] {
  --bg:#f2f0f5; --bg2:#faf9fc; --bg3:#ede9f5; --surface:#e4dff0;
  --border:#d0c8e0; --border2:#a07ccc;
  --text:#1e1830; --muted:#6b5f80; --dimmed:#a090b8; --shadow:rgba(80,40,120,.1);
}

/* ── 테마 아이콘 ── */
.icon-sun  { display:block; }
.icon-moon { display:none; }
[data-theme="light"] .icon-sun  { display:none; }
[data-theme="light"] .icon-moon { display:block; }
@media (prefers-color-scheme:light) {
  :root:not([data-theme]) .icon-sun  { display:none; }
  :root:not([data-theme]) .icon-moon { display:block; }
}

/* ── 리셋 ── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:15px; scroll-behavior:smooth; }
body { background:var(--bg); color:var(--text); font-family:var(--fp); line-height:1.75; min-height:100vh; overflow-x:hidden; transition:background var(--t),color var(--t); }
a { color:var(--purple-l); text-decoration:none; transition:color var(--t); }
a:hover { color:var(--green); }
img { max-width:100%; height:auto; display:block; }
button { cursor:pointer; border:none; background:none; }

/* 노이즈 텍스처 */
body::after { content:''; position:fixed; inset:0; pointer-events:none; z-index:999; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E"); opacity:.022; }

/* ── 스크롤바 ── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--purple-d); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--purple-l); }
::selection { background:var(--purple); color:#fff; }

/* ── 진행 바 ── */
.progress { position:fixed; top:0; left:0; right:0; z-index:9999; height:3px; pointer-events:none; }
.progress__fill { height:100%; width:0%; background:linear-gradient(90deg,var(--purple),var(--purple-l)); transition:width .1s; }

/* ── 모바일 전용: PC에서 완전히 숨김 ── */
.mobile-only { display:none !important; }
@media (max-width:1024px) { .mobile-only { display:flex !important; } }

/* ════════════════════════════
   헤더 — 테마와 함께 전환
════════════════════════════ */
.site-header {
  position:sticky; top:0; z-index:200; height:var(--header-h);
  background:rgba(26,26,26,.92);
  backdrop-filter:blur(18px);
  border-bottom:1px solid #2e2e2e;
  transition:background var(--t), border-color var(--t);
}
[data-theme="light"] .site-header {
  background:rgba(242,240,245,.92);
  border-bottom-color:#d0c8e0;
}
@media (prefers-color-scheme:light) {
  :root:not([data-theme]) .site-header {
    background:rgba(242,240,245,.92);
    border-bottom-color:#d0c8e0;
  }
}

.header-inner { max-width:1160px; margin:0 auto; padding:0 20px; height:100%; display:flex; align-items:center; gap:12px; }

/* 로고: Galmuri, 흑백 */
.site-logo { font-family:var(--fg); font-size:1rem; letter-spacing:.04em; color:#f0f0f0; white-space:nowrap; }
.site-logo:hover { color:#f0f0f0; opacity:.7; }
[data-theme="light"] .site-logo { color:#1e1830; }
@media (prefers-color-scheme:light) {
  :root:not([data-theme]) .site-logo { color:#1e1830; }
}

.header-nav { flex:1; display:flex; align-items:center; justify-content:flex-end; gap:2px; }
.header-nav a, .header-nav button { display:flex; align-items:center; gap:5px; font-family:var(--fp); font-size:.78rem; font-weight:500; color:#aaa; padding:6px 12px; border-radius:var(--r); transition:color var(--t),background var(--t); }
.header-nav a:hover, .header-nav button:hover { color:#f0f0f0; background:rgba(255,255,255,.08); }
[data-theme="light"] .header-nav a,
[data-theme="light"] .header-nav button { color:#6b5f80; }
[data-theme="light"] .header-nav a:hover,
[data-theme="light"] .header-nav button:hover { color:#1e1830; background:rgba(108,54,153,.1); }
@media (prefers-color-scheme:light) {
  :root:not([data-theme]) .header-nav a,
  :root:not([data-theme]) .header-nav button { color:#6b5f80; }
  :root:not([data-theme]) .header-nav a:hover,
  :root:not([data-theme]) .header-nav button:hover { color:#1e1830; background:rgba(108,54,153,.1); }
}

/* ── 레이아웃 ── */
.site-body { max-width:1160px; margin:0 auto; padding:28px 20px; display:grid; grid-template-columns:1fr var(--sidebar-w); gap:28px; align-items:start; }

/* ════════════════════════════
   사이드바 — 박스 없음
════════════════════════════ */
.sidebar-backdrop { display:none; }
.site-sidebar { background:transparent; border:none; overflow:hidden; position:sticky; top:calc(var(--header-h) + 14px); max-height:calc(100vh - var(--header-h) - 28px); overflow-y:auto; }
.site-sidebar::-webkit-scrollbar { width:3px; }
.site-sidebar::-webkit-scrollbar-thumb { background:var(--purple-d); border-radius:2px; }

/* 사이드바 헤더 */
.sidebar-header { display:flex; align-items:center; justify-content:space-between; padding:0 4px 12px; border-bottom:1px solid var(--border2); margin-bottom:4px; font-family:var(--fp); font-size:.82rem; font-weight:700; color:var(--text); }
.sidebar-close-btn { color:var(--dimmed); transition:color var(--t); }
.sidebar-close-btn:hover { color:var(--purple-l); }

/* 섹션 */
.sidebar-section { border-bottom:1px solid var(--border); }
.sidebar-section:last-child { border-bottom:none; }
.sidebar-section__title { display:flex; align-items:center; gap:6px; padding:10px 4px; font-family:var(--fp); font-size:.7rem; font-weight:700; color:var(--purple-l); text-transform:uppercase; letter-spacing:.1em; cursor:pointer; transition:color var(--t); }
.sidebar-section__title::before { content:'>'; color:var(--purple-d); }
.sidebar-section__title:hover { color:var(--purple-l); opacity:.8; }
.sidebar-section__title .chevron { margin-left:auto; transition:transform .2s; color:var(--dimmed); }
.sidebar-section.collapsed .chevron { transform:rotate(-90deg); }
.sidebar-section.collapsed .sidebar-section__body { display:none; }
.sidebar-section__body { padding:8px 4px 12px; }

/* 검색 */
.search-box { display:flex; border:1px solid var(--border2); border-radius:var(--r); overflow:hidden; background:var(--bg3); transition:border-color var(--t); }
.search-box:focus-within { border-color:var(--purple-l); box-shadow:0 0 0 2px var(--purple-dim); }
.search-box input { flex:1; background:none; border:none; outline:none; padding:7px 10px; font-size:.8rem; color:var(--text); font-family:var(--fp); }
.search-box input::placeholder { color:var(--dimmed); }
.search-box button { padding:7px 10px; color:var(--muted); transition:color var(--t); }
.search-box button:hover { color:var(--purple-l); }

/* 카테고리 */
.category-section ul { list-style:none; }
.category-section li { border-bottom:1px solid var(--border); }
.category-section li:last-child { border-bottom:none; }
.category-section a { display:flex; align-items:center; justify-content:space-between; padding:7px 2px; font-size:.8rem; color:var(--muted); transition:color var(--t); }
.category-section a:hover { color:var(--purple-l); }
.category-section .count { font-size:.65rem; color:var(--dimmed); }

/* 최근 글 */
.post-section .sidebar-section__body ul { list-style:none; }
.post-section .sidebar-section__body li { display:flex; gap:10px; padding:8px 0; border-bottom:1px solid var(--border); }
.post-section .sidebar-section__body li:last-child { border-bottom:none; padding-bottom:0; }
.post-section .img-wrapper { width:50px; height:42px; flex-shrink:0; border-radius:3px; overflow:hidden; background:var(--surface); }
.post-section .img-wrapper img { width:100%; height:100%; object-fit:cover; }
.post-section .post-desc { flex:1; display:flex; flex-direction:column; gap:3px; }
.post-section .title { font-size:.76rem; color:var(--text); font-weight:500; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.post-section .title:hover { color:var(--purple-l); }
.post-section .category { font-size:.65rem; color:var(--dimmed); }
.post-section .category:hover { color:var(--purple-l); }

/* 태그 */
.tag-cloud-list { list-style:none; display:flex; flex-wrap:wrap; gap:6px; }
.cloud { font-size:.7rem; padding:.26rem .68rem; border-radius:999px; font-weight:500; letter-spacing:.04em; border:1px solid var(--border2); color:var(--purple-l); background:rgba(108,54,153,.08); transition:background .2s,border-color .2s; }
.cloud:hover { background:rgba(108,54,153,.2); border-color:var(--purple-l); }

/* ════════════════════════════
   홈 화면
════════════════════════════ */
.home-profile { display:flex; gap:20px; align-items:center; background:var(--bg2); border:1px solid var(--border2); border-radius:var(--r-lg); padding:24px; margin-bottom:24px; background-image:radial-gradient(ellipse 60% 80% at 100% 50%,rgba(108,54,153,.1) 0%,transparent 70%); }
.home-profile__avatar { width:72px; height:72px; flex-shrink:0; border-radius:50%; overflow:hidden; border:2px solid var(--border2); }
.home-profile__avatar img { width:100%; height:100%; object-fit:cover; }
.home-profile__title { font-family:var(--fp); font-size:1.05rem; font-weight:700; color:var(--text); margin-bottom:6px; }
.home-profile__desc { font-size:.83rem; color:var(--muted); line-height:1.7; margin-bottom:10px; }
.home-profile__links { display:flex; flex-wrap:wrap; gap:6px; }
.home-profile__links a { font-size:.7rem; padding:.26rem .68rem; border-radius:999px; font-weight:500; border:1px solid var(--border2); color:var(--purple-l); background:rgba(108,54,153,.08); transition:background .2s,border-color .2s; }
.home-profile__links a:hover { background:rgba(108,54,153,.2); border-color:var(--purple-l); }

.intro-card { display:flex; align-items:center; gap:12px; background:var(--bg2); border:1px solid var(--border2); border-left:3px solid var(--purple); border-radius:var(--r); padding:12px 16px; margin-bottom:20px; font-size:.82rem; color:var(--muted); }
.intro-card svg { color:var(--purple-l); flex-shrink:0; }

.home-section { margin-bottom:28px; }
.home-section__header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.home-section__title { font-family:var(--fp); font-size:.72rem; font-weight:700; color:var(--purple-l); display:flex; align-items:center; gap:8px; text-transform:uppercase; letter-spacing:.1em; }
.home-section__title::before { content:'—'; color:var(--purple-d); }
.home-section__more { font-family:var(--fp); font-size:.68rem; font-weight:500; color:var(--dimmed); border:1px solid var(--border); padding:3px 10px; border-radius:var(--r); transition:all var(--t); }
.home-section__more:hover { color:var(--purple-l); border-color:var(--border2); }

.home-card-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; }
.home-card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--r); overflow:hidden; transition:border-color var(--t),transform var(--t),box-shadow var(--t); display:flex; flex-direction:column; }
.home-card:hover { border-color:var(--border2); transform:translateY(-2px); box-shadow:0 4px 20px var(--shadow); }
.home-card__thumb { aspect-ratio:16/9; overflow:hidden; background:var(--surface); display:block; }
.home-card__thumb img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.home-card:hover .home-card__thumb img { transform:scale(1.05); }
.home-card__body { padding:10px 12px; flex:1; display:flex; flex-direction:column; gap:4px; }
.home-card__tag { font-family:var(--fp); font-size:.62rem; color:var(--purple-l); }
.home-card__tag a { color:inherit; }
.home-card__tag a:hover { color:var(--green); }
.home-card__title { font-size:.8rem; font-weight:600; color:var(--text); line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.home-card__title a { color:inherit; }
.home-card__title a:hover { color:var(--purple-l); }
.home-card__meta { font-family:var(--fp); font-size:.62rem; color:var(--dimmed); margin-top:auto; }

.home-gallery-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.home-gallery-item { position:relative; aspect-ratio:4/3; overflow:hidden; border-radius:var(--r); border:1px solid var(--border); background:var(--surface); }
.home-gallery-item a { display:block; width:100%; height:100%; }
.home-gallery-item img { width:100%; height:100%; object-fit:cover; transition:transform .35s; }
.home-gallery-item:hover img { transform:scale(1.08); }
.home-gallery-item__overlay { position:absolute; bottom:0; left:0; right:0; padding:28px 12px 10px; background:linear-gradient(to top,rgba(0,0,0,.8),transparent); }
.home-gallery-item__title { font-size:.78rem; font-weight:600; color:#fff; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.home-gallery-item__meta { font-family:var(--fp); font-size:.62rem; color:rgba(255,255,255,.5); margin-top:3px; }

/* ════════════════════════════
   글 목록
════════════════════════════ */
.feed-List .post-card,.feed-list .post-card { display:flex; flex-direction:row; background:transparent; border:none; border-bottom:1px solid var(--border); margin-bottom:0; padding:12px 0; overflow:visible; transition:opacity var(--t); }
.feed-List .post-card:last-child,.feed-list .post-card:last-child { border-bottom:none; }
.feed-List .post-card:hover,.feed-list .post-card:hover { opacity:.85; }
.feed-List .post-card-thumb,.feed-list .post-card-thumb { width:76px; height:76px; flex-shrink:0; margin:0 14px 0 0; overflow:hidden; background:var(--surface); border-radius:var(--r); }
.feed-List .post-card-thumb img,.feed-list .post-card-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.feed-List .post-card:hover .post-card-thumb img,.feed-list .post-card:hover .post-card-thumb img { transform:scale(1.05); }
.feed-List .thumb-Radius,.feed-list .thumb-radius { border-radius:var(--r); }
.feed-List .thumb-Rectangle,.feed-list .thumb-rectangle { border-radius:0; }

.feed-Card,.feed-card { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.feed-Card .post-card,.feed-card .post-card { display:flex; flex-direction:column; background:var(--bg2); border:none; border-radius:var(--r-lg); overflow:hidden; transition:transform var(--t),box-shadow var(--t); }
.feed-Card .post-card:hover,.feed-card .post-card:hover { transform:translateY(-3px); box-shadow:0 6px 20px var(--shadow); }
.feed-Card .post-card-thumb,.feed-card .post-card-thumb { width:100%; aspect-ratio:16/9; overflow:hidden; background:var(--surface); border-radius:0; margin:0; }
.feed-Card .post-card-thumb img,.feed-card .post-card-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.feed-Card .post-card:hover .post-card-thumb img,.feed-card .post-card:hover .post-card-thumb img { transform:scale(1.05); }

.feed-Gallery,.feed-gallery { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.feed-Gallery .post-card,.feed-gallery .post-card { position:relative; aspect-ratio:1/1; overflow:hidden; border-radius:var(--r); background:var(--surface); border:none; }
.feed-Gallery .post-card-thumb,.feed-gallery .post-card-thumb { position:absolute; inset:0; width:100%; height:100%; margin:0; border-radius:0; }
.feed-Gallery .post-card-thumb img,.feed-gallery .post-card-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .35s; }
.feed-Gallery .post-card:hover .post-card-thumb img,.feed-gallery .post-card:hover .post-card-thumb img { transform:scale(1.1); }
.feed-Gallery .post-card-body,.feed-gallery .post-card-body { position:absolute; bottom:0; left:0; right:0; padding:28px 12px 10px; background:linear-gradient(to top,rgba(0,0,0,.8),transparent); }
.feed-Gallery .post-card-excerpt,.feed-gallery .post-card-excerpt { display:none; }

.post-card-body { padding:14px 16px; flex:1; display:flex; flex-direction:column; gap:5px; }
.post-card-tag { font-family:var(--fp); font-size:.65rem; color:var(--purple-l); }
.post-card-tag a { color:inherit; }
.post-card-tag a:hover { color:var(--green); }
.post-card-title { font-size:.9rem; font-weight:600; color:var(--text); line-height:1.4; }
.post-card-title a { color:inherit; }
.post-card-title a:hover { color:var(--purple-l); }
.post-card-excerpt { font-size:.78rem; color:var(--muted); line-height:1.55; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.post-card-meta { font-family:var(--fp); font-size:.65rem; color:var(--dimmed); margin-top:auto; }

/* ── 페이지네이션 ── */
.pagination { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:24px; flex-wrap:wrap; font-family:var(--fp); font-size:.78rem; }
.paging-btn,.paging-num { min-width:34px; height:34px; display:flex; align-items:center; justify-content:center; border:1px solid var(--border); border-radius:var(--r); color:var(--muted); transition:all var(--t); padding:0 10px; }
.paging-btn:hover,.paging-num:hover { border-color:var(--border2); color:var(--purple-l); }
.paging-num.current { border-color:var(--purple); color:var(--purple-l); background:var(--purple-dim); }
.paging-btn.disabled { opacity:.3; pointer-events:none; }

/* ════════════════════════════
   단일 게시글 — 박스 없음
════════════════════════════ */
.post-full { background:transparent; border:none; overflow:visible; }
.post-full-header { padding:0 0 24px; border-bottom:1px solid var(--border); margin-bottom:28px; }
.post-full-tag { font-family:var(--fp); font-size:.68rem; color:var(--purple-l); margin-bottom:10px; }
.post-full-tag a { color:inherit; }
.post-full-tag a:hover { color:var(--green); }
.post-full-title { font-size:1.6rem; font-weight:800; color:var(--text); line-height:1.35; margin-bottom:14px; letter-spacing:-.02em; }
.post-full-meta { font-family:var(--fp); font-size:.72rem; color:var(--dimmed); display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.post-full-meta .sep { color:var(--border); }
.post-full-meta a { color:var(--purple-l); }
.post-full-meta a:hover { color:var(--green); }
.post-full-image { width:100%; max-height:440px; object-fit:cover; border-radius:var(--r); margin-bottom:28px; }
.post-full-content { padding:0; }

/* 본문 */
.gh-content h2,.gh-content h3,.gh-content h4 { font-family:var(--fp); color:var(--text); margin:2em 0 .6em; line-height:1.35; font-weight:700; }
.gh-content h2 { font-size:1.2rem; border-left:3px solid var(--purple); padding-left:12px; }
.gh-content h3 { font-size:1.02rem; color:var(--purple-l); }
.gh-content h4 { font-size:.92rem; color:var(--muted); }
.gh-content p { margin-bottom:1.1em; font-size:.93rem; }
.gh-content a { color:var(--purple-l); border-bottom:1px dotted var(--border2); }
.gh-content a:hover { color:var(--green); border-bottom-color:var(--green); }
.gh-content strong { color:var(--text); font-weight:700; }
.gh-content ul,.gh-content ol { padding-left:1.5em; margin-bottom:1.1em; font-size:.93rem; }
.gh-content li { margin-bottom:.3em; }
.gh-content blockquote { border-left:3px solid var(--purple); margin:1.5em 0; padding:.7em 1.2em; background:var(--purple-dim); color:var(--muted); font-style:italic; border-radius:0 var(--r) var(--r) 0; }
.gh-content hr { border:none; border-top:1px solid var(--border2); margin:2em 0; }
.gh-content code { font-family:var(--fm); font-size:.84em; background:rgba(108,54,153,.12); color:var(--purple-l); padding:2px 6px; border-radius:3px; border:1px solid var(--border2); }
.gh-content pre { background:#130e1a; border:1px solid var(--border2); border-left:3px solid var(--purple); border-radius:var(--r); padding:18px 20px; overflow-x:auto; margin:1.4em 0; font-family:var(--fm); font-size:.82rem; line-height:1.6; }
.gh-content pre code { background:none; border:none; padding:0; color:var(--text); }
.gh-content table { width:100%; border-collapse:collapse; margin:1.4em 0; font-size:.85rem; }
.gh-content th { background:var(--surface); color:var(--purple-l); font-family:var(--fp); font-weight:600; padding:8px 12px; border:1px solid var(--border); text-align:left; }
.gh-content td { padding:8px 12px; border:1px solid var(--border); vertical-align:top; }
.gh-content tr:nth-child(even) td { background:rgba(108,54,153,.04); }
.gh-content figure { margin:1.5em 0; }
.gh-content figure img { border-radius:var(--r); border:1px solid var(--border); width:100%; }
.gh-content figcaption { text-align:center; font-size:.73rem; color:var(--dimmed); margin-top:6px; font-family:var(--fp); }
.gh-content .kg-width-wide { margin-left:calc(50% - 50vw + 3rem); margin-right:calc(50% - 50vw + 3rem); max-width:none; }
.gh-content .kg-width-full { margin-left:calc(50% - 50vw); margin-right:calc(50% - 50vw); max-width:none; }
.gh-content .kg-image-card img { width:100%; border-radius:var(--r); }
.gh-content .kg-gallery-container { display:flex; flex-direction:column; gap:8px; }
.gh-content .kg-gallery-row { display:flex; gap:8px; }
.gh-content .kg-gallery-image { flex:1; }
.gh-content .kg-gallery-image img { width:100%; height:100%; object-fit:cover; border-radius:var(--r); }
.gh-content .kg-embed-card { display:flex; justify-content:center; }
.gh-content .kg-bookmark-card { border:1px solid var(--border2); border-radius:var(--r); overflow:hidden; background:var(--bg2); margin:1.4em 0; }
.gh-content .kg-bookmark-container { display:flex; color:var(--text); }
.gh-content .kg-bookmark-content { padding:14px; flex:1; }
.gh-content .kg-bookmark-title { font-weight:700; color:var(--text); margin-bottom:4px; }
.gh-content .kg-bookmark-description { font-size:.8rem; color:var(--muted); }
.gh-content .kg-bookmark-thumbnail { width:140px; flex-shrink:0; }
.gh-content .kg-bookmark-thumbnail img { width:100%; height:100%; object-fit:cover; }
.gh-content .kg-callout-card { display:flex; gap:12px; padding:16px; background:var(--purple-dim); border-left:3px solid var(--purple); border-radius:0 var(--r) var(--r) 0; margin:1.4em 0; }

/* 이전/다음 글 */
.post-nav { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:32px; padding-top:24px; border-top:1px solid var(--border); }
.post-nav-item { background:var(--bg2); border:1px solid var(--border); border-radius:var(--r); padding:14px 16px; transition:border-color var(--t); }
.post-nav-item:hover { border-color:var(--border2); }
.post-nav-label { font-family:var(--fp); font-size:.63rem; font-weight:600; color:var(--purple-l); text-transform:uppercase; letter-spacing:.08em; margin-bottom:4px; }
.post-nav-title { font-size:.8rem; color:var(--text); font-weight:600; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.post-nav-item.next { text-align:right; }

/* ── 태그 페이지 ── */
.tag-header { background:var(--bg2); border:1px solid var(--border2); border-radius:var(--r); padding:22px 26px; margin-bottom:18px; background-image:radial-gradient(ellipse 50% 80% at 100% 50%,rgba(108,54,153,.1) 0%,transparent 70%); }
.tag-header-name { font-family:var(--fp); font-size:1.25rem; font-weight:700; color:var(--text); margin-bottom:6px; }
.tag-header-name::before { content:'# '; color:var(--purple-l); }
.tag-header-count { font-family:var(--fp); font-size:.7rem; color:var(--dimmed); }

/* ── 404 ── */
.error-page { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:60vh; text-align:center; gap:14px; }
.error-code { font-family:var(--fp); font-size:5rem; font-weight:800; color:var(--purple-l); letter-spacing:-.04em; }
.error-msg { font-family:var(--fp); font-size:.9rem; color:var(--muted); }
.error-page a { font-family:var(--fp); font-size:.8rem; border:1px solid var(--border2); color:var(--purple-l); padding:8px 20px; border-radius:var(--r); margin-top:8px; transition:all var(--t); }
.error-page a:hover { background:var(--purple-dim); }

/* ── 푸터 ── */
.site-footer { background:var(--bg2); border-top:1px solid var(--border); padding:22px 20px; }
.footer-inner { max-width:1160px; margin:0 auto; display:flex; flex-direction:column; align-items:center; gap:12px; }
.footer-copy { font-family:var(--fp); font-size:.68rem; color:var(--dimmed); text-align:center; }
.footer-copy a { color:var(--purple-l); }
.footer-copy a:hover { color:var(--green); }
.footer-site-links { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.footer-site-links a { font-family:var(--fp); font-size:.7rem; color:var(--dimmed); transition:color var(--t); }
.footer-site-links a:hover { color:var(--purple-l); }
.footer-sns-links { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.footer-sns-links a { display:flex; align-items:center; gap:5px; padding:5px 12px; border:1px solid var(--border); border-radius:999px; color:var(--muted); font-family:var(--fp); font-size:.7rem; font-weight:500; transition:all var(--t); }
.footer-sns-links a:hover { border-color:var(--border2); color:var(--purple-l); background:var(--purple-dim); }

/* ── 플로팅 버튼 ── */
.floating-btn-wrapper { position:fixed; bottom:28px; right:24px; display:flex; flex-direction:column; gap:10px; z-index:300; }
.floating-btn { width:40px; height:40px; display:flex; align-items:center; justify-content:center; background:var(--bg2); border:1px solid var(--border2); border-radius:50%; color:var(--muted); box-shadow:0 2px 12px var(--shadow); transition:all var(--t); }
.floating-btn:hover { color:var(--purple-l); transform:scale(1.1); }

/* ── 이미지 모달 ── */
.img-detail { display:none; position:fixed; inset:0; z-index:500; }
.img-detail.open { display:flex; align-items:center; justify-content:center; }
.img-detail__dimmed { position:absolute; inset:0; background:rgba(0,0,0,.88); }
.img-detail-modal { position:relative; z-index:1; max-width:90vw; max-height:90vh; background:var(--bg2); border:1px solid var(--border2); border-radius:var(--r-lg); overflow:hidden; }
.img-detail-modal__header { display:flex; justify-content:flex-end; padding:8px 10px; border-bottom:1px solid var(--border); }
.img-detail-modal__body img { max-height:calc(90vh - 48px); object-fit:contain; }
.close-btn { color:var(--dimmed); transition:color var(--t); }
.close-btn:hover { color:var(--purple-l); }

/* ── 반응형 ── */
@media (max-width:1024px) {
  .site-body { grid-template-columns:1fr; }
  .site-sidebar { position:fixed; top:0; right:-320px; bottom:0; z-index:400; width:300px; max-height:100vh; background:var(--bg2); border-left:1px solid var(--border); transition:right .3s ease; overflow-y:auto; }
  .site-sidebar.open { right:0; box-shadow:-4px 0 24px var(--shadow); }
  .sidebar-backdrop { display:block; position:fixed; inset:0; z-index:399; background:rgba(0,0,0,.5); opacity:0; pointer-events:none; transition:opacity .3s; }
  .sidebar-backdrop.show { opacity:1; pointer-events:auto; }
  .sidebar-header { padding:14px 16px 12px; }
  .sidebar-section__title { padding:10px 14px; }
  .sidebar-section__body { padding:8px 14px 12px; }
  .home-card-grid { grid-template-columns:repeat(2,1fr); }
  .feed-Card,.feed-card { grid-template-columns:1fr; }
  .feed-Gallery,.feed-gallery { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:640px) {
  .site-body { padding:14px; }
  .header-inner { padding:0 14px; }
  .nav-label { display:none; }
  .home-card-grid { grid-template-columns:repeat(2,1fr); }
  .home-gallery-grid { grid-template-columns:repeat(2,1fr); }
  .post-full-title { font-size:1.3rem; }
  .post-nav { grid-template-columns:1fr; }
}
