/* ===== Design Tokens ===== */
:root {
    --red: #CC0000;
    --red-dark: #A80000;
    --red-light: #FFF0F0;
    --black: #1A1A1A;
    --charcoal: #2E2E2E;
    --ink: #3D3D3D;
    --amber: #F5A623;
    --white: #FFFFFF;
    --bg: #F2F2F2;
    --surface: #FFFFFF;
    --border: #DCDCDC;
    --border-dark: #C0C0C0;
    --text-main: #1A1A1A;
    --text-body: #3D3D3D;
    --text-muted: #888888;
    --text-link: #CC0000;
    --radius: 4px;
    --radius-lg: 6px;
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.10);
    --max-w: 1200px;
    --gap: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text-body);
    font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ===== Layout ===== */
.g-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 14px;
}

.v-gap { margin: 6px 0; }

/* ===== Site Header ===== */
.top-nav {
    background: var(--white);
    border-bottom: 3px solid var(--red);
    box-shadow: var(--shadow-xs);
}

.top-nav .g-wrap {
    display: flex;
    align-items: center;
    padding-top: 9px;
    padding-bottom: 9px;
    gap: 16px;
    flex-wrap: nowrap;
}

.nav-brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-link:hover { text-decoration: none; }

.brand-wordmark {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--red);
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    line-height: 1;
    letter-spacing: -0.5px;
}

.url-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--red-light);
    border: 1px solid rgba(204,0,0,0.18);
    border-radius: var(--radius);
    padding: 4px 12px;
    white-space: nowrap;
}

.url-label {
    font-size: 0.70rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.url-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--red);
}

/* ===== Banner ===== */
.promo-bar {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.promo-bar img { width: 100%; display: block; }

/* ===== Category Navigation ===== */
.nav-grid-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--red);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.cat-strip {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}

.cat-strip:last-child { border-bottom: none; }

.strip-label {
    background: var(--red);
    color: var(--white);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5px;
    min-width: 15%;
    flex-shrink: 0;
    word-break: break-all;
    line-height: 1.3;
    text-transform: uppercase;
}

.strip-items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 4px 8px;
    flex: 1;
    gap: 0;
    background: var(--white);
}

.strip-items a {
    font-size: 12px;
    color: var(--text-main);
    text-decoration: none;
    padding: 5px 6px;
    border-radius: var(--radius);
    transition: background 0.13s, color 0.13s;
    white-space: nowrap;
    flex: 0 0 25%;
    text-align: center;
    font-weight: 500;
}

.strip-items a:hover {
    background: var(--red-light);
    color: var(--red);
    text-decoration: none;
}

.strip-items a.active {
    background: var(--red);
    color: var(--white);
    font-weight: 700;
    border-radius: var(--radius);
}

/* ===== Search ===== */
.search-bar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    box-shadow: var(--shadow-xs);
}

#news-search-form {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    align-items: center;
}

#news-search-form input[type="text"] {
    flex: 1;
    min-width: 140px;
    border: 1.5px solid var(--border-dark);
    border-radius: var(--radius);
    padding: 7px 12px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.14s, box-shadow 0.14s;
}

#news-search-form input[type="text"]::placeholder { color: var(--text-muted); }

#news-search-form input[type="text"]:focus {
    border-color: var(--red);
    background: var(--white);
    box-shadow: 0 0 0 2px rgba(204,0,0,0.10);
}

#news-search-form button {
    border: none;
    border-radius: var(--radius);
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.14s;
    background: var(--red);
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#news-search-form button:hover { background: var(--red-dark); }

/* ===== Hot Tags ===== */
.trending-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--red);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    box-shadow: var(--shadow-xs);
}

.trending-block h4 {
    font-size: 0.80rem;
    font-weight: 800;
    color: var(--red);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.trend-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.trend-list a {
    display: inline-block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 11px;
    font-size: 13px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.13s, border-color 0.13s, color 0.13s;
}

.trend-list a:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
    text-decoration: none;
}

/* ===== Content Section ===== */
.news-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    box-shadow: var(--shadow-xs);
}

.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--red);
}

.section-head::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: var(--red);
    border-radius: 2px;
    flex-shrink: 0;
}

.section-head h3,
.section-head h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-head h3 a,
.section-head h4 a { color: var(--text-main); text-decoration: none; }
.section-head h3 a:hover,
.section-head h4 a:hover { color: var(--red); }

.item-count {
    font-size: 0.76rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
}

/* ===== News Card Grid ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-grid li {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.news-grid li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--red);
}

.news-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: #e8e8e8;
    position: relative;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.20s;
}

.news-grid li:hover .news-thumb img {
    transform: scale(1.04);
}

.news-caption {
    padding: 7px 9px 9px;
    background: var(--white);
}

.news-caption h5 {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-caption h5 a {
    color: var(--text-main);
    text-decoration: none;
}

.news-caption h5 a:hover {
    color: var(--red);
    text-decoration: none;
}

/* ===== Detail Title ===== */
.article-title-band {
    background: var(--red);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    line-height: 1.8;
    text-align: center;
    font-size: 17px;
    word-break: break-all;
}

.article-title-band .cat-ref {
    color: rgba(255,255,255,0.80);
    font-weight: 700;
    margin-right: 8px;
    text-decoration: none;
}

.article-title-band b { color: var(--white); }

/* ===== Detail Specs ===== */
.article-specs {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--red);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    font-size: 15px;
    line-height: 2;
    color: var(--text-body);
    box-shadow: var(--shadow-xs);
}

/* ===== Capture ===== */
.cap-zone { margin-top: 12px; }

.cap-zone picture img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ===== Download Buttons ===== */
.dl-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.dl-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.14s, transform 0.10s;
}

.dl-action:hover {
    background: var(--red-dark);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ===== Client hint ===== */
.client-note {
    text-align: center;
    padding: 7px 0;
}

.client-note a {
    color: var(--red);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.client-note a:hover { text-decoration: underline; }

/* ===== Share bar ===== */
.share-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 9px 13px;
}

.share-caption {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.share-link-txt {
    flex: 1;
    font-size: 13px;
    color: var(--text-body);
    word-break: break-all;
}

.share-copy-action {
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    transition: background 0.13s;
}

.share-copy-action:hover { background: var(--red-dark); }

/* ===== Pagination ===== */
.page-nums {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 0;
}

.pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.pg:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
    text-decoration: none;
}

.pg-on {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
    font-weight: 800;
}

/* ===== Friend Links ===== */
.ext-links {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    box-shadow: var(--shadow-xs);
}

.ext-links h4 {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 7px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--red);
    display: inline-block;
}

.ext-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ext-list dl { display: contents; }
.ext-list dd { display: inline; margin: 0; }

.ext-list a {
    display: inline-block;
    font-size: 12px;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    text-decoration: none;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.ext-list a:hover {
    color: var(--red);
    border-color: var(--red);
    background: var(--red-light);
    text-decoration: none;
}

/* ===== Footer ===== */
.g-footer {
    background: var(--black);
    border-top: 3px solid var(--red);
    padding: 14px 0;
    margin-top: 8px;
}

.footer-note {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.38);
    letter-spacing: 0.02em;
}

/* ===== Utility ===== */
.clearfix::after { content: ''; display: table; clear: both; }

/* ===== Responsive ===== */
@media (max-width: 768px) {

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .strip-label {
        font-size: 10px;
        min-width: 15%;
        padding: 0 3px;
    }

    .strip-items { padding: 3px 4px; }

    .strip-items a {
        font-size: 12px;
        padding: 4px 3px;
        flex: 0 0 25%;
    }

    .article-title-band { font-size: 15px; padding: 11px 13px; }

    #news-search-form input[type="text"] { min-width: 110px; }
    #news-search-form button { padding: 7px 10px; font-size: 12px; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .strip-items a { font-size: 14px; }
    .strip-label { font-size: 10px; }
}

@media (min-width: 769px) {
    .strip-label {
        font-size: 13px;
        min-width: auto;
        padding: 0 16px;
    }
    .strip-items { padding: 5px 10px; }
    .strip-items a {
        font-size: 14px;
        flex: 1;
        padding: 5px 4px;
    }
}

@media (max-width: 768px) { .pc-only { display: none !important; } }
@media (min-width: 769px) { .mb-only { display: none !important; } }
