/* 方案 A - 杂志/编辑风 */
:root {
  --bg: #f5f2ed;
  --card: #fff;
  --surface: #fff;
  --text: #1c1c1c;
  --muted: #555;
  --text-muted: #555;
  --border: #ddd9d0;
  --accent: #c9a227;
  --accent-hover: #6b5b2e;
  --header-bg: #1c1c1c;
  --header-text: #f5f2ed;
  --header-link: rgba(245,242,237,0.9);
  --header-border: rgba(255,255,255,0.15);
  --header-hover: rgba(255,255,255,0.08);
}
[data-theme="dark"] {
  --bg: #1c1c1c;
  --card: #2a2a2a;
  --surface: #2a2a2a;
  --text: #f5f2ed;
  --muted: #a0a0a0;
  --text-muted: #a0a0a0;
  --border: #444;
  --accent: #c9a227;
  --accent-hover: #d4af37;
  --header-bg: #1c1c1c;
  --header-text: #f5f2ed;
  --header-link: rgba(245,242,237,0.9);
  --header-border: rgba(255,255,255,0.15);
  --header-hover: rgba(255,255,255,0.08);
}
[data-theme="light"] {
  --header-bg: var(--card);
  --header-text: var(--text);
  --header-link: var(--text);
  --header-border: var(--border);
  --header-hover: rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Georgia", "Songti SC", serif; background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px; min-height: 100vh; }

.skip-link { position: absolute; left: -9999px; z-index: 9999; padding: 8px 16px; background: var(--accent); color: #1c1c1c; }
.skip-link:focus { left: 0; }

/* ========== 顶栏 - 杂志风 ========== */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--header-bg); color: var(--header-text); border-bottom: 3px solid var(--accent); }
.header-inner { max-width: 1120px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--header-text); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.05em; font-family: "Georgia", serif; }
.site-logo:hover { color: var(--accent); }
.site-logo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 4px; }
.site-title { color: inherit; }
.site-nav { display: flex; gap: 0; flex-wrap: wrap; }
.site-nav a { padding: 8px 20px; color: var(--header-link); text-decoration: none; font-size: 0.9rem; border-right: 1px solid var(--header-border); }
.site-nav a:last-child { border-right: none; }
.site-nav a:hover { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 8px; }
.theme-btn { background: none; border: none; cursor: pointer; font-size: 1.2rem; padding: 6px; line-height: 1; color: var(--header-text); }
.menu-btn { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; padding: 8px; background: none; border: 1px solid var(--header-border); border-radius: 6px; cursor: pointer; align-items: center; justify-content: center; font-size: 0.85rem; color: var(--header-text); }
.menu-btn span { display: block; width: 100%; height: 2px; background: currentColor; border-radius: 1px; }
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 101; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.nav-overlay.on { opacity: 1; pointer-events: auto; }
.nav-mobile { display: none; position: fixed; top: 0; right: 0; width: 260px; max-width: 85vw; height: 100vh; background: var(--header-bg); border-left: 1px solid var(--accent); z-index: 102; padding: 0; padding-top: 56px; padding-bottom: 20px; flex-direction: column; gap: 4px; transform: translateX(100%); transition: transform 0.25s; overflow-y: auto; }
.nav-mobile.on { transform: translateX(0); }
.nav-mobile-header { position: absolute; top: 0; left: 0; right: 0; height: 56px; padding: 8px 16px; display: flex; align-items: center; justify-content: flex-end; flex-shrink: 0; border-bottom: 1px solid var(--header-border); }
.nav-mobile-close { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; background: none; border: 1px solid var(--header-border); border-radius: 6px; cursor: pointer; font-size: 0.9rem; color: var(--header-text); }
.nav-mobile-close:hover { color: var(--accent); border-color: var(--accent); }
.nav-mobile a { display: block; padding: 12px 20px; color: var(--header-text); text-decoration: none; border-radius: 6px; }
.nav-mobile a:hover { color: var(--accent); background: var(--header-hover); }
.nav-mobile-theme { margin-top: auto; margin-bottom: 24px; padding: 16px 20px 0; border-top: 1px solid var(--header-border); flex-shrink: 0; }
.theme-btn-mobile { font-size: 1.25rem; color: var(--header-text); min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 768px) {
  .nav-mobile { display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom, 20px); }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .menu-btn { display: flex; }
  .nav-mobile { display: flex; }
}

/* ========== 主内容区 ========== */
.main-wrap { max-width: 1120px; margin: 0 auto; padding: 32px 24px 48px; min-height: 60vh; }

/* ========== 首页 - 板块布局 ========== */
.page-home { padding: 0 0 24px; }
.hero { text-align: center; padding: 28px 0 36px; border-bottom: 2px solid var(--border); margin-bottom: 36px; }
.hero-title { font-size: 2.25rem; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 12px; }
.hero-desc { font-size: 1rem; color: var(--muted); max-width: 520px; margin: 0 auto; line-height: 1.65; }

/* 板块容器 */
.home-section { margin-bottom: 40px; }
.home-section:last-of-type { margin-bottom: 0; }
.section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); font-family: -apple-system, "Noto Sans SC", sans-serif; }
.section-panel { background: var(--card); border: 1px solid var(--border); padding: 24px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.block-more { margin-top: 16px; font-size: 0.9rem; }
.block-more a { color: var(--accent-hover); text-decoration: none; }
.block-more a:hover { text-decoration: underline; }

.block-head { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; color: var(--text); }

/* 两栏：最新文章 + 热门；电脑端两栏等高 */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: stretch; }
@media (min-width: 901px) {
  .grid-2 > .section-main,
  .grid-2 > .section-side { display: flex; flex-direction: column; min-height: 0; }
  .grid-2 .section-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .grid-2 .section-panel .list-articles,
  .grid-2 .section-panel .hot-list { flex: 1 1 auto; min-height: 0; }
  .grid-2 .section-panel .block-more { flex-shrink: 0; }
}
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .home-section-grid .grid-2 { display: flex; flex-direction: column; }
  .home-section-grid .section-side { order: -1; }
}

.block-slider { margin: 0 -24px; overflow: hidden; }
.slider-track { display: flex; gap: 12px; overflow-x: auto; padding: 0 24px 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-item { flex: 0 0 min(85%, 400px); height: 200px; border-radius: 0; background-size: cover; background-position: center; scroll-snap-align: start; text-decoration: none; color: #fff; display: flex; align-items: flex-end; position: relative; }
.slider-item::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,0.8)); }
.slider-caption { position: relative; z-index: 1; padding: 14px 16px; font-weight: 600; font-size: 0.95rem; }

/* 方块文章封面轮播（全屏宽、自适应；桌面端填满一行，移动端横向滚动+中间放大） */
.cover-carousel-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 36px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}
.cover-carousel { overflow: hidden; padding: 0 max(24px, 5vw); box-sizing: border-box; }
.cover-carousel-track { display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; gap: clamp(14px, 3vw, 24px); padding: clamp(20px, 4vw, 32px) 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cover-carousel-track::-webkit-scrollbar { display: none; }
.cover-carousel-item { flex: 0 0 clamp(90px, 18vw, 120px); width: clamp(90px, 18vw, 120px); height: clamp(90px, 18vw, 120px); scroll-snap-align: center; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: #fff; border: 2px solid var(--border); transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.1); position: relative; z-index: 0; }
.cover-carousel-item:hover { border-color: var(--accent); }
.cover-carousel-item.center { transform: scale(1.35); z-index: 2; border-color: var(--accent); border-width: 3px; box-shadow: 0 12px 32px rgba(0,0,0,0.25); }
.cover-carousel-img { display: block; width: 100%; height: 100%; background-size: cover; background-position: center; background-color: var(--border); }
.cover-carousel-title { display: block; padding: 6px 8px; font-size: clamp(0.65rem, 1.5vw, 0.75rem); font-weight: 600; line-height: 1.2; background: linear-gradient(transparent, rgba(0,0,0,0.85)); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: -apple-system, "Noto Sans SC", sans-serif; }

/* 桌面端：单行不换行，多余隐藏，横向滚动查看 */
@media (min-width: 769px) {
  .cover-carousel-track { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 16px; justify-content: flex-start; padding: 28px 0; scroll-snap-type: x mandatory; }
  .cover-carousel-item { flex: 0 0 110px; width: 110px; height: 110px; min-width: 110px; aspect-ratio: 1; }
  .cover-carousel-item.center { transform: none; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
}

@media (max-width: 768px) {
  .cover-carousel { padding: 0 max(16px, 4vw); }
  .cover-carousel-item { flex: 0 0 clamp(80px, 22vw, 100px); width: clamp(80px, 22vw, 100px); height: clamp(80px, 22vw, 100px); }
  .cover-carousel-item.center { transform: scale(1.28); }
  .cover-carousel-track { gap: clamp(10px, 2.5vw, 14px); padding: clamp(16px, 3vw, 20px) 0; }
}

/* 精选区：左大图与右侧三封面等高，兼顾美观与封面 3:2 比例 */
.block-featured { }
.featured-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: stretch; min-height: 340px; }
.featured-card { display: block; position: relative; width: 100%; height: 100%; border-radius: 0; overflow: hidden; text-decoration: none; color: #fff; border: 1px solid var(--border); }
.featured-bg { position: absolute; inset: 0; }
.featured-bg img { width: 100%; height: 100%; object-fit: cover; }
.featured-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.85) 100%); }
.featured-badge { position: absolute; top: 14px; left: 14px; z-index: 2; font-size: 0.7rem; padding: 4px 10px; background: var(--accent); color: #1c1c1c; font-family: sans-serif; letter-spacing: 0.05em; }
.featured-info { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; padding: 18px 20px; }
.featured-headline { font-size: 1.3rem; font-weight: 700; line-height: 1.25; display: block; margin-bottom: 6px; }
.featured-meta { font-size: 0.82rem; opacity: 0.9; }

/* 右侧三封面：每张 3:2 比例，不压扁；行高由右侧内容决定，左侧大图等高 */
.featured-side-covers { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.featured-side-item { position: relative; display: block; text-decoration: none; color: #fff; border: 1px solid var(--border); overflow: hidden; flex: 1; min-height: 0; }
.featured-side-item:hover { border-color: var(--accent); }
.featured-side-thumb { display: block; width: 100%; height: 100%; min-height: 80px; overflow: hidden; background: var(--border); }
.featured-side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-side-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; font-size: 0.85rem; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(transparent, rgba(0,0,0,0.75)); }

.featured-card-standalone { min-height: 340px; aspect-ratio: 5/2; }

@media (max-width: 768px) {
  .featured-row { grid-template-columns: 1fr; min-height: 0; }
  .featured-card { height: auto; aspect-ratio: 3/2; min-height: 200px; }
  .featured-card-standalone { min-height: 0; aspect-ratio: 3/2; }
  .featured-side-covers { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
  .featured-side-item { flex: 1 1 min(100%, 140px); max-width: none; min-height: 0; }
  .featured-side-thumb { min-height: 0; aspect-ratio: 3/2; height: auto; }
  .featured-side-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* 文章列表 */
.list-articles { list-style: none; }
.list-articles li { border-bottom: 1px solid var(--border); }
.list-articles li:last-child { border-bottom: none; }
.list-article-link { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center; padding: 20px 0; text-decoration: none; color: var(--text); }
.list-article-link:hover { color: var(--accent-hover); }
.list-article-thumb { width: 120px; aspect-ratio: 3/2; border-radius: 0; overflow: hidden; background: #e5e2db; flex-shrink: 0; }
.list-article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-article-body { flex: 1; min-width: 0; }
.list-article-title { font-weight: 600; font-size: 1.05rem; display: block; margin-bottom: 4px; }
.list-article-meta { font-size: 0.8rem; color: var(--muted); }

/* 热门 - 侧栏 */
.hot-list { list-style: none; }
.hot-list[data-adaptive] { overflow: hidden; }
.hot-list li { border-bottom: 1px solid var(--border); }
.hot-list li:last-child { border-bottom: none; }
.hot-list a { display: flex; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; color: var(--text); font-size: 0.95rem; }
.hot-list a:hover { color: var(--accent-hover); }
.hot-num { width: 28px; height: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #1c1c1c; color: #f5f2ed; font-size: 0.8rem; font-weight: 700; font-family: sans-serif; }
[data-theme="dark"] .hot-num { background: #f5f2ed; color: #1c1c1c; }

/* 视频：网格/列表自适应 */
.block-videos { }
.video-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 3vw, 20px); }
.video-tile { display: flex; flex-direction: column; text-decoration: none; color: var(--text); border: 1px solid var(--border); background: var(--card); overflow: hidden; }
.video-tile:hover { border-color: var(--accent); }
.video-thumb { position: relative; aspect-ratio: 3/2; overflow: hidden; background: var(--border); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; text-shadow: 0 0 8px rgba(0,0,0,0.5); }
.video-title { padding: clamp(10px, 2vw, 14px); font-weight: 600; font-size: clamp(0.9rem, 1.5vw, 0.95rem); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { padding: 0 clamp(10px, 2vw, 14px) clamp(10px, 2vw, 14px); font-size: clamp(0.75rem, 1.2vw, 0.8rem); color: var(--muted); }
/* 视频页：列表视图 */
.video-row--list { display: flex; flex-direction: column; gap: 0; }
.video-row--list .video-tile { flex-direction: row; align-items: center; gap: clamp(12px, 3vw, 20px); padding: clamp(12px, 2.5vw, 16px) 0; border: none; border-bottom: 1px solid var(--border); border-radius: 0; }
.video-row--list .video-tile:last-child { border-bottom: none; }
.video-row--list .video-tile:hover { background: var(--card); }
.video-row--list .video-thumb { width: clamp(100px, 22vw, 160px); flex-shrink: 0; aspect-ratio: 3/2; border-radius: 8px; }
.video-row--list .video-title { -webkit-line-clamp: 1; padding: 0; }
.video-row--list .video-meta { padding: 0; margin-top: 2px; }
/* 视频页：展示方式切换 */
.view-toggle { display: flex; gap: 0; margin-bottom: 0; }
.view-toggle-btn { padding: 8px 16px; font-size: 0.9rem; color: var(--muted); background: var(--card); border: 1px solid var(--border); border-right: none; cursor: pointer; font-family: inherit; }
.view-toggle-btn:first-child { border-radius: 8px 0 0 8px; }
.view-toggle-btn:last-child { border-radius: 0 8px 8px 0; border-right: 1px solid var(--border); }
.view-toggle-btn:hover { color: var(--accent); border-color: var(--accent); }
.view-toggle-btn.active { color: var(--accent); border-color: var(--accent); background: var(--bg); }

/* 更多内容 */
.block-more { }
.more-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.more-tile { display: flex; flex-direction: column; text-decoration: none; color: var(--text); border: 1px solid var(--border); background: var(--card); overflow: hidden; }
.more-tile:hover { border-color: var(--accent); }
.more-thumb { aspect-ratio: 3/2; overflow: hidden; background: #e5e2db; }
.more-thumb img { width: 100%; height: 100%; object-fit: cover; }
.more-title { padding: 14px; font-size: 0.95rem; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 手机端：最新文章 2 列×3 行共 6 篇，卡片式，底部有「全部文章」入口 */
@media (max-width: 768px) {
  .home-section-grid .list-articles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .home-section-grid .list-articles li { border-bottom: none; }
  .home-section-grid .list-articles li:nth-child(n+7) { display: none; }
  .home-section-grid .list-article-link { grid-template-columns: 1fr; gap: 8px; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--card); }
  .home-section-grid .list-article-link:hover { border-color: var(--accent); }
  .home-section-grid .list-article-thumb { width: 100%; aspect-ratio: 3/2; height: auto; border-radius: 0; }
  .home-section-grid .list-article-body { padding: 10px 12px; }
  .home-section-grid .list-article-title { font-size: 0.9rem; margin-bottom: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .home-section-grid .list-article-meta { font-size: 0.75rem; }
  .home-section-grid .block-more { margin-top: 4px; }
}
@media (max-width: 768px) {
  .list-article-link { grid-template-columns: 1fr; gap: 12px; }
  .list-article-thumb { width: 100%; aspect-ratio: 3/2; height: auto; }
  .video-row:not(.video-row--list) { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .block-videos .video-row-home { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .block-videos .video-row-home .video-tile:nth-child(n+4) { display: none; }
  .block-videos-more-hint { display: none; }
  .more-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .video-row:not(.video-row--list) { grid-template-columns: 1fr; gap: 12px; }
  .block-videos .video-row-home { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .block-videos .video-row-home .video-tile:nth-child(n+4) { display: none; }
}

/* 首页标签区块：每个 TAG 独立透明框，颜色统一 */
.home-tags-section { margin-top: 40px; }
.home-tags-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-left: 4px solid var(--accent);
}
[data-theme="dark"] .home-tags-card { box-shadow: 0 2px 16px rgba(0,0,0,0.2); }
.home-tags-card-head {
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--border);
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px;
}
.home-tags-card-title {
    font-size: 1rem; font-weight: 700; color: var(--text); letter-spacing: 0.02em;
}
.home-tags-card-desc {
    font-size: 0.8rem; color: var(--muted); font-weight: 400;
}
.home-tags-wrap {
    padding: 18px 24px 22px;
    display: flex; flex-wrap: wrap; gap: 12px 14px;
}
/* 每个标签都是独立透明框：统一字体颜色 + 半透明底 + 边框，绝不使用链接默认蓝/下划线 */
.home-tags-wrap .home-tag {
    display: inline-block;
    padding: 9px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text) !important;
    text-decoration: none !important;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.06);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.home-tags-wrap .home-tag:hover {
    color: var(--accent) !important;
    border-color: var(--accent);
    background: rgba(0,0,0,0.04);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
[data-theme="dark"] .home-tags-wrap .home-tag {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
}
[data-theme="dark"] .home-tags-wrap .home-tag:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* ========== 面包屑（现代化） ========== */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 0.8rem; color: var(--muted); margin-bottom: 20px; font-family: -apple-system, "Noto Sans SC", sans-serif; }
.breadcrumb a { color: var(--text); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--muted); opacity: 0.6; user-select: none; }
.breadcrumb-sep::before { content: '\203A'; font-weight: 600; }
.breadcrumb-current { color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-back-wrap { margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; font-size: 0.9rem; font-weight: 500; text-decoration: none; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; transition: border-color 0.2s, color 0.2s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline { }
a.btn { cursor: pointer; }

/* ========== 内页通用 ========== */
.page-inner { max-width: 720px; }
.page-inner h1 { font-size: 1.75rem; margin-bottom: 24px; font-weight: 700; }
.page-inner .lead { font-size: 1.05rem; color: var(--muted); margin-bottom: 28px; line-height: 1.7; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-row a { display: inline-block; padding: 8px 14px; font-size: 0.9rem; color: var(--muted); text-decoration: none; border: 1px solid var(--border); border-radius: 8px; }
.filter-row a:hover { color: var(--accent); border-color: var(--accent); }
.filter-row a.active { color: var(--accent); border-color: var(--accent); background: var(--bg); }

/* 列表页：统一列表形式，封面自适应缩小、单条高度降低 */
.list-page-list { list-style: none; }
.list-page-list li { border-bottom: 1px solid var(--border); }
.list-page-list li:last-child { border-bottom: none; }
.list-page-list a { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 16px); padding: clamp(10px, 2vw, 14px) 0; text-decoration: none; color: var(--text); }
.list-page-list a:hover { color: var(--accent); }
.list-page-thumb { flex-shrink: 0; width: clamp(80px, 18vw, 120px); aspect-ratio: 3/2; border-radius: 6px; overflow: hidden; background: var(--border); }
.list-page-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-page-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-page-title { font-weight: 600; font-size: clamp(0.9rem, 1.8vw, 1rem); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-page-meta { font-size: clamp(0.75rem, 1.2vw, 0.8rem); color: var(--muted); }
@media (max-width: 480px) {
  .list-page-thumb { width: 80px; }
  .list-page-list a { gap: 10px; padding: 10px 0; }
}

.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.pagination-info { margin-right: 12px; font-size: 0.9rem; color: var(--muted); }
.pagination-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination a, .pagination span { padding: 8px 14px; font-size: 0.9rem; color: var(--muted); text-decoration: none; border: 1px solid var(--border); border-radius: 8px; }
.pagination a:hover { color: var(--accent); border-color: var(--accent); }
.pagination .active, .pagination-num.active { color: var(--accent); border-color: var(--accent); background: var(--bg); }

/* ========== 文章详情 ========== */
.article-page { }
.article-cover-wrap { width: 100%; aspect-ratio: 3/2; border-radius: 12px; overflow: hidden; margin-bottom: 24px; background: var(--border); }
.article-cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.article-label { display: inline-block; font-size: 0.75rem; padding: 4px 10px; border: 1px solid var(--accent); color: var(--accent); border-radius: 6px; margin-bottom: 12px; }
.article-title { font-size: 1.9rem; font-weight: 700; margin-bottom: 12px; line-height: 1.35; letter-spacing: 0.02em; }
.article-meta { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 24px; }
.post-tag { display: inline-block; padding: 4px 10px; font-size: 0.8rem; border-radius: 6px; background: var(--card); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: background 0.2s, border-color 0.2s; }
.post-tag:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.post-tags-wrap { display: inline-flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 6px; }
.list-page-list .post-tags-wrap { margin-top: 6px; }
.list-page-list .post-tag { padding: 4px 10px; font-size: 0.78rem; border-radius: 6px; background: rgba(0,0,0,0.06); border: 1px solid var(--border); color: var(--muted); }
.list-page-list .post-tag:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .list-page-list .post-tag { background: rgba(255,255,255,0.08); color: var(--muted); }
[data-theme="dark"] .list-page-list .post-tag:hover { background: var(--accent); color: #fff; }
.list-page-tags { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 6px; font-size: 0.8rem; }
.list-page-tags .post-tag { padding: 4px 10px; font-size: 0.78rem; }
.article-summary { padding: 20px 24px; background: var(--card); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; margin-bottom: 32px; border: 1px solid var(--border); line-height: 1.7; }
.article-summary-label { font-size: 0.75rem; color: var(--accent); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.article-body { font-size: 1.0625rem; line-height: 1.8; }
.article-body p { margin-bottom: 1.5em; }
.article-body h2 { font-size: 1.35rem; margin: 2.2em 0 0.75em; font-weight: 700; line-height: 1.4; }
.article-body h3 { font-size: 1.15rem; margin: 1.8em 0 0.5em; font-weight: 600; }
.article-body a { color: var(--accent); text-decoration: none; }
.article-body a:hover { text-decoration: underline; }
.article-body code { font-size: 0.9em; padding: 2px 8px; background: var(--card); border: 1px solid var(--border); border-radius: 6px; font-family: ui-monospace, monospace; }
.article-body blockquote { margin: 1.75em 0; padding: 18px 24px; border-left: 4px solid var(--accent); background: var(--card); border-radius: 0 8px 8px 0; color: var(--muted); border: 1px solid var(--border); line-height: 1.7; }
.article-body ul, .article-body ol { margin: 1.2em 0; padding-left: 1.5em; }
.article-body li { margin-bottom: 0.4em; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 1.75em 0; border-radius: 8px; overflow: hidden; }
.video-embed iframe, .video-embed video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.article-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-back { display: inline-block; margin-top: 32px; font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.article-back:hover { color: var(--accent); }

/* ========== 关于 / 联系 ========== */
.about-box, .contact-box { padding: 28px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 28px; white-space: pre-wrap; line-height: 1.8; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.contact-links a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; }
.contact-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ========== 推荐文章横版单行（自适应）========== */
.recommended-section { margin-top: 40px; }
.recommended-section .block-head { margin-bottom: 16px; }
.recommended-row { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 16px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
.recommended-card { flex: 0 0 auto; width: clamp(140px, 22vw, 200px); scroll-snap-align: start; text-decoration: none; color: var(--text); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--card); display: block; transition: border-color 0.2s, box-shadow 0.2s; }
.recommended-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.recommended-card-thumb { display: block; width: 100%; aspect-ratio: 3/2; background: var(--border); overflow: hidden; }
.recommended-card-thumb img, .recommended-card-thumb video { width: 100%; height: 100%; object-fit: cover; }
.recommended-card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.recommended-card-title { font-size: 0.9rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recommended-card-meta { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 640px) {
  .recommended-card { width: clamp(130px, 38vw, 180px); }
  .recommended-row { gap: 12px; }
}

/* ========== 页脚 - 杂志风（日间/夜间自适应）========== */
.site-footer { padding: 40px 24px 32px; text-align: center; font-size: 0.9rem; color: var(--muted); background: var(--bg); border-top: 3px solid var(--accent); margin-top: 48px; }
[data-theme="light"] .site-footer { color: rgba(28,28,28,0.85); }
.footer-wrap { max-width: 1120px; margin: 0 auto; }
.footer-links { margin-bottom: 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; }
.footer-links a { color: var(--accent); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-note { margin-bottom: 8px; line-height: 1.6; max-width: 560px; margin-left: auto; margin-right: auto; }
.footer-icp { margin-bottom: 8px; font-size: 0.85rem; }
.footer-copy { font-size: 0.85rem; margin-top: 12px; }
@media (max-width: 480px) {
  .site-footer { padding: 28px 16px 24px; margin-top: 32px; }
  .footer-links { gap: 6px 10px; }
}

/* ========== 回到顶部 ========== */
.back-top { position: fixed; bottom: 24px; right: 24px; z-index: 99; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s, transform 0.2s; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.back-top.on { opacity: 1; visibility: visible; }
.back-top:hover { color: var(--accent); border-color: var(--accent); transform: scale(1.05); }
.back-top:active { transform: scale(0.98); }
.back-top svg { display: block; }

/* ========== 法律页 ========== */
.legal-page { max-width: 680px; }
.legal-page h1 { font-size: 1.5rem; margin-bottom: 24px; }
.legal-page h2 { font-size: 1.15rem; margin: 1.5em 0 0.5em; }
.legal-page p { margin-bottom: 1em; }

/* ========== 404 ========== */
.err-page { text-align: center; padding: 80px 24px 100px; max-width: 480px; margin: 0 auto; }
.err-page h1 { font-size: 1.75rem; margin-bottom: 16px; font-weight: 700; color: var(--text); }
.err-page p { color: var(--muted); margin-bottom: 28px; line-height: 1.7; }
.err-page a { color: var(--accent); text-decoration: none; }
.err-page a:hover { text-decoration: underline; }
.err-page .btn { margin-top: 8px; }
.err-page .btn:hover { text-decoration: none; }

/* ========== Safari 兼容 ========== */
@supports not (gap: 1px) {
  .header-inner > * + * { margin-left: 16px; }
  .site-nav a + a { margin-left: 4px; }
  .list-articles li { margin-bottom: 0; }
  .hot-list li { margin-bottom: 0; }
  .video-row { margin: -8px; }
  .video-row > * { margin: 8px; }
  .more-row { margin: -8px; }
  .more-row > * { margin: 8px; }
}
