/* ═══════════════════════════════════════════════════
   필수 소프트웨어 모음 (sicman.org)
   Design: clean-corporate
   Colors: Navy #1E40AF + Sky Blue #0EA5E9
   ═══════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
    --primary: #1E40AF;
    --primary-dark: #1E3A8A;
    --primary-light: #3B82F6;
    --secondary: #0EA5E9;
    --secondary-light: #38BDF8;

    --bg-body: #F5F5F5;
    --bg-paper: #FFFFFF;
    --bg-dark: #1a1a2e;

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #888888;
    --text-white: #FFFFFF;

    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);

    --font-heading: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;

    --color-freeware: #16A34A;
    --color-opensource: #2563EB;
    --color-shareware: #D97706;
    --color-trial: #DC2626;
    --color-freemium: #7C3AED;

    --color-success: #16A34A;
    --color-error: #DC2626;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ─── Utilities ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--text-white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--text-white); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--text-white); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-block { display: block; width: 100%; text-align: center; justify-content: center; }

/* ═══ HEADER: dark-navbar ═══ */
.header-dark {
    background: var(--bg-dark);
    color: var(--text-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 1rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-white);
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.header-logo:hover { color: var(--secondary-light); }
.logo-icon { font-size: 1.4rem; }

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-white);
    background: rgba(255,255,255,0.1);
}
.arrow { font-size: 0.7rem; margin-left: 0.2rem; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-paper);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 0.5rem 0;
    z-index: 100;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.dropdown-item:hover { background: var(--bg-body); color: var(--primary); }
.dropdown-item .count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-body);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
}

/* Search */
.header-search { flex-shrink: 0; }
.search-form { display: flex; align-items: center; }
.search-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-white);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 0.85rem;
    width: 180px;
    font-family: var(--font-body);
}
.search-input::placeholder { color: rgba(255,255,255,0.5); }
.search-input:focus { outline: none; border-color: var(--secondary); background: rgba(255,255,255,0.15); }
.search-btn {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: var(--text-white);
    padding: 0.4rem 0.7rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-white);
    transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ═══ MAIN CONTENT ═══ */
.main-content { padding: 1.5rem 0 3rem; min-height: 60vh; }

/* ─── Stats Grid ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-paper);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: var(--shadow-card);
}
.stat-icon { font-size: 2rem; }
.stat-number { display: block; font-weight: 700; font-size: 1rem; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); }

/* ─── Dashboard Layout ─── */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
}
.dashboard-main { min-width: 0; }

/* ─── Content Layout (2-column) ─── */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
}
.content-main { min-width: 0; }

/* ─── Section ─── */
.section { margin-bottom: 2.5rem; }
.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px dashed var(--border-medium);
}

/* ─── Table ─── */
.table-responsive { overflow-x: auto; }
.sw-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-paper);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.sw-table th {
    background: var(--bg-dark);
    color: var(--text-white);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.7rem 0.8rem;
    text-align: left;
    white-space: nowrap;
}
.sw-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    vertical-align: middle;
}
.sw-table tbody tr:hover { background: #F8FAFC; }
.th-rank, .td-rank { text-align: center; width: 40px; }
.td-rank { font-weight: 700; color: var(--primary); }
.th-download, .td-download { text-align: right; }
.sw-name { font-weight: 700; color: var(--text-primary); }
.sw-name:hover { color: var(--primary); }
.sw-version { font-size: 0.75rem; color: var(--text-muted); margin-left: 0.3rem; }

/* ─── Card Grid ─── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ─── Software Card (bordered) ─── */
.sw-card {
    background: var(--bg-paper);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    box-shadow: var(--shadow-card);
}
.sw-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.sw-card-badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-white);
    border-radius: var(--radius-sm) 0 var(--radius-sm) 0;
}
.license-freeware, .sw-card-badge.license-freeware { background: var(--color-freeware); }
.license-opensource, .sw-card-badge.license-opensource { background: var(--color-opensource); }
.license-shareware, .sw-card-badge.license-shareware { background: var(--color-shareware); }
.license-trial, .sw-card-badge.license-trial { background: var(--color-trial); }
.license-freemium, .sw-card-badge.license-freemium { background: var(--color-freemium); }

.license-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-white);
    border-radius: 3px;
}

.sw-card-body { padding: 1.2rem 1rem 0.5rem; flex: 1; }
.sw-card-header { display: flex; align-items: flex-start; gap: 0.7rem; margin-bottom: 0.5rem; }
.sw-card-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.sw-card-icon-placeholder { font-size: 2.5rem; flex-shrink: 0; width: 48px; text-align: center; }
.sw-card-title-wrap { min-width: 0; }
.sw-card-title { font-size: 0.95rem; font-weight: 700; line-height: 1.3; }
.sw-card-title a { color: var(--text-primary); }
.sw-card-title a:hover { color: var(--primary); }
.sw-card-version { font-size: 0.7rem; color: var(--text-muted); }
.sw-card-developer { display: block; font-size: 0.75rem; color: var(--text-secondary); }
.sw-card-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
.sw-card-size { font-size: 0.75rem; color: var(--text-muted); }
.sw-card-excerpt { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.sw-card-footer { padding: 0.6rem 1rem; border-top: 1px solid var(--border-light); }

/* ─── Rating ─── */
.rating { white-space: nowrap; font-size: 0.85rem; }
.star.full { color: #F59E0B; }
.star.half { color: #F59E0B; opacity: 0.6; }
.star.empty { color: #D1D5DB; }
.rating-value { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); }

/* ─── Category Badge ─── */
.category-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ─── Sidebar ─── */
.dashboard-sidebar, .content-sidebar {}
.sidebar-widget {
    background: var(--bg-paper);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
}
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px dashed var(--border-medium);
}

.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { border-bottom: 1px solid var(--border-light); }
.category-list li:last-child { border-bottom: none; }
.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.3rem;
    color: var(--text-primary);
    font-size: 0.85rem;
}
.category-list li a:hover { color: var(--primary); background: #F8FAFC; }
.category-list li.active a { color: var(--primary); font-weight: 700; }
.category-list .count { font-size: 0.75rem; color: var(--text-muted); background: var(--bg-body); padding: 0.1rem 0.5rem; border-radius: 10px; }

.latest-list { list-style: none; }
.latest-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--border-light); }
.latest-list li:last-child { border-bottom: none; }
.latest-list li a { font-size: 0.85rem; color: var(--text-primary); display: block; }
.latest-list li a:hover { color: var(--primary); }
.latest-list .meta { font-size: 0.7rem; color: var(--text-muted); }

/* ─── Download Widget ─── */
.download-widget { border-color: var(--primary); }
.download-widget .widget-title { color: var(--primary); }
.download-info { list-style: none; margin-top: 0.8rem; font-size: 0.8rem; color: var(--text-secondary); }
.download-info li { padding: 0.25rem 0; border-bottom: 1px dashed var(--border-light); }

/* ─── Content Detail ─── */
.content-main h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.sw-info-card {
    background: var(--bg-paper);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}
.sw-info-header { display: flex; gap: 1.2rem; margin-bottom: 1rem; }
.sw-info-icon { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.sw-info-details { flex: 1; }
.sw-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.85rem;
}
.sw-info-label { font-weight: 700; color: var(--text-secondary); min-width: 70px; }
.sw-info-value { color: var(--text-primary); }

.btn-download {
    background: var(--primary);
    color: var(--text-white);
    width: 100%;
    justify-content: center;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}
.btn-download:hover { background: var(--primary-dark); color: var(--text-white); }

/* ─── TOC ─── */
.toc-container {
    background: var(--bg-body);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}
.toc-inner { padding: 1rem; }
.toc-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; }
.toc-list { list-style: none; }
.toc-item { padding: 0.25rem 0; }
.toc-item a { color: var(--text-secondary); font-size: 0.85rem; }
.toc-item a:hover, .toc-item a.active { color: var(--primary); font-weight: 700; }
.toc-sub { padding-left: 1rem; }

/* ─── Content Body ─── */
.content-body {
    font-size: 1rem;
    line-height: 1.8;
}
.content-body h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    margin: 2rem 0 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px dashed var(--border-medium);
}
.content-body h3 {
    font-weight: 700;
    font-size: 1.15rem;
    margin: 1.5rem 0 0.6rem;
}
.content-body p { margin-bottom: 1rem; }
.content-body ul, .content-body ol { margin: 0.5rem 0 1rem 1.5rem; }
.content-body li { margin-bottom: 0.3rem; }
.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.content-body table th, .content-body table td {
    border: 1px solid var(--border-light);
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    text-align: left;
}
.content-body table th { background: var(--bg-body); font-weight: 700; }
.content-body img { border-radius: var(--radius-sm); margin: 1rem 0; }
.content-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    background: var(--bg-body);
    color: var(--text-secondary);
}

/* ─── FAQ ─── */
.faq-section { margin-top: 2rem; }
.faq-section h2 { font-size: 1.3rem; margin-bottom: 1rem; border-bottom: 2px dashed var(--border-medium); padding-bottom: 0.4rem; }
.faq-item { border: 2px solid var(--border-light); border-radius: var(--radius-sm); margin-bottom: 0.5rem; overflow: hidden; }
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-paper);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: left;
    color: var(--text-primary);
}
.faq-question:hover { background: var(--bg-body); }
.faq-toggle { font-size: 1.2rem; color: var(--primary); font-weight: 700; }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer p { padding: 0.8rem 1rem; font-size: 0.9rem; color: var(--text-secondary); margin: 0; }

/* ─── References ─── */
.references-section { margin-top: 2rem; }
.references-section h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.references-list { padding-left: 1.5rem; }
.references-list li { font-size: 0.85rem; margin-bottom: 0.3rem; color: var(--text-secondary); }
.ref-source { font-size: 0.8rem; color: var(--text-muted); }

/* ─── Author Bio ─── */
.author-bio {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-body);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
}
.author-name { font-weight: 700; color: var(--primary); font-size: 1rem; }
.author-credentials { font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 0.2rem; }
.author-bio-text { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.4rem; }
.author-profile { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px dashed var(--border-medium); }
.author-stats { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ─── Feedback ─── */
.feedback-section {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    text-align: center;
}
.feedback-section p { font-weight: 700; margin-bottom: 0.6rem; }
.feedback-buttons { display: flex; justify-content: center; gap: 0.5rem; }
.btn-feedback {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-paper);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all 0.2s;
}
.btn-feedback:hover { border-color: var(--primary); background: #EFF6FF; }
.feedback-message { margin-top: 0.5rem; font-size: 0.9rem; }
.feedback-message.success { color: var(--color-success); }
.feedback-message.error { color: var(--color-error); }

/* ─── Content Meta Footer ─── */
.content-meta-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ─── Related List ─── */
.related-list { list-style: none; }
.related-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--border-light); }
.related-list li:last-child { border-bottom: none; }
.related-list li a { font-size: 0.85rem; color: var(--text-primary); }
.related-list li a:hover { color: var(--primary); }
.related-list .meta { display: block; font-size: 0.75rem; }

/* ─── Breadcrumb ─── */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.8rem;
}
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.3rem;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    margin-right: 0.3rem;
    color: var(--text-muted);
}
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-secondary); }

/* ─── Pagination ─── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.page-link {
    padding: 0.4rem 0.8rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-paper);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}
.page-dots { color: var(--text-muted); padding: 0 0.3rem; }

/* ─── Search ─── */
.search-form-large {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.search-input-lg {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
}
.search-input-lg:focus { outline: none; border-color: var(--primary); }
.search-count { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ─── Category Description ─── */
.category-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed var(--border-medium);
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state p { margin-bottom: 1rem; }

/* ─── Error Page ─── */
.error-page { text-align: center; padding: 2rem 0; }
.error-page h1 { font-size: 5rem; color: var(--primary); margin-bottom: 0.5rem; }
.error-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.error-desc { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ─── Static Pages ─── */
.static-content {
    background: var(--bg-paper);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 2rem;
    box-shadow: var(--shadow-card);
}
.static-content h1 { font-size: 1.6rem; margin-bottom: 1.2rem; }
.static-content h2 { font-size: 1.2rem; margin: 1.5rem 0 0.6rem; padding-bottom: 0.3rem; border-bottom: 2px dashed var(--border-medium); }
.static-content h3 { font-size: 1rem; margin: 1rem 0 0.4rem; }
.static-content p { margin-bottom: 0.8rem; font-size: 0.95rem; line-height: 1.7; }
.static-content ul, .static-content ol { margin: 0.5rem 0 1rem 1.5rem; }
.static-content li { margin-bottom: 0.3rem; font-size: 0.9rem; }

/* ─── Special Landing Pages ─── */
.landing-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white);
    padding: 2.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    text-align: center;
}
.landing-hero h1 { color: var(--text-white); font-size: 1.8rem; margin-bottom: 0.5rem; }
.landing-hero p { font-size: 1rem; opacity: 0.9; }

.category-section { margin-bottom: 2.5rem; }
.category-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    border-bottom: 2px dashed var(--border-medium);
}

/* ═══ FOOTER: multi-column ═══ */
.footer-multi {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.85);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-col h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.8rem;
}
.footer-col p { font-size: 0.85rem; line-height: 1.6; opacity: 0.8; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.3rem; }
.footer-col ul a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--secondary-light); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-layout,
    .content-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { order: -1; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-nav { display: none; position: fixed; top: 60px; left: 0; right: 0; background: var(--bg-dark); flex-direction: column; padding: 1rem; gap: 0; z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
    .header-nav.open { display: flex; }
    .nav-link { padding: 0.7rem 1rem; width: 100%; }
    .hamburger { display: flex; }
    .header-search { display: none; }
    .nav-dropdown-menu { position: static; box-shadow: none; background: rgba(255,255,255,0.05); border-radius: 0; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .stat-card { padding: 0.7rem; }
    .stat-icon { font-size: 1.5rem; }

    .card-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }

    .content-main h1 { font-size: 1.4rem; }
    .sw-info-header { flex-direction: column; }

    .sw-table th, .sw-table td { padding: 0.4rem 0.5rem; font-size: 0.75rem; }

    .landing-hero { padding: 1.5rem; }
    .landing-hero h1 { font-size: 1.3rem; }
}

/* ========================================
 * Community Board
 * ======================================== */
.cm-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.cm-chip {
    display: inline-block; padding: 0.4rem 0.9rem; border-radius: 999px;
    background: #f1f5f9; color: #334155; font-size: 0.85rem; font-weight: 500;
    text-decoration: none; transition: all 0.15s;
}
.cm-chip:hover { background: #e2e8f0; }
.cm-chip.active { background: #1E40AF; color: #fff; }

.cm-thread-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid #e5e7eb; }
.cm-thread {
    display: flex; gap: 0.9rem; align-items: flex-start;
    padding: 1rem 0.5rem; border-bottom: 1px solid #e5e7eb;
}
.cm-tag {
    flex-shrink: 0; display: inline-block; padding: 0.25rem 0.6rem;
    border-radius: 4px; font-size: 0.75rem; font-weight: 600;
    background: #e0e7ff; color: #3730a3; white-space: nowrap;
}
.cm-tag.cm-q { background: #fef3c7; color: #92400e; }
.cm-tag.cm-r { background: #fce7f3; color: #9d174d; }
.cm-tag.cm-t { background: #dcfce7; color: #166534; }
.cm-tag.cm-d { background: #e0e7ff; color: #3730a3; }
.cm-tag.cm-a { background: #f3f4f6; color: #4b5563; }

.cm-thread-body { flex: 1; min-width: 0; word-break: break-word; }
.cm-thread-title { margin: 0 0 0.4rem; font-size: 1rem; font-weight: 600; line-height: 1.4; word-break: break-word; }
.cm-thread-title a { color: #0f172a; text-decoration: none; }
.cm-thread-title a:hover { color: #1E40AF; }
.cm-reply-count { color: #dc2626; font-size: 0.85rem; margin-left: 0.3rem; }

.cm-thread-meta {
    display: flex; flex-wrap: wrap; gap: 0.7rem;
    font-size: 0.78rem; color: #64748b;
}
.cm-author { font-weight: 500; color: #475569; }
.cm-cat::before, .cm-date::before, .cm-views::before {
    content: ''; display: inline-block; width: 1px; height: 12px;
    background: #cbd5e1; margin-right: 0.7rem; vertical-align: middle;
}

/* Show page */
.cm-thread-head { display: flex; gap: 0.6rem; margin-bottom: 0.7rem; }
.cm-title { font-size: 1.6rem; line-height: 1.4; margin: 0 0 0.7rem; color: #0f172a; }
.cm-meta {
    display: flex; flex-wrap: wrap; gap: 0.7rem;
    padding-bottom: 1rem; margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb; font-size: 0.85rem; color: #64748b;
}
.cm-author-meta { color: #94a3b8; font-size: 0.8rem; }

.cm-body { line-height: 1.85; color: #1e293b; font-size: 1rem; }
.cm-body h2 { font-size: 1.2rem; margin: 1.6rem 0 0.7rem; padding-left: 0.6rem; border-left: 4px solid #1E40AF; }
.cm-body h3 { font-size: 1.05rem; margin: 1.2rem 0 0.5rem; color: #1E40AF; }
.cm-body p { margin: 0.7rem 0; }
.cm-body ul, .cm-body ol { margin: 0.7rem 0 0.7rem 1.5rem; }
.cm-body li { margin: 0.3rem 0; }
.cm-body blockquote {
    margin: 1rem 0; padding: 0.8rem 1rem; border-left: 4px solid #94a3b8;
    background: #f8fafc; color: #475569; font-style: italic;
}
.cm-body code {
    background: #f1f5f9; padding: 0.1rem 0.4rem; border-radius: 3px;
    font-size: 0.9em; color: #be185d;
}
.cm-body pre {
    background: #0f172a; color: #e2e8f0; padding: 0.9rem 1rem;
    border-radius: 6px; overflow-x: auto; font-size: 0.85rem;
}
.cm-body pre code { background: transparent; color: inherit; padding: 0; }

.cm-tags { margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cm-tag-chip {
    display: inline-block; padding: 0.25rem 0.7rem; border-radius: 4px;
    background: #f1f5f9; color: #475569; font-size: 0.8rem;
}

.cm-replies { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 2px solid #e5e7eb; }
.cm-replies-title { font-size: 1.15rem; margin-bottom: 1rem; color: #0f172a; }
.cm-reply {
    padding: 1rem 0; border-bottom: 1px solid #f1f5f9;
}
.cm-reply:last-child { border-bottom: none; }
.cm-reply-head {
    display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
    margin-bottom: 0.6rem; font-size: 0.85rem; color: #64748b;
}
.cm-reply-body { line-height: 1.75; color: #1e293b; padding-left: 0.5rem; }
.cm-reply-body p { margin: 0.5rem 0; }
.cm-reply-body ul, .cm-reply-body ol { margin: 0.5rem 0 0.5rem 1.4rem; }

.cm-footer-nav { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #e5e7eb; }

.cm-info { list-style: disc; padding-left: 1.2rem; font-size: 0.85rem; color: #475569; }
.cm-info li { margin: 0.4rem 0; }

@media (max-width: 768px) {
    .cm-thread { flex-direction: column; gap: 0.5rem; }
    .cm-title { font-size: 1.25rem; }
    .cm-thread-meta { font-size: 0.72rem; }
}

/* ========================================
 * AdSense
 * ======================================== */
.ad-container {
    margin: 1.5rem 0;
    text-align: center;
    clear: both;
    overflow: hidden;
}
.ad-container ins.adsbygoogle { width: 100%; }
/* 광고 로드 전 레이아웃 흔들림(CLS) 방지용 최소 높이 */
.ad-top { min-height: 100px; }
.ad-in-content { min-height: 250px; }
.ad-bottom { min-height: 280px; }
.ad-sidebar { min-height: 250px; position: sticky; top: 80px; }
.ad-in-feed { min-height: 120px; }
/* 카드 그리드 안의 인피드 광고는 한 줄 전체 차지 */
.card-grid .ad-container { grid-column: 1 / -1; margin: 0; }
/* 정보 카드 안의 광고 (다운로드 버튼 자리) */
.sw-info-card .ad-container { margin: 1rem 0 0; }

@media (max-width: 768px) {
    .ad-container { margin: 1rem 0; }
    .ad-sidebar { position: static; }
}
