/* 뉴스의창 - 인터넷 신문 스타일 (대한뉴스 템플릿 기반) */

:root {
    --color-primary: #c00;
    --color-primary-dark: #a00;
    --color-nav: #1a5fb4;
    --color-nav-light: #2d7dd2;
    --color-heading: #1a1a1a;
    --color-text: #333;
    --color-muted: #666;
    --color-border: #e0e0e0;
    --color-bg: #fff;
    --color-bg-alt: #f8f8f8;
    --font-sans: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Noto Serif KR', serif;
    --container-max: 1200px;
    --header-height: 56px;
    /* 포털형 기준값: 좌160 / 중앙1200 / 우160 */
    --side-ad-width: 250px;
    --side-ad-top-offset: 24px;
    --side-ad-gap: 22px;
    --layout-max: 1640px;
    --side-ad-breakpoint: 1400px;
    --header-banner-max-w: 250px;
    --header-banner-min-w: 250px;
    --header-banner-max-h: 101px;
    /* 푸터 롤링 스폰서: 가로 250×101 기준 70% */
    --footer-roll-w: calc(250px * 0.7);
    --footer-roll-h: calc(101px * 0.7);
}

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    background: #e8e8e8;
}

/* 최상위: 좌 | 중앙 | 우 (사이드 광고는 데스크톱만) */
.page-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    max-width: var(--layout-max);
    margin: 0 auto;
    padding: 0 12px;
}
.page-center {
    min-width: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
}

/* 좌/우 세로 사이드 광고: 기본 숨김, 데스크톱에서만 표시 */
.side-ad {
    display: none;
}
@media (min-width: 1400px) {
    .page-wrapper {
        grid-template-columns: var(--side-ad-width) 1200px var(--side-ad-width);
        gap: 0 var(--side-ad-gap);
        justify-content: center;
    }
    .side-ad {
        display: block;
        position: sticky;
        top: var(--side-ad-top-offset);
        align-self: start;
        width: var(--side-ad-width);
        flex-shrink: 0;
    }
    .side-ad-stack {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    .side-ad-card {
        width: 100%;
        background: #fff;
        border: 1px solid #e4e4e4;
        border-radius: 8px;
        overflow: hidden;
        box-sizing: border-box;
    }
    /* 광고1 슬롯: 313x144 기준 가로 80%, 세로 70% */
    .side-ad-card--rect {
        width: 250px;
        height: 101px;
        min-height: 101px;
        aspect-ratio: 250 / 101;
    }
    .side-ad-card--tall {
        aspect-ratio: 3 / 4;
        min-height: 180px;
    }
    .side-ad-card--sky {
        height: 400px;
        min-height: 400px;
        max-height: 400px;
    }
    .side-ad-card--short {
        height: 90px;
        min-height: 90px;
        max-height: 90px;
    }
    .side-ad-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        min-height: inherit;
        line-height: 0;
        position: relative;
    }
    .side-ad-card .side-ad-img--stack {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    /* 가로형 광고는 잘림 방지를 위해 contain 적용 */
    .side-ad-card--rect .side-ad-img--stack {
        object-fit: contain;
        background: #fff;
    }
    .side-ad-card .side-ad-img--stack[hidden] {
        display: none !important;
    }
    .side-ad-ph {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 80px;
        padding: 8px;
        font-size: 11px;
        color: #aaa;
        text-align: center;
        line-height: 1.3;
        box-sizing: border-box;
    }
    .side-ad-card.has-ad .side-ad-ph {
        display: none;
    }
}
@media (max-width: 1399px) {
    .side-ad {
        display: none !important;
    }
}

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

a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

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

/* 상단 헤더바 */
.top-header-bar {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 8px 0;
}

.top-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header-date {
    font-size: 12px;
    color: #888;
}

.top-header-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.top-header-links a {
    font-size: 12px;
    color: #888;
}

.top-header-links a:hover {
    color: var(--color-primary);
}

.top-header-sep {
    font-size: 11px;
    color: #ccc;
    margin: 0 2px;
}

/* 헤더: 좌측 광고 | 로고 | 우측 광고 */
.logo-section {
    background: #fff;
    padding: 20px;
    border-top: 1px dotted #ddd;
    border-bottom: 1px dotted #ddd;
}

.logo-section-inner {
    /* 좌 배너 / 중앙 로고 / 우 배너 3분할 고정 */
    display: grid;
    grid-template-columns: minmax(var(--header-banner-min-w), var(--header-banner-max-w)) minmax(340px, 1fr) minmax(var(--header-banner-min-w), var(--header-banner-max-w));
    align-items: center;
    gap: 16px 24px;
    min-height: 88px;
}

/* 좌측 광고(농협) · 우측 광고(충청북도의회) */
.logo-section-inner .ad-logo-left {
    justify-self: start;
}
.logo-section-inner .logo-block {
    justify-self: center;
}
.logo-section-inner .ad-logo-right {
    justify-self: end;
}

.logo-section .ad-slot {
    min-height: 60px;
    background: var(--color-bg-alt);
    border: 1px dashed var(--color-border);
}

.header-partner-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
    min-width: var(--header-banner-min-w);
    width: 250px;
    height: 101px;
    max-width: var(--header-banner-max-w);
    line-height: 0;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    box-sizing: border-box;
}

.logo-section .partner-banner-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: var(--header-banner-max-w);
    max-height: var(--header-banner-max-h);
    object-fit: cover;
    object-position: center;
}

.ad-logo-left,
.ad-logo-right {
    max-width: var(--header-banner-max-w);
}

.logo-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 0;
    width: 250px;
    height: 100px;
    max-width: var(--header-banner-max-w);
}

.logo-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 250px;
    max-height: 100px;
    object-fit: contain;
}

/* 네비게이션 바 */
.header.nav-bar {
    background: var(--color-nav);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    overflow: visible;
}

.nav-mega-host {
    position: relative;
    width: 100%;
}

@media (min-width: 769px) {
    .nav-bar .nav-has-dropdown:hover .nav-dropdown,
    .nav-bar .nav-has-dropdown.is-expanded .nav-dropdown {
        display: none !important;
    }
}

.nav-mega-panel {
    display: none;
}

@media (min-width: 769px) {
    .nav-mega-panel {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        margin-top: -1px;
        padding-top: 1px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid var(--color-border);
        z-index: 150;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.12s ease, visibility 0.12s ease;
    }

    .nav-mega-panel.nav-mega-panel--open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    .nav-mega-panel {
        display: none !important;
    }
}

/* 메가메뉴: 전체 폭·컬럼 간격 compact (1fr 제거로 컬럼 무한 확장 방지) */
.nav-mega-inner {
    padding: 14px 14px 18px;
}

@media (min-width: 769px) {
    /*
     * 헤더 .header-inner.container 와 동일 max-width·가운데 정렬 → 메가메뉴가 별도 박스처럼 오른쪽으로 치우치지 않음.
     * 좌 패딩: header-inner 좌 20px + .nav-menu-btn 좌 16px = 3bar(선) 시작과 첫 컬럼(정치) 시작 정렬.
     */
    .nav-mega-panel .nav-mega-inner.container {
        max-width: var(--container-max);
        padding: 14px 20px 18px calc(20px + 16px);
    }
}

.nav-mega-grid {
    display: grid;
    /* max를 auto: 제목·하위 링크 너비만큼만 차지, 남는 공간으로 컬럼이 늘어나지 않음 */
    grid-template-columns: repeat(auto-fill, minmax(116px, auto));
    gap: 10px 16px;
    align-items: start;
    justify-content: start;
    width: 100%;
}

@media (min-width: 1200px) {
    .nav-mega-grid {
        grid-template-columns: repeat(auto-fill, minmax(108px, auto));
        column-gap: 14px;
        row-gap: 10px;
    }
}

.nav-mega-heading {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.nav-mega-heading a {
    color: var(--color-heading);
    text-decoration: none;
}

.nav-mega-heading a:hover {
    color: var(--color-primary);
}

.nav-mega-panel .nav-mega-heading a.nav-highlight {
    color: var(--color-primary);
}

.nav-mega-subs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-mega-subs li {
    margin: 0 0 6px;
}

.nav-mega-subs a {
    font-size: 13px;
    color: #444;
    text-decoration: none;
    line-height: 1.5;
    display: inline-block;
}

.nav-mega-subs a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.nav-mega-col.is-mega-active {
    background: rgba(33, 150, 243, 0.07);
    border-radius: 6px;
    padding: 6px 8px 10px;
    margin: -6px -8px -10px;
}

.nav-bar .nav-top-item.is-mega-active > a {
    background: rgba(255, 255, 255, 0.22);
}

.nav-bar .header-inner {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: visible;
    padding: 0 20px;
    min-height: 48px;
}

.nav-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-menu-btn span {
    width: 20px;
    height: 2px;
    background: #fff;
}

.nav-bar .nav {
    flex: 1;
    overflow: visible;
}

.nav-bar .nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-bar .nav-list li {
    padding: 0;
    position: relative;
}

.nav-bar .nav-has-dropdown:hover .nav-dropdown {
    display: block;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid var(--color-border);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: 200;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.nav-dropdown li {
    padding: 0;
}

.nav-bar .nav-dropdown a {
    display: block;
    padding: 10px 16px;
    color: #333 !important;
    font-size: 13px;
}

.nav-bar .nav-dropdown a:hover {
    background: var(--color-bg-alt);
    color: var(--color-primary) !important;
}

.nav-bar .nav-list a {
    display: block;
    padding: 14px 16px;
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
}

.nav-bar .nav-list a:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
}

.nav-bar .nav-list a.nav-highlight {
    background: var(--color-nav-light);
}

.nav-bar .nav-list a.nav-highlight:hover {
    background: #3a8de0;
}

.search-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.search-icon-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.search-icon-btn svg {
    flex-shrink: 0;
}

.nav-bar .nav-menu-btn {
    display: flex;
}

/* 메인 */
.main {
    padding: 24px 20px 40px;
    position: relative;
}

/* 헤드라인 섹션 */
.headline-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--color-border);
}

.headline-main a {
    text-decoration: none;
    color: inherit;
}

.headline-main a:hover {
    text-decoration: none;
}

.headline-main h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-heading);
}

.headline-main h2:hover {
    color: var(--color-primary);
}

.headline-main .meta {
    font-size: 13px;
    color: var(--color-muted);
}

.headline-main .category {
    color: var(--color-primary);
    font-weight: 500;
}

.headline-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.headline-list a {
    font-weight: 500;
    color: var(--color-heading);
    display: block;
}

.headline-list a:hover {
    color: var(--color-primary);
}

.headline-list .meta {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 2px;
}

/* 콘텐츠 그리드 */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
}

.content-main {
    min-width: 0;
}

/* 섹션 공통 */
.news-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.section-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
}

.section-title a {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}

.section-title a:hover {
    text-decoration: underline;
}

.section-subcats {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--color-muted);
}

.section-subcats a {
    color: var(--color-muted);
    text-decoration: none;
    cursor: pointer;
}

.section-subcats a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

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

.section-list li {
    padding: 6px 0;
    border-bottom: 1px dotted var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.section-list li:last-child {
    border-bottom: none;
}

.section-list a {
    flex: 1;
    min-width: 0;
    color: var(--color-text);
}

.section-list a:hover {
    color: var(--color-primary);
}

.section-list .date {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--color-muted);
}

/* 첫 번째 기사 강조 (리드) */
.section-list li:first-child a {
    font-weight: 600;
    color: var(--color-heading);
}

/* 2열 섹션 */
.two-col-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* TV 섹션 */
.tv-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px solid var(--color-border);
}

.tv-section .section-title {
    color: var(--color-heading);
}

.tv-section .section-title a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.tv-section .section-title a:hover {
    text-decoration: underline;
}

.tv-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tv-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tv-item a:hover h4 {
    color: var(--color-primary);
}

.tv-thumb {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
    border-radius: 6px;
    margin-bottom: 8px;
}

.tv-item h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-heading);
}

/* 사이드바 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 포토갤러리 하단 후원 안내: 250×100. 좌 ~64% 텍스트, 우 ~38% 실사진(images/nw-donation-refugee-children.jpg). */
.nw-donation-banner-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.nw-donation-test-banner {
    position: relative;
    width: 250px;
    max-width: 100%;
    height: 100px;
    box-sizing: border-box;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 60, 100, 0.1);
    border: 1px solid rgba(70, 120, 170, 0.22);
}

/* 전체 바탕: 단색·은은한 그라데이션만(우측은 사진 레이어가 덮음) */
.nw-donation-test-banner__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(105deg, #f2f6fa 0%, #e8eef5 55%, #dde7f0 100%);
}

/* 우측 38%: 실사진, 선명도 유지(블러 없음). 교체: images/nw-donation-refugee-children.jpg */
.nw-donation-test-banner__photo {
    position: absolute;
    z-index: 1;
    right: 0;
    top: 0;
    width: 38%;
    height: 100%;
    overflow: hidden;
}

.nw-donation-test-banner__photo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 인물이 잘리지 않도록 미세 조정 — 다른 사진으로 바꿀 때 이 값만 손보면 됨 */
    object-position: 48% 42%;
}

.nw-donation-test-banner__inner {
    position: absolute;
    z-index: 2;
    left: 0;
    top: 0;
    box-sizing: border-box;
    width: 64%;
    height: 100%;
    padding: 7px 6px 7px 7px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    /* 경계 딱딱함 완화: 우측으로 갈수록 투명 → 사진과 자연스럽게 합성 */
    background: linear-gradient(
        95deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(250, 252, 255, 0.95) 52%,
        rgba(248, 250, 252, 0.72) 78%,
        rgba(248, 250, 252, 0.18) 92%,
        rgba(255, 255, 255, 0) 100%
    );
    border-right: none;
    box-shadow: none;
}

.nw-donation-test-banner__head {
    margin: 0;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.2;
    color: #0c2135;
    letter-spacing: -0.015em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.nw-donation-test-banner__bank {
    margin: 0;
    font-size: 10px;
    line-height: 1.35;
    color: #1e3d52;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.88);
}

.nw-donation-test-banner__acct {
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.03em;
    color: #063281;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
}

.nw-donation-test-banner__name {
    margin: 0;
    font-size: 10px;
    line-height: 1.2;
    color: #34495e;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.88);
}

@media (max-width: 768px) {
    .nw-donation-banner-slot {
        align-items: center;
    }
    .nw-donation-test-banner {
        width: min(250px, 100%);
        height: auto;
        min-height: 100px;
    }
    .nw-donation-test-banner__photo {
        width: 36%;
    }
    .nw-donation-test-banner__photo-img {
        object-position: 46% 40%;
    }
    .nw-donation-test-banner__inner {
        width: 66%;
        min-height: 100px;
        padding: 8px 8px 8px 9px;
        background: linear-gradient(
            100deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(250, 252, 255, 0.94) 58%,
            rgba(248, 250, 252, 0.45) 85%,
            rgba(255, 255, 255, 0) 100%
        );
    }
}

.side-box {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 16px;
}

.side-title {
    margin: 0 0 12px;
    padding-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
}

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

.side-list li {
    padding: 6px 0;
    border-bottom: 1px dotted var(--color-border);
}

.side-list li:last-child {
    border-bottom: none;
}

.side-list a {
    font-size: 13px;
}

.side-list .nw-sidecard-loading span,
.side-list .nw-sidecard-empty span {
    font-size: 13px;
    color: var(--color-muted);
}

.people-item-inner.nw-sidecard-loading span,
.people-empty-msg {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.5;
}

.people-item--empty {
    padding: 8px 0;
}

.people-item--empty .people-empty-msg {
    margin: 0;
}

/* 이슈포커스 */
.focus-item,
.people-item {
    padding: 10px 0;
    border-bottom: 1px dotted var(--color-border);
}

.focus-item:last-child,
.people-item:last-child {
    border-bottom: none;
}

.focus-item a strong,
.people-item a strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.focus-item p,
.people-item p {
    margin: 0;
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.5;
}

/* 순위 리스트 */
.rank-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: rank;
}

.rank-list li {
    padding: 6px 0 6px 24px;
    position: relative;
    counter-increment: rank;
}

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

.rank-list a {
    font-size: 13px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-list li.nw-most-viewed-empty {
    counter-increment: none;
    padding-left: 0;
    color: var(--color-muted);
    font-size: 13px;
}

.rank-list li.nw-most-viewed-empty::before {
    display: none;
    content: none;
}

/* 포토 */
.photo-thumb {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
    border-radius: 6px;
    margin-bottom: 8px;
}

.photo-item strong {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.photo-item p {
    margin: 0;
    font-size: 12px;
    color: var(--color-muted);
}

/* 푸터 바로 위: 기관/스폰서 롤링 배너 (무한 좌측 흐름) */
.footer-ad-section {
    padding: 28px 0;
    background: #fafafa;
    border-top: 1px solid var(--color-border);
}
.footer-ad-wrap {
    overflow: hidden;
    width: 100%;
    /* 뷰포트: 트랙이 밖으로 나가는 부분은 잘림 — 복제 세트는 초기에 화면 밖(오른쪽)에서 이어짐 */
}
.footer-ad-track {
    display: flex;
    flex-direction: row;
    align-items: center;
    white-space: nowrap;
    width: max-content;
}
/* 무한 롤링: 두 개의 .footer-ad-set(원본/복제)만 자식 — gap은 세트 내부에서만 */
.footer-ad-track.footer-ad-track--marquee {
    gap: 0;
    justify-content: flex-start;
    --footer-marquee-shift: -50%;
    animation: footer-ad-marquee 36s linear infinite;
}
.footer-ad-track.footer-ad-track--marquee:hover {
    animation-play-state: paused;
}
.footer-ad-set {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
/* 1건만 있을 때: 세트/복제 없음 */
.footer-ad-track.footer-ad-track--static {
    animation: none;
    justify-content: center;
    margin: 0 auto;
}
.footer-ad-item {
    flex-shrink: 0;
    padding: 0 6px;
}
.footer-ad-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--footer-roll-w);
    width: var(--footer-roll-w);
    height: var(--footer-roll-h);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.footer-ad-item a:hover {
    border-color: var(--color-nav-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.footer-ad-item img {
    display: block;
    width: var(--footer-roll-w);
    height: var(--footer-roll-h);
    max-width: var(--footer-roll-w);
    max-height: var(--footer-roll-h);
    object-fit: contain;
}
/* 한 바퀴 = 정확히 원본 1세트 너비만큼 이동(JS에서 --footer-marquee-shift 픽셀 설정) */
@keyframes footer-ad-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(var(--footer-marquee-shift, -50%)); }
}
@media (max-width: 768px) {
    .footer-ad-section { padding: 18px 0; }
    .footer-ad-item a {
        min-width: var(--footer-roll-w);
        width: var(--footer-roll-w);
        height: var(--footer-roll-h);
    }
    .footer-ad-item img {
        width: var(--footer-roll-w);
        height: var(--footer-roll-h);
        max-width: var(--footer-roll-w);
        max-height: var(--footer-roll-h);
    }
}
@media (max-width: 480px) {
    .footer-ad-section { padding: 14px 0; }
    .footer-ad-item a {
        min-width: var(--footer-roll-w);
        width: var(--footer-roll-w);
        height: var(--footer-roll-h);
    }
    .footer-ad-item img {
        width: var(--footer-roll-w);
        height: var(--footer-roll-h);
        max-width: var(--footer-roll-w);
        max-height: var(--footer-roll-h);
    }
}

/* 푸터 */
.footer {
    background: #d9d9d9;
    color: #111;
    font-size: 12px;
    margin-top: 40px;
}

.footer-links {
    padding: 16px 0;
    border-bottom: 1px solid #b8b8b8;
}

.footer-links .container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.footer-links a {
    color: #111;
}

.footer-links a:hover {
    color: #000;
}

.footer-info {
    padding: 24px 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.footer-logo-wrap {
    flex: 0 0 auto;
    width: 250px;
}

.footer-company-logo {
    display: block;
    width: 250px;
    height: 100px;
    object-fit: contain;
}

.footer-text-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.footer-brand {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px;
}

.footer-info address {
    font-style: normal;
    line-height: 1.8;
    margin-bottom: 12px;
}

.footer-copyright-notice {
    margin: 0 0 8px;
    color: #222;
}

.copyright {
    margin: 0 0 8px;
    color: #222;
}

.footer-note {
    margin: 0;
    color: #333;
    font-size: 11px;
}

/* 반응형 */
@media (max-width: 992px) {
    .headline-section {
        grid-template-columns: 1fr;
    }

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

    .two-col-sections {
        grid-template-columns: 1fr;
    }

    .tv-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-header-inner {
        flex-wrap: wrap;
        gap: 4px;
    }

    .top-header-date {
        font-size: 11px;
    }

    .top-header-links a {
        font-size: 11px;
    }

    /* 모바일에서는 좌우 헤더 배너를 숨기고 로고만 유지 */
    .logo-section-inner {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .logo-section-inner .ad-logo-left,
    .logo-section-inner .ad-logo-right {
        display: none;
    }

    .nav-bar .header-actions {
        display: none;
    }

    .nav-bar .nav {
        display: none;
    }

    .nav-bar .nav.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-nav);
        padding: 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        z-index: 160;
    }

    .nav-bar .nav.is-open .nav-list {
        flex-direction: column;
    }

    .nav-bar .nav.is-open .nav-list a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-bar .nav-has-dropdown .nav-dropdown {
        display: none;
    }

    .nav-bar .nav-has-dropdown.is-expanded .nav-dropdown {
        display: block;
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 0 20px;
        background: rgba(0,0,0,0.1);
    }

    .nav-bar .nav-has-dropdown.is-expanded .nav-dropdown a {
        color: rgba(255,255,255,0.9);
    }

    .headline-main h2 {
        font-size: 18px;
    }

    .tv-list {
        grid-template-columns: 1fr;
    }

    .footer-info {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        max-height: 56px;
    }
}

/* 전체기사 페이지 */
.top-header-link--active {
    font-weight: 700;
    color: var(--color-nav-light);
}

.all-articles-page {
    padding-top: 20px;
    padding-bottom: 40px;
}

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

@media (max-width: 992px) {
    .aa-layout {
        grid-template-columns: 1fr;
    }
    .aa-side {
        order: -1;
        max-width: 100%;
    }
}

.aa-primary {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px 22px 24px;
}

.aa-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}

.aa-heading {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-heading);
}

.aa-list-search {
    flex: 1 1 200px;
    max-width: min(100%, 320px);
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.aa-count-wrap {
    font-weight: 600;
    color: var(--color-muted);
    font-size: 1rem;
}

.aa-view-toggle {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}

.aa-view-btn {
    width: 40px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: none;
    border-right: 1px solid var(--color-border);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.aa-view-btn:last-child {
    border-right: none;
}

.aa-view-btn:hover {
    background: #f5f5f5;
}

.aa-view-btn.is-active {
    background: var(--color-nav-light);
    color: #fff;
}

.aa-view-icon {
    display: block;
    width: 18px;
    height: 14px;
    position: relative;
}

.aa-view-icon--compact {
    background: linear-gradient(#888 0 2px, transparent 2px 4px, #888 4px 6px, transparent 6px 8px, #888 8px 10px, transparent 10px 100%);
    background-size: 100% 14px;
}

.aa-view-btn.is-active .aa-view-icon--compact {
    background: linear-gradient(#fff 0 2px, transparent 2px 4px, #fff 4px 6px, transparent 6px 8px, #fff 8px 10px, transparent 10px 100%);
    background-size: 100% 14px;
}

.aa-view-icon--list {
    height: 16px;
    background:
        linear-gradient(#888, #888) 0 2px / 3px 3px no-repeat,
        linear-gradient(#888, #888) 0 7px / 3px 3px no-repeat,
        linear-gradient(#888, #888) 0 12px / 3px 3px no-repeat,
        linear-gradient(#888, #888) 0 0 / 14px 2px no-repeat,
        linear-gradient(#888, #888) 0 5px / 14px 2px no-repeat,
        linear-gradient(#888, #888) 0 10px / 14px 2px no-repeat;
    background-position: 0 2px, 0 7px, 0 12px, 5px 2px, 5px 7px, 5px 12px;
}

.aa-view-btn.is-active .aa-view-icon--list {
    background:
        linear-gradient(#fff, #fff) 0 2px / 3px 3px no-repeat,
        linear-gradient(#fff, #fff) 0 7px / 3px 3px no-repeat,
        linear-gradient(#fff, #fff) 0 12px / 3px 3px no-repeat,
        linear-gradient(#fff, #fff) 0 0 / 14px 2px no-repeat,
       linear-gradient(#fff, #fff) 0 5px / 14px 2px no-repeat,
        linear-gradient(#fff, #fff) 0 10px / 14px 2px no-repeat;
    background-position: 0 2px, 0 7px, 0 12px, 5px 2px, 5px 7px, 5px 12px;
}

.aa-view-icon--card {
    width: 16px;
    height: 16px;
    background:
        radial-gradient(circle at 25% 25%, #888 35%, transparent 36%),
        radial-gradient(circle at 75% 25%, #888 35%, transparent 36%),
        radial-gradient(circle at 25% 75%, #888 35%, transparent 36%),
        radial-gradient(circle at 75% 75%, #888 35%, transparent 36%);
}

.aa-view-btn.is-active .aa-view-icon--card {
    background:
        radial-gradient(circle at 25% 25%, #fff 35%, transparent 36%),
        radial-gradient(circle at 75% 25%, #fff 35%, transparent 36%),
        radial-gradient(circle at 25% 75%, #fff 35%, transparent 36%),
        radial-gradient(circle at 75% 75%, #fff 35%, transparent 36%);
}

.aa-group-sep {
    height: 0;
    margin: 14px 0 14px;
    border: 0;
    border-top: 1px solid var(--color-border);
}

.aa-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.aa-row-link {
    text-decoration: none;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.45;
}

.aa-row-link:hover .aa-row-title {
    text-decoration: underline;
}

.aa-row-cat {
    color: var(--color-muted);
    font-size: 14px;
}

.aa-row-title {
    font-weight: 600;
}

.aa-row-meta {
    font-size: 12px;
    color: #888;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .aa-row {
        grid-template-columns: 1fr;
    }
    .aa-row-meta {
        text-align: left;
        white-space: normal;
    }
}

.aa-row-sep {
    margin: 0 4px;
    opacity: 0.6;
}

.aa-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.aa-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.aa-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.aa-card-link:hover .aa-card-title {
    text-decoration: underline;
}

.aa-card-media {
    aspect-ratio: 16 / 10;
    background: #e8e8e8;
    overflow: hidden;
}

.aa-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aa-card-ph {
    width: 100%;
    height: 100%;
    min-height: 120px;
    background: linear-gradient(135deg, #e2e2e2, #f4f4f4);
}

.aa-card-body {
    padding: 12px;
}

.aa-card-cat {
    font-size: 12px;
    color: var(--color-muted);
}

.aa-card-title {
    margin: 6px 0 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.aa-card-meta {
    margin: 0;
    font-size: 11px;
    color: #888;
}

.aa-pager {
    margin-top: 24px;
}

.aa-pager-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.aa-pager-btn,
.aa-pager-num {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 14px;
    background: #fff;
}

.aa-pager-num:hover,
.aa-pager-btn:hover {
    border-color: var(--color-nav-light);
    color: var(--color-nav-light);
}

.aa-pager-num.is-current {
    background: var(--color-nav);
    color: #fff;
    border-color: var(--color-nav);
    font-weight: 600;
}

.aa-loading,
.aa-empty,
.aa-error {
    margin: 24px 0;
    color: var(--color-muted);
}

.aa-error {
    color: #b00020;
}

.aa-side {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 18px 16px 20px;
}

.aa-side-search-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-muted);
}

.aa-side-search {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 18px;
    box-sizing: border-box;
}

.aa-side-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
}

.aa-side-note {
    margin: 0 0 14px;
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.4;
}

.aa-popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
}

.aa-pop-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    line-height: 1.4;
}

.aa-pop-item:last-child {
    border-bottom: none;
}

.aa-pop-rank {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: #eee;
    color: #555;
    border-radius: 2px;
}

.aa-pop-item--top .aa-pop-rank {
    background: var(--color-nav-light);
    color: #fff;
}

.aa-pop-item a {
    color: var(--color-text);
    text-decoration: none;
}

.aa-pop-item a:hover {
    text-decoration: underline;
}

.aa-pop-empty {
    list-style: none;
    padding: 12px 0;
    color: var(--color-muted);
    font-size: 13px;
}

/* index 메인: #nwLatestTop5 가 있으면 정적 샘플 헤드라인 숨김 (F5 직후 옛 블록 깜빡임 방지) */
body:has(#nwLatestTop5) .headline-section {
    display: none !important;
}

/* 최신기사 Top5: 좌측 히어로(롤링) + 우측 고정 리스트 */
.nw-latest-top5 {
    margin-bottom: 28px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--color-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.nw-latest-top5--loading .nw-latest-hero__media {
    animation: nw-latest-shimmer 1.2s ease-in-out infinite;
}

.nw-latest-top5--loading .nw-latest-hero__title {
    animation: nw-latest-shimmer 1.2s ease-in-out infinite;
}

/* After ~500ms wait: skeleton blocks before showing long "loading" copy */
.nw-latest-top5--skeleton .nw-latest-hero__title {
    min-height: 1.35em;
    border-radius: 4px;
    color: transparent;
    background: linear-gradient(
        90deg,
        var(--color-border) 0%,
        rgba(0, 0, 0, 0.05) 50%,
        var(--color-border) 100%
    );
    background-size: 200% 100%;
    animation: nw-skeleton-slide 1.2s ease-in-out infinite;
}

.nw-latest-top5--skeleton .nw-latest-hero__media {
    min-height: 200px;
    border-radius: 8px;
    background: var(--color-border);
    animation: nw-latest-shimmer 1.2s ease-in-out infinite;
}

@keyframes nw-skeleton-slide {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes nw-latest-shimmer {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.72;
    }
}

.nw-latest-top5--empty .nw-latest-hero__meta {
    color: var(--color-muted);
    line-height: 1.5;
}

.nw-headline-retry {
    margin-top: 14px;
}

.nw-headline-retry__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--color-bg, #fff);
    background: var(--color-nav-light, #1a5fb4);
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.nw-headline-retry__btn:hover {
    filter: brightness(1.06);
}

.nw-headline-retry__btn:focus-visible {
    outline: 2px solid var(--color-nav-light, #1a5fb4);
    outline-offset: 2px;
}

.nw-latest-top5__grid {
    display: grid;
    grid-template-columns: minmax(0, 65fr) minmax(240px, 35fr);
    gap: 0;
    align-items: stretch;
    min-height: 320px;
}

.nw-latest-top5__hero {
    padding: 20px 22px 16px;
    border-right: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}

.nw-latest-hero__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.nw-latest-hero__link:hover .nw-latest-hero__title {
    color: var(--color-nav-light);
}

.nw-latest-hero__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 360px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    margin-bottom: 16px;
}

.nw-latest-hero__media.is-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nw-latest-hero__media.is-placeholder::after {
    content: '이미지 준비중';
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.nw-latest-hero__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nw-latest-hero__text {
    padding: 0 2px;
}

.nw-latest-hero__kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    color: var(--color-nav-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nw-latest-hero__title {
    margin: 0 0 12px;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-heading);
}

.nw-latest-hero__meta {
    margin: 0;
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.5;
}

.nw-latest-hero__dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}

.nw-latest-hero__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nw-latest-hero__dot.is-active {
    background: var(--color-nav-light);
    transform: scale(1.15);
}

.nw-latest-top5__aside {
    padding: 18px 18px 16px;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nw-latest-list__heading {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 800;
    color: var(--color-heading);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-nav-light);
    letter-spacing: -0.02em;
}

.nw-latest-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nw-latest-list__item {
    border-bottom: 1px solid var(--color-border);
    padding: 12px 10px 12px 12px;
    margin: 0 -10px 0 -12px;
    border-radius: 6px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.nw-latest-list__item:last-child {
    border-bottom: none;
}

.nw-latest-list__item.is-active {
    background: rgba(37, 99, 235, 0.06);
    border-left: 3px solid var(--color-nav-light);
    padding-left: 9px;
}

.nw-latest-list__link {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--color-heading);
    text-decoration: none;
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nw-latest-list__link:hover {
    color: var(--color-nav-light);
    text-decoration: underline;
}

.nw-latest-list__item-meta {
    display: block;
    font-size: 12px;
    color: var(--color-muted);
}

@media (max-width: 900px) {
    .nw-latest-top5__grid {
        grid-template-columns: 1fr;
    }

    .nw-latest-top5__hero {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .nw-latest-top5__aside {
        padding-top: 16px;
    }

    .nw-latest-list__item.is-active {
        border-left: none;
        padding-left: 10px;
        box-shadow: inset 3px 0 0 var(--color-nav-light);
    }
}

/* 메인 인라인 기사 상세(#nwArticleDetail): 최신기사 롤링과 별도 컨테이너, 본문만 세로 스크롤 */
/* article.html in site shell (main.nw-article-page) */
main.main.nw-article-page {
    padding-top: 8px;
    padding-bottom: 28px;
}
.nw-article-page-breadcrumb {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin: 0 0 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}
.nw-article-page-breadcrumb a {
    color: #2d7dd2;
    text-decoration: none;
}
.nw-article-page-breadcrumb a:hover {
    text-decoration: underline;
}
.nw-article-page-bc-sep {
    color: var(--color-border);
    user-select: none;
}
.nw-article-page-bc-current {
    color: var(--color-text);
    font-weight: 600;
}
.nw-article-page-inner {
    max-width: 100%;
    overflow: visible;
}
main.main.nw-article-page #articleView.nw-article-page__root {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    min-height: 0;
}
main.main.nw-article-page #articleView .nw-article-detail.nw-article-detail--preview {
    overflow: visible;
    max-height: none;
    margin: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}
main.main.nw-article-page #articleView .nw-article-detail--preview .nw-preview-article,
main.main.nw-article-page #articleView .nw-prev-content {
    overflow: visible;
    max-height: none;
}
.nw-article-page .nw-article-load-status {
    color: #555;
    margin: 8px 0 0;
    font-size: 0.95rem;
}
.nw-article-page .nw-article-retry {
    margin-top: 12px;
    padding: 8px 16px;
    border: 1px solid #2d7dd2;
    border-radius: 6px;
    background: #fff;
    color: #2d7dd2;
    cursor: pointer;
    font-size: 1rem;
}
.nw-article-detail {
    margin: 4px 0 28px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    scroll-margin-top: 12px;
}

.nw-article-detail[hidden] {
    display: none !important;
}

.nw-article-detail__chrome {
    display: flex;
    justify-content: flex-end;
    padding: 8px 10px 0;
    flex-shrink: 0;
}

.nw-article-detail__close {
    border: none;
    background: var(--color-bg-alt);
    color: var(--color-heading);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.nw-article-detail__close:hover {
    background: var(--color-border);
}

.nw-article-detail__inner {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(75vh, 820px);
    overflow: hidden;
    padding: 0;
}

.nw-article-detail__inner--plain {
    max-height: min(50vh, 420px);
    overflow-y: auto;
    padding: 16px 20px 20px;
    -webkit-overflow-scrolling: touch;
}

.nw-article-detail__masthead {
    flex-shrink: 0;
    padding: 4px 20px 14px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}

.nw-article-detail__article-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px 24px;
    -webkit-overflow-scrolling: touch;
}

/* Single-column article view (article.html + modal): title → meta → lead → one body flow */
.nw-article-detail--single {
    max-width: 100%;
}
.nw-article-detail__lead {
    margin: 0;
    padding: 0 20px 16px;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}
.nw-article-detail__lead-img {
    display: block;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    height: auto;
    border-radius: 6px;
}
.nw-article-detail__article-body--single {
    padding: 16px 20px 24px;
}
.nw-article-detail__rich {
    line-height: 1.85;
    font-size: 0.9375rem;
    color: var(--color-text);
}
.nw-article-detail__rich p {
    margin: 0 0 14px;
}
.nw-article-detail__rich img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 12px 0;
}

.nw-article-detail__title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    line-height: 1.35;
    margin: 0 0 10px;
    color: var(--color-heading);
}

.nw-article-detail__subtitle {
    font-size: 1rem;
    color: var(--color-muted);
    font-weight: 700;
    margin: 0 0 12px;
    white-space: pre-line;
}

.nw-article-detail__meta {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin: 0 0 4px;
    line-height: 1.5;
}

/* admin articlePreview .nw-prev-meta-bar 와 동일한 메타 배치(카테고리 좌 / 바이라인 우) */
.nw-article-detail__meta--preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 16px;
}

.nw-article-detail__meta-cat {
    font-weight: 600;
    color: var(--color-text);
}

.nw-article-detail__meta-byline {
    flex: 1;
    min-width: 220px;
    text-align: right;
    color: var(--color-muted);
}

.nw-article-detail__article-body p {
    margin: 0 0 14px;
    line-height: 1.85;
    font-size: 0.9375rem;
    color: var(--color-text);
}

.nw-article-detail__img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 12px 0 6px;
}

.nw-article-detail__cap {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin: 0 0 14px;
}

.nw-article-detail__legal {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
    font-size: 0.75rem;
    color: #888;
    text-align: center;
    line-height: 1.5;
}

/* Preview-parity layout (article.html / modal — same markup as admin articlePreview) */
.nw-article-detail--preview .nw-preview-article {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.nw-article-detail--preview .nw-prev-title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-family: var(--font-serif);
    line-height: 1.35;
    color: var(--color-heading);
}
.nw-article-detail--preview .nw-prev-sub {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 12px;
    line-height: 1.45;
    white-space: pre-wrap;
}
.nw-article-detail--preview .nw-prev-meta-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 16px;
    margin: 0 0 20px;
    font-size: 0.9rem;
}
.nw-article-detail--preview .nw-prev-meta-cat {
    font-weight: 600;
    color: var(--color-text);
}
.nw-article-detail--preview .nw-prev-meta-byline {
    color: var(--color-muted);
    text-align: right;
    flex: 1;
    min-width: 220px;
}
.nw-article-detail--preview .nw-prev-content {
    margin: 0 0 8px;
}
.nw-article-detail--preview .nw-prev-body {
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--color-text);
}
.nw-article-detail--preview .nw-prev-fig {
    margin: 0 0 16px;
}
.nw-article-detail--preview .nw-prev-img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}
.nw-article-detail--preview .nw-prev-cap {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin: 8px 0 4px;
}
.nw-article-detail--preview .nw-prev-legal {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    font-size: 0.8rem;
    color: var(--color-muted);
    text-align: center;
    line-height: 1.5;
}

.nw-article-detail__loading,
.nw-article-detail__error {
    margin: 8px 0;
    font-weight: 600;
}

.nw-article-detail__errmsg {
    color: var(--color-muted);
    font-size: 0.9rem;
}

@media (min-width: 769px) {
    .nw-article-detail__title {
        font-size: 1.75rem;
    }
}

.aa-section-intro {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #f6f8fb;
    border: 1px solid var(--color-border, #e6e6e6);
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #333;
}

.aa-author-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.aa-author-link:hover {
    color: var(--color-link, #2d7dd2);
}

.nw-article-detail__author-link {
    color: var(--color-link, #2d7dd2);
    text-decoration: none;
    font-weight: 600;
}

.nw-article-detail__author-link:hover {
    text-decoration: underline;
}

.nw-article-detail__section-nav {
    margin-top: 8px;
    font-size: 0.875rem;
}

.nw-article-detail__section-nav a {
    color: var(--color-link, #2d7dd2);
}

.nw-article-detail__summary {
    margin: 16px 0 20px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid var(--color-border, #e6e6e6);
    border-radius: 8px;
}

.nw-article-detail__summary-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
}

.nw-article-detail__summary-lead,
.nw-article-detail__summary-hint {
    margin: 0 0 8px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #222;
}

.nw-article-detail__summary-hint {
    font-size: 0.8125rem;
    color: #555;
    margin-bottom: 0;
}

.nw-article-detail__summary-list {
    margin: 0 0 8px 1.1em;
    padding: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.nw-related-articles {
    margin: 24px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border, #e6e6e6);
}

.nw-related-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
}

.nw-related-list {
    margin: 0;
    padding-left: 1.2em;
    line-height: 1.7;
}

.nw-related-list a {
    color: var(--color-link, #2d7dd2);
}

.nw-related-empty,
.nw-related-loading {
    font-size: 0.9rem;
    color: var(--color-muted, #666);
    margin: 0;
}

.author-profile-wrap {
    max-width: 720px;
}

.author-profile__intro {
    margin: 12px 0 8px;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #333;
}

.author-profile__list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.author-profile__list li {
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.author-profile__list a {
    color: var(--color-link, #2d7dd2);
    font-weight: 600;
}
