/* ============================================================
   TEMP-19 · 体育 · 杂志头版资讯站 模板样式
   排版体系：报头（masthead）→ 头版（front page）→ 比分带 → 数据条
             → 杂志分栏 → 时间轴赛况 → 侧栏榜单 → 图集横切 → 页脚
   配色体系：石墨黑底 + 电橙主色 + 麦黄辅色 + 石墨灰白点缀（纯 HTML5/CSS3，无框架、无外部字体、无 MIP 依赖）
   阅读优先：标题用系统衬线族，正文与 UI 用系统无衬线族；关闭 JS 不影响任何内容与导航
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
    --bg: #12100e;
    --bg2: #171411;
    --panel: #1e1a16;
    --panel2: #282119;
    --line: rgba(214, 207, 194, .16);
    --line2: rgba(255, 106, 31, .42);
    --txt: #f3efe8;
    --muted: #a89f92;
    --brand: #ff6a1f;
    --brand-dim: rgba(255, 106, 31, .14);
    --gold: #ffc857;
    --ash: #d6cfc2;
    --ink: #12100e;
    --serif: Georgia, 'Times New Roman', 'Songti SC', 'Noto Serif CJK SC', STSong, serif;
    --sans: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --radius: 3px;
    --maxw: 1240px;
    --shadow: 0 18px 44px rgba(0, 0, 0, .42);
    --hairline: 1px solid var(--line);
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--txt);
    font: 400 16px/1.72 var(--sans);
    overflow-x: hidden;
    /* 纸质颗粒：两层极淡渐变，无图片依赖 */
    background-image:
        radial-gradient(900px 460px at 12% -8%, rgba(255, 106, 31, .07), transparent 60%),
        radial-gradient(760px 420px at 92% 4%, rgba(255, 200, 87, .05), transparent 55%);
    background-attachment: fixed;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.22; margin: 0 0 10px; letter-spacing: .2px; }
h1 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h2 { font-size: clamp(1.24rem, 2.3vw, 1.62rem); }
h3 { font-size: 1.08rem; }
h4 { font-size: .96rem; }
p { margin: 0 0 14px; }
a { color: var(--txt); text-decoration: none; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
a:hover { color: var(--brand); }
ul, ol { margin: 0 0 14px; padding-left: 20px; }
img { display: block; max-width: 100%; height: auto; }
time { font-variant-numeric: tabular-nums; }
::selection { background: var(--brand); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.sr-only:focus {
    position: fixed; left: 14px; top: 14px; width: auto; height: auto; margin: 0;
    clip: auto; overflow: visible; z-index: 999; padding: 9px 16px;
    background: var(--brand); color: var(--ink); border-radius: var(--radius); font-weight: 700;
}

/* ---------- 3. 通用版式构件 ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 46px 0; }
.section.alt { background: var(--bg2); border-top: var(--hairline); border-bottom: var(--hairline); }
.section-head {
    display: flex; flex-wrap: wrap; gap: 14px 20px;
    align-items: flex-end; justify-content: space-between;
    padding-bottom: 14px; margin-bottom: 26px;
    border-bottom: 2px solid var(--brand);
}
.section-head .sh-mark {
    font: 700 .74rem/1 var(--mono); letter-spacing: 1.6px; color: var(--brand);
    display: block; margin-bottom: 8px;
}
.section-head h2 { margin: 0; }
.section-head .sh-sub { margin: 6px 0 0; color: var(--muted); font-size: .86rem; }
.section-head .more {
    font-size: .82rem; font-weight: 700; letter-spacing: .6px;
    padding: 8px 16px; border: 1px solid var(--line2); border-radius: var(--radius); color: var(--ash);
    white-space: nowrap;
}
.section-head .more:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.kicker {
    display: inline-block; font: 700 .7rem/1 var(--sans); letter-spacing: 1.7px;
    text-transform: uppercase; color: var(--brand);
}
/* 按钮：实心 / 描边两态，纯色块无渐变（杂志感） */
.btn-solid, .btn-line {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px; border-radius: var(--radius);
    font: 700 .86rem/1.3 var(--sans); letter-spacing: .4px;
    border: 1px solid transparent; cursor: pointer;
}
.btn-solid { background: var(--brand); color: var(--ink); }
.btn-solid:hover { background: var(--gold); color: var(--ink); }
.btn-line { border-color: var(--line2); color: var(--ash); background: transparent; }
.btn-line:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 4. 阅读进度条（JS 覆写宽度；关闭 JS 时高度为 0 不占位） ---------- */
.progress {
    position: fixed; inset: 0 0 auto 0; height: 0; width: 0; z-index: 60;
    background: var(--brand); transition: width .12s linear;
}
.progress.on { height: 3px; }

/* ---------- 5. 报头 masthead（刊名上方的报纸式日期线） ---------- */
.masthead { border-bottom: var(--hairline); background: rgba(18, 16, 14, .9); }
.masthead .mh-inner {
    display: flex; flex-wrap: wrap; gap: 8px 20px;
    align-items: center; justify-content: space-between;
    padding: 9px 0; font-size: .78rem; color: var(--muted);
}
.masthead .mh-issue { letter-spacing: 1.4px; text-transform: uppercase; font-family: var(--mono); }
.masthead .mh-issue b { color: var(--gold); font-weight: 700; }
.masthead .mh-date { font-family: var(--mono); letter-spacing: .4px; }
.masthead .mh-links { display: flex; flex-wrap: wrap; gap: 14px; }
.masthead .mh-links a { color: var(--muted); font-size: .78rem; }
.masthead .mh-links a:hover { color: var(--brand); }

/* ---------- 6. 头部与导航 ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(23, 20, 17, .94);
    backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
    border-bottom: var(--hairline);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; padding: 14px 0; position: relative;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 2px;
    display: grid; place-items: center;
    background: var(--brand); color: var(--ink);
    font: 900 .82rem/1 var(--mono); letter-spacing: -.6px;
}
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--serif); font-size: 1.22rem; font-weight: 700; line-height: 1.15;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw;
}
.brand-sub {
    font: 700 .6rem/1.4 var(--mono); letter-spacing: 2.2px;
    text-transform: uppercase; color: var(--muted); margin-top: 3px;
}
.main-nav ul { display: flex; flex-wrap: wrap; gap: 4px 4px; margin: 0; padding: 0; list-style: none; }
.main-nav a {
    display: block; padding: 9px 15px; font-size: .88rem; font-weight: 600;
    color: var(--ash); border-bottom: 2px solid transparent; letter-spacing: .3px;
}
.main-nav a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.main-nav li.active a { color: var(--brand); border-bottom-color: var(--brand); }
.header-cta {
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    padding: 9px 18px; border: 1px solid var(--line2); border-radius: var(--radius);
    font: 700 .8rem/1 var(--sans); letter-spacing: .8px; color: var(--ash);
}
.header-cta i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.header-cta:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.header-cta:hover i { background: var(--ink); }
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    width: 44px; height: 40px; padding: 11px 10px;
    background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ash); border-radius: 2px; }
.nav-close {
    display: none; width: 100%; text-align: right; background: none; border: 0;
    color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 6px 0 14px;
}

/* ---------- 7. 头版 front page ---------- */
.front { padding: 40px 0 34px; border-bottom: var(--hairline); }
.front-title {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
    margin: 0 0 24px; padding-bottom: 14px; border-bottom: 2px solid var(--brand);
    font-size: clamp(1.06rem, 2vw, 1.42rem);
}
.front-title .kicker { flex: 0 0 auto; }
.front-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 34px; }
.lead { min-width: 0; }
.lead-media { position: relative; display: block; overflow: hidden; border-radius: var(--radius); }
.lead-media img { width: 100%; height: clamp(230px, 32vw, 420px); object-fit: cover; }
.lead-media:hover img { transform: scale(1.02); }
.lead-media img { transition: transform .5s ease; }
.lead-badge {
    position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 2px;
    background: var(--brand); color: var(--ink);
    font: 700 .7rem/1 var(--sans); letter-spacing: 1.4px; text-transform: uppercase;
}
.lead-body { padding-top: 18px; }
.lead-title { margin: 8px 0 12px; font-size: clamp(1.5rem, 3.1vw, 2.35rem); }
.lead-title a { color: var(--txt); }
.lead-title a:hover { color: var(--brand); }
.lead-dek { color: var(--muted); font-size: .96rem; margin: 0 0 14px; max-width: 62ch; }
.byline {
    display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
    padding-top: 12px; border-top: var(--hairline);
    font: 600 .78rem/1 var(--mono); letter-spacing: .4px; color: var(--muted);
}
.byline a { color: var(--brand); }
.byline .bl-sep { color: var(--line); }

/* 头版右栏：3 条副条 + 文字速报 */
.second { min-width: 0; border-left: var(--hairline); padding-left: 30px; }
.brief-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: var(--hairline); }
.brief-card:last-of-type { border-bottom: 0; }
.brief-card .bc-media { display: block; overflow: hidden; border-radius: var(--radius); }
.brief-card img { width: 100%; height: 76px; object-fit: cover; }
.brief-card .bc-title { font-size: .96rem; margin: 5px 0 5px; line-height: 1.34; }
.brief-card .bc-title a { color: var(--txt); }
.brief-card .bc-title a:hover { color: var(--brand); }
.brief-card .bc-meta { font: 600 .72rem/1 var(--mono); color: var(--muted); letter-spacing: .4px; }
.brief-list {
    margin: 22px 0 0; padding: 16px 0 0; border-top: 2px solid var(--line2); list-style: none;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 26px;
}
.brief-list li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 7px 0; font-size: .86rem; }
.brief-list .bl-time { color: var(--gold); font: 700 .74rem/1.7 var(--mono); }
.brief-list .bl-txt { min-width: 0; }
.brief-list a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ash); }
.brief-list a:hover { color: var(--brand); }
.second-foot { margin-top: 16px; font-size: .82rem; }
.second-foot a { color: var(--brand); font-weight: 700; }

/* ---------- 8. 比分速报带（横向可滑，无 JS 也可读） ---------- */
.score-strip { border-bottom: var(--hairline); background: var(--panel); }
.ss-inner { display: flex; align-items: stretch; gap: 0; }
.ss-label {
    flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
    padding: 12px 18px 12px 0; margin-right: 18px;
    border-right: var(--hairline);
    font: 700 .74rem/1 var(--mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--brand);
}
.ss-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: live 1.8s ease-in-out infinite; }
.ss-track {
    display: flex; gap: 12px; overflow-x: auto; padding: 12px 0;
    scrollbar-width: thin; scroll-snap-type: x proximity;
}
.ss-item {
    flex: 0 0 auto; scroll-snap-align: start;
    display: flex; flex-direction: column; gap: 3px;
    min-width: 220px; max-width: 300px; padding: 9px 15px;
    border: var(--hairline); border-radius: var(--radius); background: var(--bg2);
}
.ss-item:hover { border-color: var(--line2); }
.ss-time { font: 700 .7rem/1 var(--mono); color: var(--gold); letter-spacing: .6px; }
.ss-title { font-size: .84rem; line-height: 1.45; color: var(--txt); }
.ss-title a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-tag { font-size: .7rem; color: var(--muted); letter-spacing: .6px; }
@keyframes live { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- 9. 数据条 facts ---------- */
.facts-band { padding: 16px 0 18px; border-bottom: var(--hairline); background: var(--bg2); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.fact { padding: 22px 18px; border-left: var(--hairline); text-align: center; }
.fact:first-child { border-left: 0; }
.fact b { display: block; font: 700 1.6rem/1.1 var(--serif); color: var(--brand); letter-spacing: .5px; }
.fact span { display: block; margin-top: 6px; font-size: .78rem; color: var(--muted); letter-spacing: 1px; }

/* ---------- 10. 杂志分栏网格 ---------- */
.mag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 26px; }
.mag-item {
    display: flex; flex-direction: column; min-width: 0;
    padding-bottom: 20px; border-bottom: var(--hairline);
}
.mag-item.wide { grid-column: span 2; }
.mi-media { display: block; overflow: hidden; border-radius: var(--radius); margin-bottom: 13px; }
.mi-media img { width: 100%; height: 178px; object-fit: cover; transition: transform .5s ease; }
.mag-item:hover .mi-media img { transform: scale(1.04); }
.mag-item.wide .mi-media img { height: 244px; }
.mi-title { font-size: 1.04rem; margin: 7px 0 8px; line-height: 1.32; }
.mi-title a { color: var(--txt); }
.mi-title a:hover { color: var(--brand); }
.mi-excerpt {
    margin: 0; color: var(--muted); font-size: .86rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mi-meta {
    display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 11px;
    font: 600 .74rem/1 var(--mono); letter-spacing: .4px; color: var(--muted);
}
.mi-meta .mi-cat { color: var(--gold); }
.mi-meta .mi-hot { margin-left: auto; color: var(--brand); }
.mi-num { font: 700 .72rem/1 var(--mono); color: var(--brand); letter-spacing: 1px; }

/* 行式列表（栏目页/侧栏通用，纯排版无卡片） */
.post-rows { list-style: none; margin: 0; padding: 0; }
.post-row {
    display: grid; grid-template-columns: 78px minmax(0, 1fr) 108px; gap: 18px; align-items: center;
    padding: 16px 0; border-bottom: var(--hairline);
}
.post-row:last-child { border-bottom: 0; }
.post-row .pr-media { display: block; overflow: hidden; border-radius: var(--radius); }
.post-row .pr-media img { width: 100%; height: 60px; object-fit: cover; }
.post-row .pr-title { font-size: .98rem; margin: 0 0 5px; line-height: 1.34; }
.post-row .pr-title a { color: var(--txt); }
.post-row .pr-title a:hover { color: var(--brand); }
.post-row .pr-ex { margin: 0; font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-row .pr-side { text-align: right; font: 600 .74rem/1.7 var(--mono); color: var(--muted); }
.post-row .pr-side a { color: var(--gold); }

/* ---------- 11. 时间轴赛况流 ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--brand), rgba(255, 106, 31, .06)); }
.tl-group { margin-bottom: 26px; }
.tl-group:last-child { margin-bottom: 0; }
.tl-day {
    position: relative; display: inline-block; margin-bottom: 10px;
    font: 700 .78rem/1 var(--mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold);
}
.tl-day::before {
    content: ''; position: absolute; left: -26px; top: 1px; width: 12px; height: 12px;
    border-radius: 50%; background: var(--bg); border: 2px solid var(--brand);
}
.tl-list { position: relative; display: grid; }
.tl-item { position: relative; display: grid; gap: 4px; padding: 12px 0 12px 0; border-bottom: 1px dashed var(--line); }
.tl-item:last-child { border-bottom: 0; }
.tl-item::before {
    content: ''; position: absolute; left: -25px; top: 20px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--panel2); border: 2px solid var(--line2);
}
.tl-time { font: 700 .74rem/1 var(--mono); color: var(--brand); letter-spacing: .6px; }
.tl-title { font-size: .98rem; margin: 0; line-height: 1.36; }
.tl-title a { color: var(--txt); }
.tl-title a:hover { color: var(--brand); }
.tl-note { margin: 0; font-size: .82rem; color: var(--muted); }
.tl-cat { font-size: .72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); font-family: var(--mono); }

/* ---------- 12. 主体双栏 & 侧栏 rail ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 40px; align-items: start; }
.layout-main { min-width: 0; }
.rail { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 92px; }
.widget { padding: 20px; border: var(--hairline); border-radius: var(--radius); background: var(--panel); }
.widget > h3 {
    display: flex; align-items: baseline; gap: 10px;
    margin: 0 0 14px; padding-bottom: 11px; border-bottom: 2px solid var(--brand);
    font-size: 1rem; letter-spacing: .4px;
}
.widget > h3 .w-mark { font: 700 .68rem/1 var(--mono); color: var(--brand); letter-spacing: 1.4px; margin-left: auto; }
.widget .w-more { margin-top: 12px; font-size: .8rem; }
.widget .w-more a { color: var(--brand); font-weight: 700; }
.widget-cta { background: var(--panel2); border-color: var(--line2); }
.widget-cta p { color: var(--muted); font-size: .84rem; }

.news-lines { list-style: none; margin: 0; padding: 0; }
.news-lines li {
    display: grid; grid-template-columns: 46px minmax(0, 1fr) 40px; gap: 9px; align-items: baseline;
    padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .86rem;
}
.news-lines li:last-child { border-bottom: 0; }
.news-lines .no { color: var(--brand); font: 700 .74rem/1.6 var(--mono); letter-spacing: .4px; }
.news-lines .t { min-width: 0; }
.news-lines .t a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ash); }
.news-lines .t a:hover { color: var(--brand); }
.news-lines time { color: var(--muted); font-size: .72rem; text-align: right; font-family: var(--mono); }

/* 积分榜 / 热度榜表格 */
.board { border: var(--hairline); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.board-head, .board-row {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 56px 62px;
    gap: 10px; align-items: center; padding: 11px 14px;
}
.board-head {
    background: var(--panel2); border-bottom: 1px solid var(--line2);
    font: 700 .72rem/1 var(--mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--ash);
}
.board-head .bh-pos, .board-head .bh-pts, .board-head .bh-rec { text-align: center; }
.board-head .bh-team { min-width: 0; }
.board-body { display: grid; }
.board-row { border-bottom: var(--hairline); color: var(--txt); font-size: .88rem; }
.board-row:last-child { border-bottom: 0; }
.board-row:hover { background: var(--bg2); }
.board-row .br-pos { text-align: center; font: 700 .86rem/1 var(--mono); color: var(--muted); }
.board-row .br-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .br-pts { text-align: center; font: 700 .92rem/1 var(--mono); color: var(--gold); }
.board-row .br-rec { text-align: center; font: 600 .74rem/1 var(--mono); color: var(--muted); }
.board-row.top3 .br-pos { color: var(--brand); }
.board-empty { padding: 22px 18px; color: var(--muted); font-size: .86rem; }
.board-empty a { color: var(--brand); }

/* 热度排行（侧栏序号版） */
.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rk; }
.rank-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) 52px; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .86rem; }
.rank-item:last-child { border-bottom: 0; }
.rank-item .ri-no { color: var(--brand); font: 700 .8rem/1.6 var(--mono); }
.rank-item .ri-txt { min-width: 0; }
.rank-item .ri-txt a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ash); }
.rank-item .ri-txt a:hover { color: var(--brand); }
.rank-item .ri-num { text-align: right; font: 600 .74rem/1.6 var(--mono); color: var(--muted); }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    border: var(--hairline); border-radius: var(--radius); background: var(--bg2);
    font-size: .8rem; color: var(--ash);
}
.tag-cloud a:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.tag-cloud .tc-num { font: 700 .68rem/1 var(--mono); color: var(--gold); }
.tag-cloud a:hover .tc-num { color: var(--ink); }
.tag-cloud-wrap { padding: 24px; border: var(--hairline); border-radius: var(--radius); background: var(--panel); }
.cloud-tip { margin: 16px 0 0; font-size: .84rem; color: var(--muted); }
.cloud-tip b { color: var(--brand); }

/* ---------- 13. 图集横切（scroll-snap，无 JS 也能滚动） ---------- */
.gallery { position: relative; }
.gal-track {
    display: flex; gap: 14px; overflow-x: auto; padding: 4px 0 14px;
    scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.gal-item { flex: 0 0 auto; width: 260px; position: relative; overflow: hidden; border-radius: var(--radius); border: var(--hairline); scroll-snap-align: start; }
.gal-item img { width: 100%; height: 172px; object-fit: cover; transition: transform .5s ease; }
.gal-item:hover img { transform: scale(1.05); }
.g-cap {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px;
    font-size: .78rem; background: linear-gradient(transparent, rgba(18, 16, 14, .92));
}
.gal-tip { margin: 10px 0 0; font-size: .84rem; color: var(--muted); }
.gal-tip a { color: var(--brand); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 4px 0 6px; }
.gallery-grid a { position: relative; display: block; overflow: hidden; border-radius: var(--radius); border: var(--hairline); }
.gallery-grid img { width: 100%; height: 190px; object-fit: cover; transition: transform .45s ease; }
.gallery-grid a:hover img { transform: scale(1.06); }

/* ---------- 14. CTA 版尾 ---------- */
.cta-band {
    display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
    padding: 28px; border: 1px solid var(--line2); border-radius: var(--radius);
    background: var(--panel2);
}
.cta-text { min-width: 0; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--muted); font-size: .86rem; letter-spacing: .4px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 15. 页脚 ---------- */
.site-footer { border-top: 2px solid var(--brand); background: var(--bg2); padding: 40px 0 0; margin-top: 8px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 30px; padding-bottom: 30px; }
.footer-brand .fb-logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.16rem; font-weight: 700; margin-bottom: 12px; }
.footer-brand .fb-logo i {
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 2px; font-style: normal;
    background: var(--brand); color: var(--ink); font: 900 .68rem/1 var(--mono);
}
.footer-brand .fb-desc { color: var(--muted); font-size: .84rem; margin: 0 0 8px; }
.footer-brand .fb-kw { color: var(--muted); font-size: .78rem; margin: 0; }
.footer-brand .fb-kw b { color: var(--gold); font-weight: 700; }
.site-footer h4 { margin: 0 0 12px; font-size: .84rem; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ash); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { padding: 5px 0; font-size: .84rem; color: var(--muted); }
.site-footer ul a { color: var(--muted); }
.site-footer ul a:hover { color: var(--brand); }
.friend-link { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 14px 0; border-top: var(--hairline); font-size: .8rem; color: var(--muted); }
.friend-link a { color: var(--muted); }
.friend-link a:hover { color: var(--brand); }
.footer-bottom {
    display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; text-align: center;
    padding: 16px 0; border-top: var(--hairline); font-size: .78rem; color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--brand); }
.back-to-top {
    position: fixed; right: 18px; bottom: 18px; z-index: 40;
    width: 44px; height: 44px; display: grid; place-items: center;
    border: 1px solid var(--line2); border-radius: 2px; background: var(--panel);
    color: var(--ash); font-size: 1.1rem; opacity: 0; visibility: hidden; transition: opacity .25s ease, background-color .2s ease;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--brand); color: var(--ink); }

/* ---------- 16. 内页通用：面包屑 / 页头 ---------- */
main { display: block; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; list-style: none; margin: 0; padding: 16px 0 0; font-size: .8rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: rgba(168, 159, 146, .5); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.page-head {
    display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; justify-content: space-between;
    padding: 18px 0 16px; margin: 6px 0 26px; border-bottom: 2px solid var(--brand);
}
.page-head h1 { margin: 0 0 6px; }
.page-head .sub { margin: 0; color: var(--muted); font-size: .88rem; max-width: 72ch; }
.page-head .head-flag {
    font: 700 .7rem/1 var(--mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink);
    background: var(--gold); padding: 7px 12px; border-radius: 2px; white-space: nowrap;
}

/* ---------- 17. 文章正文排版（杂志长文） ---------- */
.article-wrap { min-width: 0; }
.article-title { font-size: clamp(1.55rem, 3.4vw, 2.5rem); margin: 4px 0 14px; }
.article-meta {
    display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
    padding-bottom: 14px; margin-bottom: 22px; border-bottom: var(--hairline);
    font: 600 .78rem/1.5 var(--mono); letter-spacing: .4px; color: var(--muted);
}
.article-meta a { color: var(--brand); }
.article-meta a:hover { color: var(--gold); }
.article-lead {
    margin: 0 0 22px; padding: 16px 20px; border-left: 3px solid var(--brand);
    background: var(--panel); font-size: .96rem; color: var(--ash);
}
.article-content { font-size: 1rem; }
.article-content > p:first-of-type::first-letter {
    float: left; font-family: var(--serif); font-size: 3.1em; line-height: .84;
    padding: 4px 10px 0 0; color: var(--brand);
}
.article-content p { margin: 0 0 17px; }
.article-content h2 { margin: 30px 0 12px; padding-left: 13px; border-left: 3px solid var(--brand); font-size: 1.28rem; }
.article-content h3 { margin: 24px 0 10px; font-size: 1.08rem; color: var(--gold); }
.article-content h4 { margin: 20px 0 8px; font-size: 1rem; }
.article-content ul, .article-content ol { margin: 0 0 17px; padding-left: 22px; }
.article-content li { margin-bottom: 7px; }
.article-content img {
    width: 100%; height: auto; margin: 22px 0 10px; border-radius: var(--radius);
    border: var(--hairline); background: var(--panel);
}
.article-content figure { margin: 22px 0; }
.article-content figcaption { font-size: .8rem; color: var(--muted); font-family: var(--mono); }
.article-content blockquote {
    margin: 22px 0; padding: 16px 20px; border-left: 3px solid var(--gold);
    background: var(--panel); color: var(--ash); font-family: var(--serif); font-size: 1.02rem;
}
.article-content table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .9rem; }
.article-content th, .article-content td { padding: 10px 12px; border: var(--hairline); text-align: left; }
.article-content th { background: var(--panel2); color: var(--ash); font-weight: 700; letter-spacing: .4px; }
.article-content tbody tr:nth-child(even) { background: rgba(30, 26, 22, .6); }
.article-content pre {
    overflow-x: auto; padding: 16px; margin: 22px 0; border: var(--hairline); border-radius: var(--radius);
    background: var(--panel2); font-family: var(--mono); font-size: .84rem;
}
.article-content code { font-family: var(--mono); font-size: .88em; padding: 2px 6px; border-radius: 2px; background: var(--brand-dim); color: var(--gold); }
.article-content a { color: var(--brand); border-bottom: 1px solid var(--line2); }
.article-content a:hover { color: var(--gold); }
.article-content hr { border: 0; border-top: var(--hairline); margin: 26px 0; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.article-tags a {
    padding: 5px 13px; border: var(--hairline); border-radius: 2px; background: var(--bg2);
    font-size: .78rem; color: var(--ash);
}
.article-tags a::before { content: '#'; color: var(--brand); margin-right: 3px; }
.article-tags a:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.updown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.updown a {
    display: flex; flex-direction: column; gap: 5px; padding: 15px 18px;
    border: var(--hairline); border-radius: var(--radius); background: var(--panel); font-size: .86rem;
}
.updown a:hover { border-color: var(--line2); }
.updown a > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ud-label { color: var(--muted); font: 700 .7rem/1 var(--mono); letter-spacing: 1.4px; text-transform: uppercase; }
.rel-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rel-item { min-width: 0; }
.rel-item a { display: block; }
.rel-item img { width: 100%; height: 128px; object-fit: cover; border-radius: var(--radius); margin-bottom: 9px; }
.rel-item h3 { font-size: .92rem; margin: 0; line-height: 1.35; }
.rel-item span { display: block; margin-top: 5px; font: 600 .72rem/1 var(--mono); color: var(--muted); }

/* ---------- 18. 搜索 / 表单 / 分页 ---------- */
.search-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.search-form input[type="text"] {
    flex: 1; min-width: 210px; padding: 12px 16px;
    border: 1px solid var(--line2); border-radius: var(--radius);
    background: var(--panel); color: var(--txt); font: 400 .92rem var(--sans);
}
.search-form input[type="text"]::placeholder { color: rgba(168, 159, 146, .78); }
.search-form input[type="submit"] {
    padding: 12px 28px; border: 0; border-radius: var(--radius); cursor: pointer;
    background: var(--brand); color: var(--ink); font: 700 .88rem var(--sans); letter-spacing: .6px;
}
.search-form input[type="submit"]:hover { background: var(--gold); }
.search-box { max-width: 620px; }
.pagebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 28px; font-size: .86rem; }
.pagebar a, .pagebar span {
    display: inline-block; min-width: 38px; padding: 8px 12px; text-align: center;
    border: var(--hairline); border-radius: 2px; background: var(--panel); color: var(--ash);
}
.pagebar a:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.pagebar .current, .pagebar .active { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }
.pagebar .disabled { opacity: .45; }
.pagebar .page-control { width: 100%; }
.pagebar .pagination { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 0; padding: 0; list-style: none; }
.pagebar .page-item { list-style: none; }
.pagebar .page-item > a, .pagebar .page-item > span {
    display: inline-block; min-width: 38px; padding: 8px 12px; text-align: center;
    border: var(--hairline); border-radius: 2px; background: var(--panel); color: var(--ash);
}
.pagebar .page-item > a:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.pagebar .page-item.active > span, .pagebar .page-item > .current { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }

/* ---------- 19. 空态 / 404 ---------- */
.empty-state {
    padding: 30px 24px; border: 1px dashed var(--line2); border-radius: var(--radius);
    background: var(--panel); color: var(--muted); font-size: .9rem;
}
.empty-state a { color: var(--brand); }
.error-404 {
    margin-top: 24px; padding: 56px 20px; text-align: center;
    border: var(--hairline); border-radius: var(--radius); background: var(--panel);
}
.error-404 .code { font: 900 4.2rem/1 var(--serif); letter-spacing: 6px; color: var(--brand); }
.error-404 h1 { margin: 12px 0 8px; font-size: 1.5rem; }
.error-404 p { color: var(--muted); margin-bottom: 22px; }
.e-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.two-block { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

/* ---------- 20. 自定义单页（关于/联系/示例） ---------- */
.diy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 20px 0; }
.diy-card { padding: 20px; border: var(--hairline); border-radius: var(--radius); background: var(--panel); }
.diy-card h3 { margin-top: 0; }
.diy-card p { margin: 0; font-size: .88rem; color: var(--muted); }
.info-list { list-style: none; margin: 0 0 18px; padding: 0; }
.info-list li { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 11px 0; border-bottom: var(--hairline); font-size: .9rem; }
.info-list li b { flex: 0 0 96px; color: var(--gold); font-weight: 700; }
.contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0 24px; }
.contact-cards a { display: block; padding: 18px; border: var(--hairline); border-radius: var(--radius); background: var(--panel); }
.contact-cards a:hover { border-color: var(--line2); background: var(--panel2); }
.contact-cards span { display: block; font: 700 .72rem/1 var(--mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.contact-cards p { margin: 0; font-size: .86rem; color: var(--muted); word-break: break-all; }

/* ---------- 21. 响应式 ---------- */
@media (max-width: 1080px) {
    .front-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .second { border-left: 0; padding-left: 0; border-top: 2px solid var(--line2); padding-top: 18px; }
    .layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .rail { position: static; flex-direction: row; flex-wrap: wrap; }
    .rail > * { flex: 1 1 300px; }
    .mag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .header-inner { flex-wrap: wrap; padding: 11px 0; }
    .brand-name { max-width: 58vw; font-size: 1.08rem; }
    .nav-toggle { display: flex; order: 3; }
    .header-cta { display: none; }
    .main-nav {
        position: fixed; inset: 0 0 0 auto; z-index: 70;
        width: min(84vw, 340px); padding: 68px 22px 24px;
        background: var(--bg2); border-left: 2px solid var(--brand);
        transform: translateX(102%); transition: transform .3s ease;
        overflow-y: auto;
    }
    .main-nav.open { transform: translateX(0); }
    .main-nav.open ul { flex-direction: column; gap: 0; }
    .main-nav ul { display: flex; flex-direction: column; }
    .main-nav a { padding: 13px 0; border-bottom: var(--hairline); border-left: 0; font-size: 1rem; }
    .nav-close { display: block; position: absolute; top: 16px; right: 22px; width: auto; text-align: right; }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fact:nth-child(3) { border-left: 0; }
    .fact { border-top: var(--hairline); }
    .fact:first-child, .fact:nth-child(2) { border-top: 0; }
    .post-row { grid-template-columns: 66px minmax(0, 1fr); }
    .post-row .pr-side { grid-column: 2; text-align: left; }
    .two-block, .diy-grid, .contact-cards { grid-template-columns: minmax(0, 1fr); }
    .masthead .mh-inner { font-size: .72rem; }
    .masthead .mh-links { gap: 10px; }
}

@media (max-width: 560px) {
    .container { padding: 0 15px; }
    .section { padding: 32px 0; }
    .mag-grid, .gallery-grid, .rel-list, .updown { grid-template-columns: minmax(0, 1fr); }
    .brief-list { grid-template-columns: minmax(0, 1fr); }
    .front-title { font-size: 1.02rem; }
    .mag-item.wide { grid-column: span 1; }
    .mag-item.wide .mi-media img { height: 178px; }
    .lead-media img { height: 208px; }
    .front { padding: 26px 0 24px; }
    .brief-card { grid-template-columns: 78px minmax(0, 1fr); }
    .brief-card img { height: 62px; }
    .ss-item { min-width: 190px; }
    .board-head, .board-row { grid-template-columns: 32px minmax(0, 1fr) 44px; }
    .bh-rec, .br-rec { display: none; }
    .gal-item { width: 214px; }
    .gal-item img { height: 142px; }
    .cta-band { padding: 20px; }
    .error-404 .code { font-size: 3rem; letter-spacing: 3px; }
    .error-404 { padding: 40px 16px; }
    .article-content > p:first-of-type::first-letter { font-size: 2.6em; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

@media (min-width: 861px) {
    .main-nav .nav-close { display: none !important; }
}

/* 尊重系统减动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
    .ss-label i { animation: none; }
}

/* 打印：保留内容与链接文字，去掉装饰与侧栏 */
@media print {
    body { background: #fff; color: #000; }
    .masthead, .site-header, .score-strip, .rail, .site-footer, .back-to-top, .progress,
    .cta-band, .gallery, .nav-toggle, .search-form, .pagebar { display: none !important; }
    .container { max-width: none; padding: 0; }
    a { color: #000; border: 0; }
    .article-content { font-size: 11pt; }
}
