/* 亢渐的日报 · 深色电影感（参考多页面日报风格重制） */

:root {
  --bg: #141210;
  --text: #f0eae0;
  --accent: #d4a24e;
  --muted: rgba(240, 234, 224, 0.6);
  --line: rgba(240, 234, 224, 0.14);
  --line-strong: rgba(240, 234, 224, 0.55);
  --font-title: Georgia, "Times New Roman", "STZhongsong", "SimSun", "Noto Serif SC", serif;
  --font-body: "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --gap: 22px;
  --content-width: 1180px;
}

/* 主题变化时，辅助色与分隔线跟着文字色自动调和 */
@supports (color: color-mix(in srgb, red, blue)) {
  :root {
    --muted: color-mix(in srgb, var(--text) 60%, var(--bg));
    --line: color-mix(in srgb, var(--text) 15%, transparent);
    --line-strong: color-mix(in srgb, var(--text) 52%, transparent);
  }
}

:root[data-density="compact"] { font-size: 14.5px; --gap: 14px; }
:root[data-density="relaxed"] { font-size: 17.5px; --gap: 32px; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
}

/* 页面背景：当前页主题照片，压暗 + 模糊，保证浅色文字清晰 */
body::before {
  content: "";
  position: fixed;
  inset: -48px;
  z-index: -2;
  background-image: var(--page-img, none);
  background-size: cover;
  background-position: center;
  filter: blur(30px) saturate(1.05) brightness(0.45);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(20, 18, 16, 0.74);
  background: color-mix(in srgb, var(--bg) 74%, transparent);
}

::selection { background: var(--accent); color: #14120f; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── 顶部：标签切换 + 期数翻页（吸顶） ─────────────── */
.tabbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tabbar-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.tabs-scroll {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px 18px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 2px 10px;
  font-size: 13.5px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab .dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--tag-color, var(--accent));
  transform: rotate(45deg);
}
.tab.active {
  color: var(--tag-color, var(--accent));
  font-weight: 600;
  border-bottom-color: var(--tag-color, var(--accent));
}
.issue-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.issue-btn { color: var(--muted); }
.issue-btn:hover { color: var(--text); text-decoration: none; }
.issue-btn.dim { opacity: 0.35; }
.issue-date { font-weight: 600; letter-spacing: 0.08em; color: var(--text); }

/* 桌面端：标签放不下时自动换行，保证每个标签完整可见；期数导航单独一行右对齐 */
@media (min-width: 861px) {
  .tabbar-inner { flex-wrap: wrap; row-gap: 0; }
  .tabs-scroll {
    flex: 1 1 100%;
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .issue-nav { margin-left: auto; padding: 2px 0 8px; }
}

.page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 28px 64px;
}

/* ── 报头 ───────────────────────────────── */
.masthead { text-align: center; padding-top: 24px; }
.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}
.masthead-tag { color: var(--accent); font-weight: 600; }
.masthead-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 58px);
  letter-spacing: 0.14em;
  line-height: 1.2;
  margin: 18px 0 16px;
}
.masthead-rule { border-top: 3px solid var(--line-strong); }
.masthead-rule::after {
  content: "";
  display: block;
  border-top: 1px solid var(--line-strong);
  margin-top: 2px;
}
.masthead-meta {
  margin: 10px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  min-height: 1.2em;
}

/* ── Hero 头条大卡 ─────────────────────────── */
.hero {
  position: relative;
  margin: 26px 0 26px;
  min-height: 430px;
  display: flex;
  align-items: flex-end;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 7, 6, 0.08) 30%, rgba(8, 7, 6, 0.88) 100%);
}
.hero-content {
  position: relative;
  padding: 30px 34px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  max-width: 800px;
}
.hero-chip {
  align-self: flex-start;
  background: var(--tag-color);
  color: #14120f;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.hero-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(27px, 3.8vw, 44px);
  line-height: 1.28;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.hero-brief {
  margin: 0;
  color: #e8e1d6;
  font-size: 14.5px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-source {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13.5px;
}
.hero-source:hover {
  background: rgba(255, 255, 255, 0.14);
  text-decoration: none;
}

/* ── 版块标题 ─────────────────────────── */
.section { margin-top: 34px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 2px solid var(--tag-color, var(--accent));
  padding-bottom: 8px;
  margin-bottom: 18px;
}
.section-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tag-color, var(--accent));
}
.section-count { font-size: 12px; color: var(--muted); }
.section-more {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--tag-color, var(--accent));
}

/* ── 艺术题图 + 图片卡片 ─────────────────── */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-two { grid-template-columns: repeat(2, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}
.art {
  position: relative;
  height: 168px;
  overflow: hidden;
}
.grid-two .art { height: 250px; }
.art-diamond {
  position: absolute;
  right: -34px;
  bottom: -46px;
  width: 150px;
  height: 150px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transform: rotate(45deg);
}
.art-tag {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.85);
}
.card-body {
  padding: 14px 2px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kicker {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--tag-color, var(--accent));
}
.kicker a { color: var(--tag-color, var(--accent)); }
.title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.4;
}
.title a { color: var(--text); text-decoration: none; }
.card:hover .title a { color: var(--tag-color, var(--accent)); }
.card .title {
  font-size: 18.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grid-two .card .title { font-size: 21px; }
.brief {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.source {
  margin: auto 0 0;
  padding-top: 4px;
  font-size: 12.5px;
}
.source a { color: var(--tag-color, var(--accent)); }

.placeholder { color: var(--muted); padding: 30px 0; }

/* ── 阅读页 ─────────────────────────── */
.article-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 34px 0 8px;
}
.article-kicker { margin: 0 0 12px; }
.article-kicker a {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--tag-color, var(--accent));
}
.article-kicker a::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--tag-color, var(--accent));
  transform: rotate(45deg);
  margin-right: 8px;
}
.article-title {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.4;
}
.article-meta {
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.article-lede {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.8;
  color: var(--text);
}
.article-body p {
  margin: 0 0 15px;
  font-size: 15.5px;
  line-height: 1.95;
  color: color-mix(in srgb, var(--text) 88%, transparent);
  color: rgba(240, 234, 224, 0.88);
}
@supports (color: color-mix(in srgb, red, blue)) {
  .article-body p { color: color-mix(in srgb, var(--text) 88%, transparent); }
}
.article-none { color: var(--muted); }
.article-source { margin-top: 26px; }
.article-source a {
  display: inline-block;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text);
}
.article-source a:hover {
  border-color: var(--tag-color, var(--accent));
  color: var(--tag-color, var(--accent));
  text-decoration: none;
}
.article-back { margin: 22px 0 0; font-size: 13px; color: var(--muted); }

/* ── 页脚 ─────────────────────────── */
.footer {
  margin-top: 36px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.footer p { margin: 0; }

/* ── 手机 ─────────────────────────── */
@media (max-width: 860px) {
  .issue-date { display: none; }
  .tabbar-inner { padding: 0 18px; }
}
@media (max-width: 1020px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .page { padding: 0 18px 48px; }
  .grid-cards { grid-template-columns: 1fr; gap: 24px; }
  .grid-two { grid-template-columns: 1fr; }
  .grid-two .art { height: 200px; }
  .masthead { padding-top: 18px; }
  .masthead-title { letter-spacing: 0.08em; }
  .masthead-top { font-size: 11px; }
  .hero { min-height: 360px; border-radius: 12px; }
  .hero-content { padding: 20px; }
  .article-wrap { padding-top: 22px; }
}
