/* 공개 블로그와 관리자 화면의 편집형 디자인 시스템을 정의한다. */
/* 폰트는 @import(직렬 로딩) 대신 <head>의 preconnect+link로 불러온다. app.js layout() 참고. */

:root {
    color-scheme: light;
    --canvas: #fafaf7;
    --paper: #ffffff;
    --ink: #14181f;
    --ink-2: #2b2f38;
    --ink-3: #5a6070;
    --ink-4: #8a8f9c;
    --ink-5: #b5b9c3;
    --hair: #e3e2dc;
    --hair-2: #edece6;
    --tint: #f2f1eb;
    --wp: #1e40af;
    --wp-bg: #eef2fb;
    --naver: #1b7f3a;
    --naver-bg: #ecf5ee;
    --warn: #9a6b0a;
    --warn-bg: #fbf4e2;
    --bad: #9b2c2c;
    --bad-bg: #fbeded;
    --ok: #1e5e3a;
    --ok-bg: #ecf3ee;
    --accent: #8a5a2b;
    --accent-ink: #6f4620;
    --accent-bg: #f6efe4;
    --font-sans: "Pretendard Variable", Pretendard, system-ui, sans-serif;
    /* Newsreader를 앞에 두어 영문·숫자는 Newsreader, 한글은 Noto Serif KR로 폴백되게 한다. */
    --font-serif: "Newsreader", "Noto Serif KR", Georgia, serif;
    --font-serif-en: "Newsreader", Georgia, serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --container: 1120px;
    --reading: 720px;
    --r-sm: 4px;
    --r-md: 6px;
    --r-lg: 8px;
    --shadow-soft: 0 1px 2px rgba(20, 24, 31, 0.04), 0 8px 24px -16px rgba(20, 24, 31, 0.1);
}

/* 다크 모드 자동 전환 제거 — 항상 밝은 크림 컬러 시스템을 사용한다(사장님 요청: 검정색 말고). */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    color: var(--ink-2);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── 액센트 · 모션 ─────────────────────────────────────
   중립 먹색 일변도였던 화면에 딥 오커 액센트 한 색만 얹는다.
   색을 바꾸려면 :root의 --accent 계열 3개만 수정하면 된다. */

/* 본문 링크는 액센트 + 은은한 밑줄. 읽는 흐름을 끊지 않는 두께로. */
.prose a {
    color: var(--accent);
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.prose a:hover {
    color: var(--accent-ink);
    border-bottom-color: var(--accent);
}

/* 목록·카드 제목은 호버 시 밑줄이 좌에서 우로 그려진다. */
.post-row h3 a,
.post-feature__title a {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.2s ease;
}

.post-row h3 a:hover,
.post-feature__title a:hover {
    color: var(--accent-ink);
    background-size: 100% 1px;
}

.post-row h3 a:hover {
    border-bottom: 0;
}

/* 썸네일은 호버 시 아주 살짝 밀어 올린다. */
.post-row__thumb,
.post-feature__thumb {
    overflow: hidden;
}

.post-row__thumb img,
.post-feature__thumb img {
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.post-row:hover .post-row__thumb img,
.post-feature:hover .post-feature__thumb img {
    transform: scale(1.035);
}

/* 내비·푸터 링크에도 같은 액센트를 쓴다. */
.site-nav a:hover,
.site-footer a:hover,
.sidebar-cats a:hover,
.ranking-list a:hover {
    color: var(--accent);
}

.site-nav a.is-active::after {
    background: var(--accent);
}

.tag-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* 진입 시 히어로·첫 글이 순서대로 떠오른다(한 번만, 과하지 않게). */
@keyframes rise-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.hero,
.post-feature,
.home-grid {
    animation: rise-in 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.post-feature { animation-delay: 0.08s; }
.home-grid { animation-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
    .hero,
    .post-feature,
    .home-grid {
        animation: none;
    }

    .post-row__thumb img,
    .post-feature__thumb img,
    .post-row h3 a,
    .post-feature__title a {
        transition: none;
    }
}

button, input, textarea, select {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

h1, h2, h3, h4, p {
    margin-top: 0;
}

h1, h2, h3, h4 {
    color: var(--ink);
    letter-spacing: 0;
    line-height: 1.18;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.reading {
    width: 100%;
    max-width: var(--reading);
    margin: 0 auto;
    padding: 0 24px;
}

.serif {
    font-family: var(--font-serif);
    font-weight: 500;
}

.display {
    font-family: var(--font-serif);
    font-size: 56px;
    font-weight: 500;
    line-height: 1.1;
}

.editorial {
    font-family: var(--font-serif);
    font-size: 44px;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 23px;
    font-weight: 500;
}

.eyebrow {
    color: var(--ink-3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.meta, .muted {
    color: var(--ink-3);
}

.meta {
    font-size: 13px;
}

.date {
    color: var(--ink-3);
    font-family: var(--font-serif-en);
    font-size: 13px;
    font-style: italic;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--canvas) 88%, transparent);
    border-bottom: 1px solid var(--hair);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-header__brand {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.1;
}

.site-header__brand .mark {
    color: var(--ink);
    font-family: var(--font-serif-en);
    font-size: 18px;
    font-style: italic;
    font-weight: 500;
    white-space: nowrap;
}

.site-header__brand .sub {
    margin-top: 2px;
    color: var(--ink-4);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    overflow-x: auto;
}

.site-nav__auth {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    padding-left: 16px;
    border-left: 1px solid var(--hair);
}

.site-nav a {
    padding: 7px 12px;
    border-radius: var(--r-sm);
    color: var(--ink-2);
    font-size: 14px;
    white-space: nowrap;
}

.site-nav a:hover {
    background: var(--tint);
    color: var(--ink);
}

.site-nav a.is-active {
    color: var(--ink);
    font-weight: 700;
}

.site-nav a.is-active::after {
    content: "";
    display: block;
    height: 2px;
    margin-top: 4px;
    background: var(--ink);
}

.site-nav .login-link {
    color: var(--ink-3);
    font-size: 13px;
}

.site-nav .signup-link {
    border: 1px solid var(--hair);
    background: var(--paper);
    color: var(--ink);
    font-size: 13px;
}

.site-nav .signup-link.is-active::after {
    display: none;
}

.site-main {
    padding: 34px 0 56px;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--hair);
}

.site-footer__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 36px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
}

.site-footer h4 {
    margin-bottom: 10px;
    color: var(--ink-4);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.site-footer a {
    display: block;
    padding: 3px 0;
    color: var(--ink-3);
    font-size: 13px;
}

.site-footer a:hover {
    color: var(--ink);
}

.site-footer .signoff {
    grid-column: 1 / -1;
    padding-top: 22px;
    border-top: 1px solid var(--hair-2);
    color: var(--ink-4);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.panel {
    background: var(--paper);
    border: 1px solid var(--hair);
    border-radius: var(--r-lg);
}

.panel--inset {
    padding: 24px;
}

.hero {
    position: relative;
    padding: 48px 0 36px;
    border-bottom: 1px solid var(--hair);
    margin-bottom: 12px;
}

.hero::before {
    content: "";
    position: absolute;
    top: 48px;
    left: 0;
    width: 36px;
    height: 1px;
    background: var(--ink);
}

.hero__eyebrow {
    color: var(--ink-4);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 18px;
    padding-left: 48px;
}

.hero__title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(32px, 5.2vw, 56px);
    line-height: 1.18;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 20px;
    max-width: 18ch;
    word-break: keep-all;
}

.hero__lede {
    color: var(--ink-2);
    font-size: 16.5px;
    line-height: 1.7;
    max-width: 56ch;
    margin: 0 0 26px;
    word-break: keep-all;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0;
    margin: 0;
    padding: 18px 0 4px;
    border-top: 1px solid var(--hair);
    font-size: 13px;
    color: var(--ink-3);
}

.hero__stats > div {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 18px 6px 0;
    margin-right: 18px;
    border-right: 1px solid var(--hair-2);
}

.hero__stats > div:last-child {
    border-right: 0;
    margin-right: 0;
}

.hero__stats dt {
    color: var(--ink-4);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

.hero__stats dd {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1;
    color: var(--ink-1);
    font-weight: 500;
}

.hero__stats dd span {
    font-family: var(--font-sans, inherit);
    font-size: 12px;
    color: var(--ink-3);
    margin-left: 2px;
    font-weight: 400;
}

@media (max-width: 720px) {
    .hero {
        padding: 36px 0 30px;
    }
    .hero__title {
        max-width: none;
    }
    .hero__stats {
        flex-direction: column;
    }
    .hero__stats > div {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--hair-2);
        margin-right: 0;
        padding: 8px 0;
    }
    .hero__stats > div:last-child {
        border-bottom: 0;
    }
}

.hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 24px;
    padding: 0;
}

.hero__chips:empty {
    display: none;
    margin: 0;
}

.post-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 32px;
    align-items: center;
    margin: 12px 0 8px;
    padding: 28px 0 36px;
    border-bottom: 1px solid var(--hair);
}

.post-feature__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.post-feature__eyebrow {
    color: var(--ink-4);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0;
}

.post-feature__title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(28px, 3.4vw, 38px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.01em;
    color: var(--ink);
    word-break: keep-all;
}

.post-feature__title a:hover {
    border-bottom: 1px solid var(--ink);
}

.post-feature__excerpt {
    margin: 0;
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1.7;
    word-break: keep-all;
}

.post-feature__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.post-feature__thumb {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--tint);
}

.post-feature__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: var(--tint);
    transition: transform 0.3s ease;
}

.post-feature__thumb--generated img {
    object-fit: cover;
}

.post-feature__thumb:hover img {
    transform: scale(1.02);
}

@media (max-width: 720px) {
    .post-feature {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px 0 28px;
    }
}

.feature {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: stretch;
    padding: 36px 0 44px;
    border-bottom: 1px solid var(--hair);
}

.feature > *, .layout-two > *, .post-row > * {
    min-width: 0;
}

.feature__img, .image-tile {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--tint);
    border-radius: var(--r-md);
    color: color-mix(in srgb, var(--ink) 55%, transparent);
    font-family: var(--font-serif);
}

.feature__img {
    min-height: 300px;
    aspect-ratio: 4 / 3;
}

.feature__img::after, .image-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 30%, color-mix(in srgb, var(--ink) 14%, transparent), transparent 55%),
        radial-gradient(ellipse at 80% 80%, color-mix(in srgb, var(--ink) 10%, transparent), transparent 60%);
}

.feature__body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 8px 0;
}

.layout-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 44px;
    align-items: start;
}

.layout-two.admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 36px;
}

@media (max-width: 860px) {
    .layout-two.admin-shell {
        grid-template-columns: 1fr;
    }
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 48px 0 18px;
    padding-top: 10px;
    border-top: 1px solid var(--ink);
}

.section-head h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 500;
}

.section-head .more {
    color: var(--ink-3);
    font-size: 12.5px;
}

.post-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 156px;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--hair);
}

.post-row:last-child {
    border-bottom: 0;
}

.post-row__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
}

.post-row h3 {
    margin-bottom: 9px;
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 500;
}

/* 제목 호버 밑줄은 상단 액센트 블록의 그라데이션 드로잉으로 처리한다. */

.post-row__thumb {
    display: block;
    position: relative;
    min-height: 116px;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-md);
    overflow: hidden;
    background-color: var(--tint);
    transition: transform 0.2s ease;
}

.post-row__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: var(--tint);
}

.post-row__thumb--generated img {
    object-fit: cover;
}

/* 확대는 컨테이너 대신 내부 이미지에만 준다(액센트 블록). 겹쳐서 흔들리는 것을 막는다. */

/* 글 안에 끼워 넣는 지도 등 자체 완결형 임베드. 읽기폭을 넘어 살짝 넓게 둔다. */
.prose .map-embed {
    margin: 2.2em 0;
    border: 1px solid var(--hair);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--tint);
}

.prose .map-embed iframe {
    display: block;
    width: 100%;
    height: min(78vh, 700px);
    border: 0;
}

.prose .map-embed__note {
    margin: 0;
    padding: 9px 14px;
    border-top: 1px solid var(--hair);
    background: var(--paper);
    color: var(--ink-3);
    font-size: 12.5px;
}

@media (max-width: 640px) {
    .prose .map-embed iframe {
        height: 68vh;
    }
}

/* ── 목록 위계 ─────────────────────────────────────
   홈 최신 목록에서 앞 2편은 크게, 나머지는 컴팩트 행으로. 같은 크기 반복을 깬다. */
.post-row--lead {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 32px;
    padding: 30px 0;
}

.post-row--lead h3 {
    font-size: 27px;
    line-height: 1.25;
}

.post-row--compact {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 18px;
    padding: 14px 0;
    align-items: center;
}

.post-row--compact h3 {
    margin-bottom: 0;
    font-size: 17.5px;
    line-height: 1.4;
}

.post-row--compact .post-row__meta {
    margin-bottom: 5px;
}

.post-row--compact .post-row__thumb {
    min-height: 0;
    aspect-ratio: 1 / 1;
}

.post-row__thumb--gradient::after,
.post-row__thumb--generated::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 25%, rgba(255, 255, 255, 0.18), transparent 55%),
        radial-gradient(ellipse at 75% 80%, rgba(0, 0, 0, 0.10), transparent 60%);
    border-radius: inherit;
    pointer-events: none;
}

.post-row__views {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--ink-4);
}

.article-views {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--ink-4);
    margin-left: auto;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border: 1px solid var(--hair);
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 13px;
    transition: background 0.15s;
}

.tag-chip:hover {
    background: var(--ink-bg, #f5f3ee);
    color: var(--ink);
}

.tag-chip--small {
    padding: 2px 9px;
    font-size: 12px;
}

.tag-chip__count {
    font-size: 11px;
    color: var(--ink-4);
}

.comment-section {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--hair);
}

.comment-section .section-title {
    margin-bottom: 18px;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 22px 0;
}

.comment {
    padding: 14px 0;
    border-bottom: 1px solid var(--hair-2);
}

.comment:last-child {
    border-bottom: 0;
}

.comment__head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.comment__name {
    font-weight: 600;
    color: var(--ink-1);
    font-size: 14px;
}

.comment__date {
    color: var(--ink-4);
    font-size: 11px;
}

.comment__body {
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--hair);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.55;
    resize: vertical;
}

.comment-form button {
    align-self: flex-start;
}

.post-mini {
    padding: 14px 0;
    border-bottom: 1px solid var(--hair-2);
}

.post-mini:last-child {
    border-bottom: 0;
}

.post-mini strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-family: var(--font-serif);
    font-weight: 500;
}

.excerpt {
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.7;
}

.excerpt--sm {
    color: var(--ink-3);
    font-size: 13.5px;
    line-height: 1.65;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stack {
    display: grid;
    gap: 14px;
}

.card-line {
    padding: 24px 0;
    border-bottom: 1px solid var(--hair);
}

.card-line:last-child {
    border-bottom: 0;
}

.ad, .ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 92px;
    padding: 28px 16px;
    border: 1px dashed var(--ink-5);
    border-radius: var(--r-sm);
    background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--ink-5) 12%, transparent) 6px 7px);
    color: var(--ink-4);
    font-size: 11.5px;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
}

.source, .badge, .chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.source {
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.source::before, .badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.85;
}

.source--wordpress, .source--wp {
    background: var(--wp-bg);
    color: var(--wp);
}

.source--naver {
    background: var(--naver-bg);
    color: var(--naver);
}

.source--native, .source-- {
    background: var(--tint);
    color: var(--ink-3);
}

.badge {
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}

.badge--ok, .badge--created, .badge--published, .badge--ready {
    background: var(--ok-bg);
    color: var(--ok);
}

.badge--warn, .badge--skipped, .badge--draft {
    background: var(--warn-bg);
    color: var(--warn);
}

.badge--bad, .badge--failed, .badge--missing {
    background: var(--bad-bg);
    color: var(--bad);
}

.badge--info {
    background: var(--wp-bg);
    color: var(--wp);
}

.chip {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--tint);
    color: var(--ink-2);
    font-size: 11.5px;
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    padding: 9px 16px;
    border: 1px solid var(--hair);
    border-radius: var(--r-sm);
    background: var(--paper);
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
}

.btn:hover {
    border-color: var(--ink-4);
    color: var(--ink);
}

.btn--primary, button {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--canvas);
}

.btn--primary:hover, button:hover {
    background: var(--ink-2);
    border-color: var(--ink-2);
    color: var(--canvas);
}

.btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ink-3);
}

.btn--sm {
    padding: 6px 10px;
    font-size: 12.5px;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 9px 14px;
    border-radius: var(--r-sm);
    font-weight: 700;
}

label {
    display: grid;
    gap: 7px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 700;
}

input:not([type="checkbox"]), textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--hair);
    border-radius: var(--r-sm);
    background: var(--paper);
    color: var(--ink-2);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent);
}

.filterbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    padding: 14px;
    margin-bottom: 18px;
    border: 1px solid var(--hair);
    border-radius: var(--r-md);
    background: var(--paper);
}

.filterbar label {
    min-width: 150px;
}

.notice {
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--wp) 25%, var(--hair));
    border-radius: var(--r-sm);
    background: var(--wp-bg);
    color: var(--ink-2);
}

.empty {
    padding: 48px 24px;
    border: 1px dashed var(--hair);
    border-radius: var(--r-md);
    background: color-mix(in srgb, var(--tint) 40%, transparent);
    text-align: center;
}

.empty h3 {
    margin-bottom: 6px;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 500;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--hair);
    border-radius: var(--r-md);
    background: var(--paper);
}

.table, table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper);
    color: var(--ink-2);
    font-size: 13.5px;
}

.table th, .table td, table th, table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--hair);
    text-align: left;
    vertical-align: middle;
}

.table th, table th {
    background: var(--tint);
    color: var(--ink-4);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tr:hover td, table tr:hover td {
    background: color-mix(in srgb, var(--tint) 50%, transparent);
}

.admin-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-tabs {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 5px 12px;
    font-size: 13px;
    border: 1px solid var(--hair);
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
}

.filter-tab.is-active {
    background: var(--ink, #1a1a1a);
    color: #fff;
    border-color: var(--ink, #1a1a1a);
}

.admin-search {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}

.admin-search input[type="search"] {
    padding: 5px 10px;
    font-size: 13px;
    border: 1px solid var(--hair);
    border-radius: 4px;
    min-width: 180px;
}

.admin-pager {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
}

.admin-pager__info {
    font-size: 13px;
    color: var(--muted, #777);
}

.btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.preview-banner {
    background: #fff7e6;
    border: 1px solid #f0c36d;
    color: #7a5a00;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.site-nav__user-role {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    font-size: 11px;
    border-radius: 999px;
    background: var(--ink, #1a1a1a);
    color: #fff;
    vertical-align: middle;
}

.admin-user {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--hair);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.admin-user__name {
    font-weight: 600;
    font-size: 14px;
}

.admin-user__role {
    font-size: 11px;
    color: #fff;
    background: var(--ink, #1a1a1a);
    border-radius: 999px;
    padding: 1px 8px;
    align-self: flex-start;
}

.admin-nav__group {
    display: block;
    margin: 16px 0 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-4, #999);
}

.admin-nav__group:first-child {
    margin-top: 0;
}

/* 풍성한 푸터: 3컬럼 + 하단 카피라이트 바 */
.site-footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
}

.site-footer__col a {
    display: inline;
    padding: 0;
}

.site-footer__bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px 24px 40px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--hair-2);
    color: var(--ink-4);
    font-size: 12px;
}

.llm-mode {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.llm-models-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.seo-ok { color: #1a7f37; }
.seo-warn { color: #9a6700; }
.seo-bad { color: #c0392b; font-weight: 600; }

.settings-advanced {
    margin-top: 20px;
}

.settings-advanced > summary {
    cursor: pointer;
    font-weight: 600;
    padding: 8px 0;
    color: var(--ink-3);
}

td.actions {
    white-space: nowrap;
}

td.actions .btn {
    padding: 4px 10px;
    font-size: 12px;
    margin-right: 4px;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 4px 0 0;
}

.inline-form select,
.inline-form input,
.inline-form textarea {
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid var(--hair);
    border-radius: 4px;
}

.inline-form textarea {
    min-width: 280px;
    min-height: 32px;
    resize: vertical;
}

.comment-cell {
    max-width: 280px;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 13px;
    color: var(--ink-2);
}

.btn--danger {
    background: transparent;
    color: #b21010;
    border: 1px solid color-mix(in srgb, #b21010 35%, transparent);
}

.btn--danger:hover {
    background: color-mix(in srgb, #b21010 8%, transparent);
}

.post-editor {
    max-width: 820px;
}

.post-editor__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.post-editor input[type="text"],
.post-editor textarea,
.post-editor select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--hair);
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
}

.post-editor__content {
    min-height: 320px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
}

.post-editor__actions {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--hair);
}

.ai-label {
    position: relative;
}

.ai-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ai-row > input,
.ai-row > textarea {
    flex: 1;
    min-width: 0;
}

.ai-btn {
    flex-shrink: 0;
    white-space: nowrap;
    position: relative;
}

.ai-btn[disabled],
.ai-btn.is-loading {
    cursor: progress;
    opacity: 0.7;
}

.ai-btn.is-loading::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: ai-spin 0.7s linear infinite;
}

@keyframes ai-spin {
    to { transform: rotate(360deg); }
}

.ai-btn--refine {
    align-self: flex-start;
    margin-top: 0;
}

.ai-status {
    display: block;
    margin-top: 4px;
    color: var(--ink-4);
    font-size: 12px;
    font-weight: 400;
    min-height: 14px;
}

.ai-status.is-busy {
    color: var(--ink-3);
}

.ai-status.is-busy::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: ai-spin 0.7s linear infinite;
}

.ai-status.is-ok::before {
    content: "✓ ";
    color: var(--ok);
    font-weight: 600;
}

.ai-status.is-error {
    color: var(--bad);
}

.ai-status.is-error::before {
    content: "✗ ";
    font-weight: 600;
}

.ai-status:empty {
    display: none;
}

.ai-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--r-md);
    background: var(--paper);
    border: 1px solid var(--hair);
    box-shadow: var(--shadow-soft);
    font-size: 13px;
    color: var(--ink-2);
    max-width: 320px;
}

.ai-toast::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid var(--ink-3);
    border-right-color: transparent;
    border-radius: 50%;
    animation: ai-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.ai-toast.is-ok {
    border-color: var(--ok);
    color: var(--ok);
}

.ai-toast.is-ok::before {
    content: "✓";
    border: 0;
    animation: none;
    font-weight: 700;
    font-size: 14px;
}

.ai-toast.is-error {
    border-color: var(--bad);
    color: var(--bad);
}

.ai-toast.is-error::before {
    content: "✗";
    border: 0;
    animation: none;
    font-weight: 700;
    font-size: 14px;
}

.ai-refine-panel {
    margin-top: 8px;
    padding: 12px;
    border: 1px dashed var(--hair);
    border-radius: var(--r-md);
    background: var(--tint);
}

.ai-refine-preview {
    width: 100%;
    margin: 8px 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.ai-refine-actions {
    display: flex;
    gap: 8px;
}

.ai-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ai-tag-chips .tag-chip {
    cursor: pointer;
    background: var(--paper);
    border-style: dashed;
    font-weight: 500;
}

.ai-tag-chips .tag-chip:hover {
    background: var(--ink);
    color: var(--canvas);
    border-style: solid;
    border-color: var(--ink);
}

.llm-card .llm-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 12px 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--hair);
    border-radius: var(--r-md);
    background: var(--tint);
    font-size: 12.5px;
}

.llm-card .llm-status > div {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin-right: 22px;
    padding-right: 22px;
    border-right: 1px solid var(--hair-2);
}

.llm-card .llm-status > div:last-child {
    border-right: 0;
    margin-right: 0;
}

.llm-card .llm-status dt {
    color: var(--ink-4);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

.llm-card .llm-status dd {
    margin: 0;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    word-break: break-all;
}

.llm-test-result {
    font-size: 12.5px;
    margin-left: 8px;
}

.llm-test-result.is-busy {
    color: var(--ink-3);
}

.llm-test-result.is-busy::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: ai-spin 0.7s linear infinite;
}

.llm-test-result.is-error {
    color: var(--bad);
}

.llm-test-result.is-ok {
    color: var(--ok);
}

.categorize-progress {
    margin-bottom: 22px;
    border-left: 3px solid var(--ink);
}

.categorize-progress__head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.categorize-progress__head .eyebrow {
    margin: 0;
}

.categorize-progress__bar {
    height: 6px;
    background: var(--tint);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.categorize-progress__fill {
    display: block;
    height: 100%;
    background: var(--ink);
    transition: width 0.4s ease;
}

.categorize-progress__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 10px;
    font-size: 12.5px;
}

.categorize-progress__stats > div {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin-right: 22px;
    padding-right: 22px;
    border-right: 1px solid var(--hair-2);
}

.categorize-progress__stats > div:last-child {
    border-right: 0;
    margin-right: 0;
}

.categorize-progress__stats dt {
    color: var(--ink-4);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

.categorize-progress__stats dd {
    margin: 0;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.categorize-progress__msg {
    margin: 0 0 12px;
    font-size: 12.5px;
    word-break: break-all;
}

.daily-prompts {
    margin: 22px 0 4px;
    border-left: 3px solid var(--ink);
}

.daily-prompts__list {
    list-style: none;
    padding: 0;
    margin: 12px 0 8px;
}

.daily-prompts__list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--hair-2);
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.45;
}

.daily-prompts__list li:last-child {
    border-bottom: 0;
}

.daily-prompts__list a {
    color: var(--ink);
}

.daily-prompts__list a:hover {
    border-bottom: 1px solid var(--ink);
}

.dashboard-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 22px;
}

@media (max-width: 760px) {
    .dashboard-rows {
        grid-template-columns: 1fr;
    }
}

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

.dashboard-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--hair-2);
    font-size: 13.5px;
    line-height: 1.55;
}

.dashboard-list li:last-child {
    border-bottom: 0;
}

.prose {
    color: var(--ink-2);
    font-size: 17.5px;
    font-weight: 400;
    line-height: 1.85;
    word-break: keep-all;
}

.prose p {
    margin: 0 0 1.4em;
}

.prose h2 {
    margin: 2.2em 0 0.8em;
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 600;
}

.prose h3 {
    margin: 1.8em 0 0.6em;
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
}

.prose blockquote {
    margin: 1.8em 0;
    padding: 4px 0 4px 22px;
    border-left: 2px solid var(--ink);
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 19px;
    font-style: italic;
    line-height: 1.6;
}

.prose a {
    border-bottom: 1px solid var(--ink-4);
}

.prose img {
    height: auto;
    margin: 2em auto;
    border-radius: var(--r-md);
}

.prose > p:first-of-type::first-letter {
    float: left;
    padding: 4px 10px 0 0;
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 4.2em;
    font-weight: 600;
    line-height: 0.92;
}

.display, .editorial, .section-title, .post-row h3, .feature__body .excerpt {
    overflow-wrap: anywhere;
    word-break: normal;
}

.article-head {
    padding: 30px 0 28px;
    border-bottom: 1px solid var(--hair);
    margin-bottom: 34px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

.auth-card {
    width: min(100%, 520px);
    margin: 20px auto 0;
}

.auth-card p, .site-footer p {
    overflow-wrap: anywhere;
}

.auth-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--hair);
}

.auth-register {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--hair);
}

.auth-register > summary {
    cursor: pointer;
    color: var(--ink-3);
    font-size: 13px;
    letter-spacing: 0.02em;
    list-style: none;
    padding: 4px 0;
}

.auth-register > summary::-webkit-details-marker {
    display: none;
}

.auth-register[open] > summary {
    color: var(--ink-1);
    margin-bottom: 10px;
}

.auth-register form {
    margin-top: 10px;
}

.site-footer__ops {
    align-self: start;
}

.site-footer__admin {
    opacity: 0.65;
    font-size: 12px;
}

.site-footer__admin:hover {
    opacity: 1;
}

.admin {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.admin__side {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    align-self: start;
    padding: 20px 16px;
    border-right: 1px solid var(--hair);
    background: var(--paper);
}

.admin__side .brand {
    display: flex;
    flex-direction: column;
    padding: 6px 8px 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--hair);
}

.admin__side .brand .name {
    color: var(--ink);
    font-family: var(--font-serif-en);
    font-size: 15px;
    font-style: italic;
}

.admin__side .brand .sub {
    margin-top: 2px;
    color: var(--ink-4);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.admin__side h5 {
    margin: 18px 8px 6px;
    color: var(--ink-4);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.admin__nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.admin__nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: var(--r-sm);
    color: var(--ink-2);
    font-size: 13px;
}

.admin__nav a:hover {
    background: var(--tint);
}

.admin__nav a.is-active {
    background: var(--ink);
    color: var(--canvas);
    font-weight: 600;
}

.admin__main {
    min-width: 0;
    padding: 24px 32px 64px;
}

.admin__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--hair);
}

.admin__bar h1 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 500;
}

.admin__bar .crumb {
    margin-bottom: 4px;
    color: var(--ink-4);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tile, .metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--hair);
    border-radius: var(--r-md);
    background: var(--paper);
}

.tile__label, .metric span {
    color: var(--ink-3);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.tile__value, .metric strong {
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.1;
}

@media (max-width: 900px) {
    .display {
        font-size: 42px;
    }

    .editorial {
        font-size: 36px;
    }

    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .site-nav {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-left: 0;
    }

    .site-nav__auth {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }

    .feature, .layout-two {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .post-row {
        grid-template-columns: 1fr;
    }

    .post-row__thumb {
        min-height: 140px;
    }

    /* 컴팩트 행은 모바일에서도 작은 옆 썸네일을 유지해 목록 위계를 지킨다. */
    .post-row--compact {
        grid-template-columns: minmax(0, 1fr) 76px;
        gap: 14px;
    }

    .post-row--compact .post-row__thumb {
        min-height: 0;
    }

    .post-row--lead h3 {
        font-size: 23px;
    }

    .site-footer__inner {
        grid-template-columns: 1fr 1fr;
    }

    .admin {
        grid-template-columns: 1fr;
    }

    .admin__side {
        position: relative;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--hair);
    }

    .admin__main {
        padding: 16px;
    }
}

@media (max-width: 640px) {
    .container, .reading {
        padding: 0 18px;
    }

    .display {
        font-size: 31px;
    }

    .editorial {
        font-size: 32px;
    }

    .site-nav {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .site-nav__auth {
        width: 100%;
    }

    .site-nav a {
        padding: 6px 10px;
    }

    .auth-switch {
        align-items: stretch;
    }

    .auth-switch .btn {
        width: 100%;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .site-footer .signoff {
        flex-direction: column;
    }
}

/* Home + archive sidebar grids */
.home-grid,
.archive-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
    margin-top: 28px;
}

.home-grid__aside,
.archive-grid__aside {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

@media (max-width: 860px) {
    .home-grid,
    .archive-grid {
        grid-template-columns: 1fr;
    }
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: rank;
}

.ranking-list li {
    counter-increment: rank;
    padding: 10px 0 10px 28px;
    border-bottom: 1px solid var(--hair-2);
    position: relative;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.ranking-list li:last-child {
    border-bottom: 0;
}

.ranking-list li::before {
    content: counter(rank);
    position: absolute;
    left: 0;
    color: var(--ink-4);
    font-size: 12px;
    font-weight: 700;
}

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

.sidebar-cats li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--hair-2);
    font-size: 14px;
}

.sidebar-cats li:last-child {
    border-bottom: 0;
}

.sidebar-cats a {
    font-weight: 500;
    color: var(--ink-2);
}

.sidebar-cats a:hover {
    color: var(--ink);
}

.sidebar-cats .muted {
    font-size: 12px;
}

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

.recent-comments li {
    padding: 10px 0;
    border-bottom: 1px solid var(--hair-2);
    font-size: 13px;
    line-height: 1.55;
}

.recent-comments li:last-child {
    border-bottom: 0;
}

.recent-comments p {
    margin: 4px 0 0;
    color: var(--ink-3);
}

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

.year-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--hair-2);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
}

.year-list li:last-child {
    border-bottom: 0;
}

.year-list a {
    font-weight: 600;
}

.post-row__pin {
    background: color-mix(in srgb, #e0a800 14%, transparent);
    color: #976700;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 11px;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.post-row__comments {
    font-size: 11px;
    color: var(--ink-4);
    letter-spacing: 0.06em;
}

/* Article extras */
.article-meta__sep {
    color: var(--ink-4);
    margin: 0 2px;
}

.article-reading-time {
    color: var(--ink-3);
    font-size: 11px;
    letter-spacing: 0.06em;
}

.article-category {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 3px;
    background: var(--tint);
    color: var(--ink-2);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.article-category:hover {
    background: var(--ink);
    color: var(--canvas);
}

.article-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.article-tools .btn {
    padding: 4px 12px;
    font-size: 12.5px;
}

.article-series {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--tint);
    border-radius: 6px;
    font-size: 13.5px;
}

.article-series .eyebrow {
    margin-right: 6px;
}

/* Related posts */
.related-posts {
    margin-top: 48px;
    padding-top: 22px;
    border-top: 1px solid var(--hair);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.related-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--hair);
    border-radius: 6px;
    transition: border-color 0.15s, background 0.15s;
}

.related-card:hover {
    border-color: var(--ink-4);
    background: var(--tint);
}

.related-card__date {
    font-size: 11px;
    color: var(--ink-4);
    letter-spacing: 0.06em;
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin: 28px 0;
}

.pagination__link {
    padding: 6px 12px;
    border: 1px solid var(--hair);
    border-radius: 4px;
    font-size: 13px;
    color: var(--ink-2);
}

.pagination__link:hover {
    border-color: var(--ink-3);
    color: var(--ink);
}

.pagination__link.is-current {
    background: var(--ink);
    color: var(--bg, #fff);
    border-color: var(--ink);
    font-weight: 700;
}

.pagination__link.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination__gap {
    padding: 0 4px;
    color: var(--ink-4);
}

/* Category, series, 404 lists */
.category-list,
.series-list {
    list-style: none;
    padding: 0;
    margin: 22px 0;
}

.category-list li,
.series-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--hair-2);
    font-size: 15px;
}

.category-list li:last-child,
.series-list li:last-child {
    border-bottom: 0;
}

.series-detail {
    list-style: none;
    padding: 0;
    counter-reset: series;
    margin: 24px 0;
}

.series-detail li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hair-2);
}

.series-detail li:last-child {
    border-bottom: 0;
}

.series-order {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ink);
    color: var(--bg, #fff);
    font-size: 12px;
    font-weight: 700;
}

.not-found {
    text-align: center;
    padding: 60px 24px;
}

.not-found__links {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 22px;
}

.not-found__links a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Post hero image (auto-generated thumbnail at top of body) */
.post-hero-image {
    margin: 0 0 28px;
}

.post-hero-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: cover;
    border-radius: var(--r-md);
}

/* Embedded iframes inside posts */
.prose iframe {
    width: 100%;
    max-width: 100%;
    min-height: 480px;
    border: 1px solid var(--hair);
    border-radius: 6px;
    margin: 18px 0;
    display: block;
}

/* Fullscreen reading mode */
.fullscreen-btn {
    padding: 4px 12px;
    font-size: 12.5px;
}

.prose.is-fullscreen {
    background: var(--bg, #fff);
    padding: 48px 8% 64px;
    overflow-y: auto;
    max-width: none;
    height: 100vh;
    box-sizing: border-box;
}

.prose.is-fullscreen iframe {
    min-height: 70vh;
    height: 70vh;
}

.prose:fullscreen {
    background: var(--bg, #fff);
    padding: 48px 8% 64px;
    overflow-y: auto;
}

.prose:-webkit-full-screen {
    background: var(--bg, #fff);
    padding: 48px 8% 64px;
    overflow-y: auto;
}

.prose:fullscreen iframe {
    min-height: 80vh;
    height: 80vh;
}

/* Print styles */
@media print {
    .site-header,
    .site-nav,
    .site-footer,
    .article-tools,
    .comment-section,
    .related-posts,
    .pagination,
    .home-grid__aside,
    .archive-grid__aside {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .site-main {
        max-width: 100%;
    }

    .reading {
        margin: 0;
    }

    .prose {
        font-size: 11.5pt;
        line-height: 1.6;
    }

    .article-head h1 {
        font-size: 18pt;
    }

    .article-meta {
        font-size: 9pt;
        color: #555;
    }

    a {
        color: black;
        text-decoration: none;
    }

    .article-head a[href]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #777;
    }
}

/* ===== 다중 카테고리 칩 + 로그인 헤더 (Commit 1·2) ===== */
.cat-chips {
    border: 1px solid #ddd;
    padding: 10px 12px;
    border-radius: 8px;
    margin: 0;
    background: #fafafa;
}
.cat-chips legend {
    font-size: 0.85em;
    color: #555;
    padding: 0 6px;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 4px 6px 4px 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #ccc;
    font-size: 0.92em;
    cursor: pointer;
}
.cat-chip input[type="checkbox"] {
    margin: 0;
}

.site-nav__user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    padding: 2px 8px;
    border-radius: 999px;
}
.site-nav__user:hover {
    background: rgba(0,0,0,0.05);
}
.site-nav__user-name {
    font-weight: 500;
}
.site-nav__logout-form {
    display: inline-block;
    margin-left: 6px;
}
.site-nav__logout {
    background: none;
    border: 1px solid #ddd;
    color: #555;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85em;
}
.site-nav__logout:hover {
    background: #f0f0f0;
}
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    object-fit: cover;
}
.avatar--initial {
    line-height: 1;
}
.avatar--large {
    width: 64px;
    height: 64px;
    font-size: 28px;
}
.profile-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 16px;
}
