/* ============================================================
   笑网 · 重制版  v2.0.0
   设计语言：素纸 / 墨 / 朱 —— 现代留白 + 东方气质
   ============================================================ */

:root {
  --paper: #fbfaf7;
  --paper-2: #f4f2ec;
  --card: #ffffff;
  --ink: #16181c;
  --ink-2: #3d424b;
  --muted: #70767f;
  --line: #e3e0d8;
  --line-2: #efece4;
  --accent: #9c2b25;
  --accent-soft: #f3e7e4;
  --jade: #2f6b5e;
  --max: 1160px;
  --measure: 720px;
  --r: 14px;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
                  "SimSun", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --shadow-s: 0 1px 2px rgba(20,22,26,.04), 0 2px 8px rgba(20,22,26,.04);
  --shadow-m: 0 2px 6px rgba(20,22,26,.05), 0 12px 32px rgba(20,22,26,.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1013;
    --paper-2: #14171b;
    --card: #16191e;
    --ink: #eceae4;
    --ink-2: #c3c0b8;
    --muted: #8b929b;
    --line: #262a31;
    --line-2: #1d2026;
    --accent: #d0605a;
    --accent-soft: #2a1d1c;
    --jade: #62a894;
    --shadow-s: 0 1px 2px rgba(0,0,0,.4);
    --shadow-m: 0 10px 40px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent-soft); color: var(--accent); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

/* ---------------- 顶部 ---------------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: var(--s6); height: 64px; }
.brand { display: flex; align-items: baseline; gap: .55rem; flex: none; }
.brand b {
  font-family: var(--font-display); font-size: 1.32rem; font-weight: 700;
  letter-spacing: .06em;
}
.brand span {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
}
.nav { display: flex; gap: var(--s5); margin-left: auto; align-items: center; }
.nav a { font-size: .9rem; color: var(--ink-2); position: relative; padding: .3rem 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }
.icon-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  width: 34px; height: 34px; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 780px) {
  .nav { gap: var(--s4); overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; font-size: .85rem; }
  .top-in { gap: var(--s4); }
}

/* ---------------- 首屏 ---------------- */
.hero { padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(2rem, 4vw, 3.5rem); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 70%;
  background:
    radial-gradient(48% 60% at 18% 30%, color-mix(in srgb, var(--jade) 9%, transparent), transparent 70%),
    radial-gradient(42% 55% at 82% 20%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 72%);
  filter: blur(28px); pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .74rem; letter-spacing: .22em; color: var(--muted);
  text-transform: uppercase; margin-bottom: var(--s5);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
h1.hero-t {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7.2vw, 5.2rem);
  line-height: 1.06; letter-spacing: .01em; font-weight: 700;
  margin: 0 0 var(--s5);
}
h1.hero-t em { font-style: normal; color: var(--accent); }
.hero-p {
  max-width: 42ch; color: var(--ink-2); font-size: clamp(1rem, 1.5vw, 1.12rem);
  margin: 0 0 var(--s6);
}
.hero-act { display: flex; gap: var(--s4); flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.35rem; border-radius: 999px; font-size: .92rem;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: transform .2s ease, opacity .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); opacity: .92; color: var(--paper); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--s5); margin-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line); padding-top: var(--s5);
}
.stat b {
  display: block; font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: .78rem; color: var(--muted); letter-spacing: .08em; }

/* ---------------- 通用区块 ---------------- */
.sec { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.sec + .sec { border-top: 1px solid var(--line-2); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s6); }
.sec-head h2 {
  font-family: var(--font-display); font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700; margin: 0; letter-spacing: .02em;
}
.sec-head .more { font-size: .85rem; color: var(--muted); }
.sec-head .more:hover { color: var(--accent); }
.lead { color: var(--muted); font-size: .92rem; max-width: 46ch; }

/* 栏目卡 */
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s4); }
.col-card {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  padding: var(--s5); display: flex; flex-direction: column; gap: .35rem;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  min-height: 118px;
}
.col-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--ink); }
.col-card b { font-family: var(--font-display); font-size: 1.16rem; font-weight: 700; letter-spacing: .03em; }
.col-card i { font-style: normal; font-size: .8rem; color: var(--muted); }
.col-card s { text-decoration: none; margin-top: auto; font-size: .78rem; color: var(--accent); letter-spacing: .06em; }

/* 文章列表 */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 7.5rem 1fr auto; gap: var(--s4);
  align-items: baseline; padding: var(--s4) 0; border-bottom: 1px solid var(--line-2);
  transition: background .2s;
}
.row:first-child { border-top: 1px solid var(--line-2); }
.row:hover { color: var(--ink); }
.row:hover .row-t { color: var(--accent); }
.row time { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-t { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.5; transition: color .18s; }
.row-m { font-size: .78rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr auto; }
  .row time { grid-column: 1 / -1; order: 3; }
}

/* 卡片网格（图集/资料） */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s5); }
.gcard {
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--card); display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.gcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); color: var(--ink); }
.gcard .thumb { aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; }
.gcard .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gcard:hover .thumb img { transform: scale(1.03); }
.gcard .cap { padding: var(--s4); display: flex; flex-direction: column; gap: .2rem; }
.gcard .cap b { font-weight: 600; font-size: .96rem; line-height: 1.45; }
.gcard .cap span { font-size: .76rem; color: var(--muted); }

/* ---------------- 文章页 ---------------- */
.crumb { padding-top: var(--s5); font-size: .82rem; color: var(--muted); display: flex; gap: .5rem; flex-wrap: wrap; }
.crumb a:hover { color: var(--accent); }
.art-head { max-width: var(--measure); margin: var(--s6) auto var(--s5); }
.art-head h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.55rem); line-height: 1.28; margin: 0 0 var(--s4);
  letter-spacing: .01em;
}
.art-meta { display: flex; flex-wrap: wrap; gap: var(--s4); font-size: .82rem; color: var(--muted); align-items: center; }
.art-meta .tag {
  border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem;
  color: var(--ink-2);
}
.prose { max-width: var(--measure, 40rem); margin: 0 auto; font-size: 1.06rem; line-height: 1.95; color: var(--ink-2); }
.prose > p { margin: 0 0 1.35em; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display); color: var(--ink); line-height: 1.4;
  margin: 2em 0 .8em; font-weight: 700;
}
.prose h1 { font-size: 1.5rem; } .prose h2 { font-size: 1.3rem; } .prose h3 { font-size: 1.12rem; }
.prose img { margin: 1.6em auto; border-radius: 8px; box-shadow: var(--shadow-s); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong, .prose b { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.35em; margin: 0 0 1.35em; }
.prose li { margin: .35em 0; }
.prose blockquote {
  margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 2px solid var(--accent);
  color: var(--muted);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose table {
  width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .92rem;
  display: block; overflow-x: auto;
}
.prose table td, .prose table th { min-width: 4.5rem; }
.prose td, .prose th { border: 1px solid var(--line); padding: .5rem .7rem; vertical-align: top; }
.prose th { background: var(--paper-2); font-weight: 650; color: var(--ink); }
.prose td { color: var(--ink-2); }
.prose td img { margin: .2em auto; }
.prose center { text-align: center; }
@media (max-width: 700px) { .prose table { white-space: normal; } }

.art-foot { max-width: var(--measure); margin: var(--s7) auto 0; border-top: 1px solid var(--line); padding-top: var(--s5); }
.note { font-size: .8rem; color: var(--muted); line-height: 1.8; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-top: var(--s5); }
.pager a {
  border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4);
  display: flex; flex-direction: column; gap: .2rem; background: var(--card);
  transition: border-color .2s, transform .2s;
}
.pager a:hover { border-color: var(--accent); transform: translateY(-1px); }
.pager small { color: var(--muted); font-size: .74rem; letter-spacing: .1em; }
.pager b { font-weight: 600; font-size: .92rem; line-height: 1.5; }
.pager .next { text-align: right; }
@media (max-width: 620px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

/* 阅读进度 */
.pbar { position: fixed; top: 0; left: 0; height: 2px; background: var(--accent); width: 0; z-index: 60; transition: width .1s linear; }

/* ---------------- 筛选 ---------------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s5); }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  padding: .32rem .8rem; border-radius: 999px; font-size: .82rem; cursor: pointer;
  font-family: inherit; transition: all .18s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.count { font-size: .82rem; color: var(--muted); margin-left: auto; align-self: center; }

/* ---------------- 搜索 ---------------- */
.search-box { position: relative; max-width: 620px; margin: 0 0 var(--s6); }
.search-box input {
  width: 100%; font: inherit; font-size: 1.05rem; padding: .95rem 1rem .95rem 2.9rem;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.sres { display: flex; flex-direction: column; }
.sres .row { grid-template-columns: 1fr auto; }
.sres .row .ex { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); margin-top: .15rem; }
.empty { color: var(--muted); padding: var(--s7) 0; text-align: center; }

/* ---------------- 图集灯箱 ---------------- */
.shots { columns: 3; column-gap: var(--s4); }
.shots figure { margin: 0 0 var(--s4); break-inside: avoid; border-radius: 10px; overflow: hidden; background: var(--paper-2); cursor: zoom-in; position: relative; }
.shots img { width: 100%; transition: transform .5s ease; }
.shots figure:hover img { transform: scale(1.02); }
.lb {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,11,13,.92);
  display: none; place-items: center; padding: 4vmin;
}
.lb.open { display: grid; }
.lb img { max-width: 100%; max-height: 88vh; border-radius: 6px; }
.lb .close { position: absolute; top: 1.2rem; right: 1.4rem; color: #fff; opacity: .7; cursor: pointer; font-size: 1.6rem; background: none; border: 0; }
@media (max-width: 900px) { .shots { columns: 2; } }
@media (max-width: 560px) { .shots { columns: 1; } }

/* ---------------- 页脚 ---------------- */
.foot { border-top: 1px solid var(--line); margin-top: var(--s8); padding: var(--s7) 0 var(--s8); background: var(--paper-2); }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s6); }
.foot b { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .04em; }
.foot p, .foot li { font-size: .82rem; color: var(--muted); line-height: 1.9; margin: .3rem 0; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot a:hover { color: var(--accent); }
.foot .ver { font-size: .74rem; letter-spacing: .12em; color: var(--muted); margin-top: var(--s4); display: block; }
@media (max-width: 720px) { .foot-in { grid-template-columns: 1fr; gap: var(--s5); } }

/* 状态页 */
.state { max-width: 560px; margin: var(--s9) auto; text-align: center; }
.state h1 { font-family: var(--font-display); font-size: 2rem; margin: 0 0 var(--s4); }
.state code { font-size: .9rem; background: var(--paper-2); padding: .15rem .45rem; border-radius: 6px; }

/* 打印 */
@media print {
  .top, .foot, .pager, .pbar, .lb { display: none !important; }
  body { background: #fff; color: #000; }
  .prose { max-width: none; font-size: 11pt; }
}
.hero .lead{max-width:60ch}

.shot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:var(--s3);
  max-width:calc(var(--measure) + 8rem);margin:var(--s5) auto;}
.shot-grid img{width:100%;height:auto;border-radius:var(--r2);display:block}
@media (max-width:640px){.shot-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}}
