/* NewsClip — 신문 스크랩 앱 */
:root {
    --nc-bg: #faf9f6;
    --nc-card: #ffffff;
    --nc-text: #1a1a1a;
    --nc-muted: #6b7280;
    --nc-border: #e5e2db;
    --nc-accent: #c2410c;
    --nc-accent-light: #fed7aa;
    --nc-blue: #1d4ed8;
    --nc-green: #15803d;
    --nc-yellow: #f59e0b;
    --nc-red: #dc2626;
    --nc-sidebar-bg: #f3f1ec;
    --nc-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --nc-radius: 6px;
}

body { background: var(--nc-bg); }

.nc-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.nc-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 768px) { .nc-layout { grid-template-columns: 1fr; } }

/* Header */
.nc-header {
    border-bottom: 3px double var(--nc-border);
    padding: 20px 0 12px;
    margin-bottom: 24px;
}
.nc-header h1 {
    font-family: 'Noto Serif KR', 'Georgia', serif;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--nc-text);
    margin: 0;
}
.nc-header .nc-date {
    font-size: 0.85rem;
    color: var(--nc-muted);
    margin-top: 2px;
}

.nc-nav {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    border-top: 1px solid var(--nc-border);
    padding-top: 8px;
    flex-wrap: wrap;
}
.nc-nav a {
    padding: 6px 14px;
    border-radius: var(--nc-radius);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--nc-muted);
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.nc-nav a:hover { background: var(--nc-accent-light); color: var(--nc-accent); }
.nc-nav a.active { background: var(--nc-accent); color: #fff; }

/* Sidebar */
.nc-sidebar {
    background: var(--nc-sidebar-bg);
    border-radius: var(--nc-radius);
    padding: 16px;
    position: sticky;
    top: 16px;
}
.nc-sidebar h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--nc-muted);
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--nc-border);
}
.nc-sidebar h3:not(:first-child) { margin-top: 16px; }

.nc-sidebar-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.85rem;
    color: var(--nc-text);
    text-decoration: none;
    transition: color 0.15s;
}
.nc-sidebar-item:hover { color: var(--nc-accent); }
.nc-sidebar-item .cnt {
    background: var(--nc-border);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 0.75rem;
    color: var(--nc-muted);
}

/* Badge */
.nc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--nc-red);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0 6px;
    margin-left: 4px;
}

/* Clip Cards */
.nc-clip-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    background: var(--nc-card);
    border: 1px solid var(--nc-border);
    border-radius: var(--nc-radius);
    padding: 14px;
    margin-bottom: 10px;
    transition: box-shadow 0.15s;
}
.nc-clip-card:hover { box-shadow: var(--nc-shadow); }
.nc-clip-card.unread { border-left: 3px solid var(--nc-accent); }

.nc-clip-thumb {
    width: 120px; height: 80px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--nc-border);
}
.nc-clip-thumb-placeholder {
    width: 120px; height: 80px;
    border-radius: 4px;
    background: var(--nc-sidebar-bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--nc-muted);
}

.nc-clip-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 1rem; font-weight: 700;
    color: var(--nc-text); text-decoration: none; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nc-clip-title:hover { color: var(--nc-accent); }

.nc-clip-meta {
    display: flex; gap: 10px;
    font-size: 0.78rem; color: var(--nc-muted); margin-top: 4px;
}
.nc-clip-meta .source { color: var(--nc-blue); font-weight: 600; }

.nc-clip-summary {
    font-size: 0.85rem; color: var(--nc-muted); margin-top: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.nc-clip-actions { display: flex; gap: 8px; margin-top: 6px; }
.nc-clip-actions button, .nc-clip-actions a {
    background: none; border: none;
    font-size: 0.8rem; color: var(--nc-muted);
    cursor: pointer; padding: 2px 4px; text-decoration: none;
}
.nc-clip-actions button:hover, .nc-clip-actions a:hover { color: var(--nc-accent); }
.nc-clip-actions button.starred { color: var(--nc-yellow); }

@media (max-width: 576px) {
    .nc-clip-card { grid-template-columns: 1fr; }
    .nc-clip-thumb, .nc-clip-thumb-placeholder { width: 100%; height: 140px; }
}

/* Subscription Cards */
.nc-sub-card {
    background: var(--nc-card);
    border: 1px solid var(--nc-border);
    border-radius: var(--nc-radius);
    padding: 16px; margin-bottom: 10px;
    transition: opacity 0.3s;
}
.nc-sub-keyword { font-size: 1.1rem; font-weight: 700; color: var(--nc-text); }
.nc-sub-stats { font-size: 0.82rem; color: var(--nc-muted); margin-top: 4px; }
.nc-sub-actions { display: flex; gap: 8px; margin-top: 10px; }

/* Search Results */
.nc-search-result {
    background: var(--nc-card);
    border: 1px solid var(--nc-border);
    border-radius: var(--nc-radius);
    padding: 14px; margin-bottom: 8px;
    transition: opacity 0.3s;
}
.nc-search-result.clipped { opacity: 0.5; }

/* Buttons */
.nc-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px; border-radius: var(--nc-radius);
    font-size: 0.85rem; font-weight: 500;
    border: 1px solid var(--nc-border);
    background: var(--nc-card); color: var(--nc-text);
    cursor: pointer; text-decoration: none; transition: all 0.15s;
}
.nc-btn:hover { border-color: var(--nc-accent); color: var(--nc-accent); }
.nc-btn-primary { background: var(--nc-accent); color: #fff; border-color: var(--nc-accent); }
.nc-btn-primary:hover { background: #9a3412; color: #fff; }
.nc-btn-danger { color: var(--nc-red); }
.nc-btn-danger:hover { background: #fef2f2; border-color: var(--nc-red); }
.nc-btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.nc-btn-green { color: var(--nc-green); }
.nc-btn-green:hover { background: #f0fdf4; border-color: var(--nc-green); }

/* Forms */
.nc-input {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--nc-border); border-radius: var(--nc-radius);
    font-size: 0.9rem; background: var(--nc-card); color: var(--nc-text);
    box-sizing: border-box;
}
.nc-input:focus { outline: none; border-color: var(--nc-accent); box-shadow: 0 0 0 2px var(--nc-accent-light); }

.nc-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--nc-muted); margin-bottom: 4px; }

/* Tags */
.nc-tag {
    display: inline-block; padding: 2px 8px; border-radius: 3px;
    font-size: 0.75rem; background: var(--nc-sidebar-bg); color: var(--nc-muted); text-decoration: none;
}
.nc-tag:hover { background: var(--nc-accent-light); color: var(--nc-accent); }

/* Media Category Labels */
.nc-media-cat {
    display: inline-block; padding: 2px 6px; border-radius: 3px;
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
}
.nc-media-cat.major { background: #dbeafe; color: #1e40af; }
.nc-media-cat.economy { background: #fef3c7; color: #92400e; }
.nc-media-cat.broadcast { background: #ede9fe; color: #6d28d9; }
.nc-media-cat.it_tech { background: #d1fae5; color: #065f46; }
.nc-media-cat.indie { background: #fce7f3; color: #9d174d; }
.nc-media-cat.english { background: #e0e7ff; color: #3730a3; }
.nc-media-cat.sports { background: #ffedd5; color: #c2410c; }

/* Empty */
.nc-empty { text-align: center; padding: 40px 20px; color: var(--nc-muted); }
.nc-empty-icon { font-size: 2.5rem; margin-bottom: 8px; }

/* Detail */
.nc-detail {
    background: var(--nc-card); border: 1px solid var(--nc-border);
    border-radius: var(--nc-radius); padding: 24px;
}
.nc-detail h1 {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.4rem; font-weight: 900; line-height: 1.5; margin-bottom: 12px;
}

/* Toast */
.nc-toast {
    position: fixed; bottom: 20px; right: 20px;
    padding: 10px 18px; border-radius: var(--nc-radius);
    background: var(--nc-text); color: #fff; font-size: 0.85rem;
    z-index: 9999;
    animation: ncFadeIn 0.2s, ncFadeOut 0.3s 2.5s forwards;
}
@keyframes ncFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }
@keyframes ncFadeOut { from { opacity: 1; } to { opacity: 0; transform: translateY(10px); } }

/* Filters */
.nc-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.nc-filters select {
    padding: 5px 10px; border: 1px solid var(--nc-border);
    border-radius: var(--nc-radius); font-size: 0.82rem; background: var(--nc-card);
}

/* Checkbox group */
.nc-check-group { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.nc-check-group label {
    display: flex; align-items: center; gap: 4px;
    font-size: 0.82rem; color: var(--nc-text); cursor: pointer;
}

/* Preview */
.nc-preview {
    background: var(--nc-sidebar-bg); border-radius: var(--nc-radius);
    padding: 14px; margin-top: 12px;
}
.nc-preview img { max-width: 200px; max-height: 120px; border-radius: 4px; margin-bottom: 8px; }

/* API warning */
.nc-api-warn {
    background: #fef3c7; border: 1px solid #f59e0b; border-radius: var(--nc-radius);
    padding: 12px 16px; margin-bottom: 16px; font-size: 0.85rem; color: #92400e;
}
.nc-api-warn a { color: #c2410c; font-weight: 600; }

/* ═══════════ Dashboard Header ═══════════ */
.nc-dashboard-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    background: linear-gradient(135deg, #fdfcfa 0%, #f5f0e8 100%);
    border: 1px solid var(--nc-border);
    border-radius: var(--nc-radius);
    padding: 18px 24px;
    margin-bottom: 20px;
}

.nc-dash-left { text-align: left; }
.nc-dash-center { text-align: center; }
.nc-dash-right { text-align: right; }

.nc-dash-date {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.nc-dash-year {
    font-family: 'Noto Serif KR', serif;
    font-size: 0.85rem;
    color: var(--nc-muted);
    font-weight: 700;
}

.nc-dash-monthday {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--nc-text);
    letter-spacing: -0.02em;
}

.nc-dash-weekday {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--nc-accent);
}

.nc-dash-lunar {
    font-size: 0.8rem;
    color: var(--nc-muted);
    margin-top: 3px;
}

.nc-dash-holiday {
    margin-top: 5px;
}

.nc-holiday-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

.nc-dash-clock {
    font-family: 'Noto Serif KR', serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--nc-text);
    letter-spacing: 0.04em;
    line-height: 1;
}

.nc-dash-greeting {
    font-size: 0.85rem;
    color: var(--nc-muted);
    margin-top: 4px;
}

.nc-dash-progress-label {
    font-size: 0.75rem;
    color: var(--nc-muted);
    margin-bottom: 4px;
}

.nc-dash-progress-bar {
    width: 140px;
    height: 6px;
    background: var(--nc-border);
    border-radius: 3px;
    overflow: hidden;
    margin-left: auto;
}

.nc-dash-progress-fill {
    height: 100%;
    background: var(--nc-accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.nc-dash-progress-text {
    font-size: 0.75rem;
    color: var(--nc-muted);
    margin-top: 3px;
}

.nc-dash-clip-count {
    font-size: 0.82rem;
    color: var(--nc-text);
    margin-top: 8px;
}

@media (max-width: 768px) {
    .nc-dashboard-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 12px;
        padding: 14px 16px;
    }
    .nc-dash-left, .nc-dash-right { text-align: center; }
    .nc-dash-date { justify-content: center; }
    .nc-dash-progress-bar { margin: 0 auto; }
    .nc-dash-clock { font-size: 1.8rem; }
}

/* ═══════════ Header Info Chips ═══════════ */
.nc-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.nc-header-left {
    flex-shrink: 0;
}

.nc-header-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    padding-top: 4px;
}

.nc-info-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.nc-info-chip.solar {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.nc-info-chip.holiday {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.nc-info-chip.intl {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

@media (max-width: 768px) {
    .nc-header-top { flex-direction: column; }
    .nc-header-info { justify-content: flex-start; }
}

/* ═══════════ Trending Keywords Bar ═══════════ */
.nc-trending-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, #fefce8 0%, #fff7ed 50%, #fef2f2 100%);
    border: 1px solid var(--nc-border);
    border-radius: var(--nc-radius);
    padding: 10px 16px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.nc-trending-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--nc-accent);
    white-space: nowrap;
    flex-shrink: 0;
}

.nc-trending-keywords {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nc-trending-word {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--nc-text);
    background: var(--nc-card);
    border: 1px solid var(--nc-border);
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.nc-trending-word:hover {
    border-color: var(--nc-accent);
    color: var(--nc-accent);
    background: #fff7ed;
}

.nc-trending-word.warm {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.nc-trending-word.hot {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
    font-weight: 700;
}

.nc-trending-cnt {
    font-size: 0.7rem;
    color: var(--nc-muted);
    font-weight: 400;
}

.nc-trending-word.warm .nc-trending-cnt { color: #b45309; }
.nc-trending-word.hot .nc-trending-cnt { color: #dc2626; }

@media (max-width: 576px) {
    .nc-trending-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ═══════════ Header Right Info (항상 표시) ═══════════ */
.nc-header-right-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding-top: 2px;
}

.nc-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.nc-upcoming {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.nc-upcoming-item {
    font-size: 0.78rem;
    color: var(--nc-muted);
    white-space: nowrap;
}

.nc-upcoming-item small {
    display: inline-block;
    background: var(--nc-sidebar-bg);
    border-radius: 8px;
    padding: 1px 6px;
    font-size: 0.7rem;
    color: var(--nc-accent);
    font-weight: 600;
    margin-left: 2px;
}

@media (max-width: 768px) {
    .nc-header-right-info {
        align-items: flex-start;
    }
    .nc-info-row, .nc-upcoming {
        justify-content: flex-start;
    }
}

/* ═══════════ Header DateTime (title 오른쪽) ═══════════ */
.nc-header-datetime {
    text-align: right;
    flex-shrink: 0;
}

.nc-hd-row1 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    justify-content: flex-end;
}

.nc-hd-datetext {
    font-family: 'Noto Serif KR', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--nc-text);
}

.nc-hd-clock {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--nc-accent);
    letter-spacing: 0.02em;
}

.nc-hd-row2 {
    font-size: 0.8rem;
    color: var(--nc-muted);
    margin-top: 2px;
}

.nc-hd-row3 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 6px;
}

@media (max-width: 768px) {
    .nc-header-top { flex-direction: column; }
    .nc-header-datetime { text-align: left; margin-top: 8px; }
    .nc-hd-row1, .nc-hd-row3 { justify-content: flex-start; }
}

/* ═══════════ AI Daily Keyword (헤더 중앙) ═══════════ */
.nc-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.nc-header-keyword {
    text-align: center;
    flex: 1;
    min-width: 200px;
    padding: 4px 0;
}

.nc-keyword-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--nc-muted);
    margin-bottom: 2px;
}

.nc-keyword-text {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--nc-text);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.nc-keyword-summary {
    font-size: 0.8rem;
    color: var(--nc-muted);
    margin-top: 2px;
}

@media (max-width: 768px) {
    .nc-header-top { flex-direction: column; }
    .nc-header-keyword { text-align: left; order: -1; }
    .nc-keyword-text { font-size: 1.2rem; }
}

/* ═══════════ Header 3-Column with Dividers ═══════════ */
.nc-header-top {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 0;
    flex-wrap: wrap;
}

.nc-header-left {
    flex-shrink: 0;
    padding-right: 20px;
}

/* AI 오늘의 키워드 (중앙) */
.nc-header-keyword {
    text-align: center;
    flex: 1;
    min-width: 200px;
    padding: 4px 24px;
    border-left: 2px solid var(--nc-border);
    border-right: 2px solid var(--nc-border);
}

.nc-keyword-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--nc-muted);
    margin-bottom: 3px;
}

.nc-keyword-text {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--nc-text);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.nc-keyword-summary {
    font-size: 0.78rem;
    color: var(--nc-muted);
    margin-top: 3px;
    line-height: 1.4;
}

/* 날짜/시계 (오른쪽) */
.nc-header-datetime {
    text-align: right;
    flex-shrink: 0;
    padding-left: 20px;
}

.nc-hd-row1 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    justify-content: flex-end;
}

.nc-hd-datetext {
    font-family: 'Noto Serif KR', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--nc-text);
}

.nc-hd-clock {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--nc-accent);
    letter-spacing: 0.02em;
}

.nc-hd-row2 {
    font-size: 0.8rem;
    color: var(--nc-muted);
    margin-top: 2px;
}

.nc-hd-row3 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 6px;
}

/* 반응형 */
@media (max-width: 768px) {
    .nc-header-top { flex-direction: column; gap: 10px; }
    .nc-header-left { padding-right: 0; }
    .nc-header-keyword {
        text-align: left;
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--nc-border);
        border-bottom: 1px solid var(--nc-border);
        padding: 8px 0;
    }
    .nc-header-datetime { text-align: left; padding-left: 0; }
    .nc-hd-row1, .nc-hd-row3 { justify-content: flex-start; }
    .nc-keyword-text { font-size: 1.1rem; }
}

/* Events Row (헤더-메뉴 사이) */
.nc-events-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border-top: 1px solid var(--nc-border);
    margin-top: 10px;
}