/* ═══════════════════════════════════════════
   TOKENS — 深色（默认）
═══════════════════════════════════════════ */
:root {
  --bg:       #0b0b09;
  --bg2:      #111110;
  --bg3:      #171714;
  --bg4:      #1d1d1a;
  --paper:    #ede6d0;
  --paper2:   #d8cfb8;
  --paper3:   #b8a888;
  --ink:      #0b0b09;
  --red:      #b83232;
  --red-dim:  rgba(184,50,50,0.12);
  --gold:     #b08a38;
  --gold2:    #c9a44a;
  --gold-dim: rgba(176,138,56,0.12);
  --purple:   #7c5c9a;
  --orange:   #c06428;
  --gray:     #b8b4ac;
  --gray2:    #958f87;
  --border:   rgba(237,230,208,0.07);
  --border2:  rgba(237,230,208,0.12);
  --mono:     'Share Tech Mono', monospace;
  --serif:    'Noto Serif SC', serif;
  --sans:     'Noto Sans SC', sans-serif;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ═══════════════════════════════════════════
   TOKENS — 浅色
═══════════════════════════════════════════ */
[data-theme="light"] {
  --bg:       #f5f2ea;
  --bg2:      #ede8dc;
  --bg3:      #e4ddd0;
  --bg4:      #d8d0c0;
  --paper:    #1a1814;
  --paper2:   #2e2b24;
  --paper3:   #4a4640;
  --ink:      #f5f2ea;
  --red:      #c0392b;
  --red-dim:  rgba(192,57,43,0.10);
  --gold:     #8a6520;
  --gold2:    #a07830;
  --gold-dim: rgba(138,101,32,0.12);
  --purple:   #6b4d8a;
  --orange:   #b05020;
  --gray:     #5a5650;
  --gray2:    #7a7470;
  --border:   rgba(26,24,20,0.10);
  --border2:  rgba(26,24,20,0.18);
}

/* grain 浅色下减弱 */
[data-theme="light"] body::after { opacity: 0.4; }

/* 浅色下 source-card 水印调整 */
[data-theme="light"] .source-card-watermark { opacity: 0.04; color: var(--paper); }
[data-theme="light"] .hero-card { background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 100%); }
[data-theme="light"] #searchOverlay { background: rgba(245,242,234,0.94); }

/* 切换按钮 */
#themeToggle {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px;
  color: var(--gray2); cursor: pointer; letter-spacing: 0.08em;
  padding: 0 4px; border: none; background: none;
  transition: color var(--transition);
  flex-shrink: 0;
}
#themeToggle:hover { color: var(--gold); }
#themeToggle svg { transition: transform 0.4s ease; }
[data-theme="light"] #themeToggle svg { transform: rotate(180deg); }

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

body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── GRAIN ── */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ═══════════════════════════════════════════
   VIEWS
═══════════════════════════════════════════ */
.view { display: none; }
.view.active { display: block; }

/* ═══════════════════════════════════════════
   TOP UTILITY BAR
═══════════════════════════════════════════ */
.util-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
  position: sticky; top: 0; z-index: 200;
  height: 36px;
}
.util-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.util-status {
  display: flex; align-items: center; gap: 10px;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #3a9a5c;
  box-shadow: 0 0 6px #3a9a5c;
  animation: pulse 2.5s ease infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 4px #3a9a5c; }
  50% { box-shadow: 0 0 10px #3a9a5c; }
}
.util-text {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray); letter-spacing: 0.1em;
}
.util-text em { color: var(--paper); font-style: normal; }
.util-links {
  display: flex; align-items: center; gap: 20px; list-style: none;
}
.util-links a {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray); letter-spacing: 0.08em;
  transition: color var(--transition);
}
.util-links a:hover { color: var(--paper); }
.util-divider {
  width: 1px; height: 12px;
  background: var(--border2);
}

/* ═══════════════════════════════════════════
   MASTHEAD
═══════════════════════════════════════════ */
.masthead {
  max-width: 1280px; margin: 0 auto; padding: 52px 28px 40px;
  display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 32px;
  border-bottom: 1px solid var(--border);
  animation: revealUp 0.7s ease both;
  animation-fill-mode: forwards;
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brand {}
.brand-kicker {
  font-family: var(--mono); font-size: 10px;
  color: var(--gold); letter-spacing: 0.25em;
  margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.brand-kicker::before {
  content: ''; display: block;
  width: 24px; height: 1px; background: var(--gold); opacity: 0.5;
}
.brand-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(44px, 5.5vw, 80px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.brand-title .t404 {
  color: var(--red);
  
  position: relative;
  display: inline-block;
}
.brand-title .t404::after {
  content: ''; position: absolute;
  left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--red); opacity: 0.35;
}
.brand-sub {
  font-family: var(--mono); font-size: 11px;
  color: var(--gray); letter-spacing: 0.22em;
  margin-top: 14px;
}

.masthead-right {
  text-align: right; padding-bottom: 4px;
}
.masthead-motto {
  font-family: var(--serif); font-size: 15px;
  color: var(--paper2); font-weight: 300;
  line-height: 1.9;
  
}
.masthead-stats {
  display: flex; justify-content: flex-end; gap: 24px;
  margin-top: 20px;
}
.mstat {
  text-align: right; border-right: 1px solid var(--border2); padding-right: 20px;
}
.mstat:last-child { border-right: none; padding-right: 0; }
.mstat-num {
  font-family: var(--mono); font-size: 22px;
  color: var(--paper); display: block; line-height: 1;
}
.mstat-label {
  font-size: 10px; color: var(--gray);
  letter-spacing: 0.06em; margin-top: 3px;
}

/* ═══════════════════════════════════════════
   PRIMARY NAV
═══════════════════════════════════════════ */
.primary-nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  animation: revealUp 0.7s 0.1s ease both;
  position: sticky;
  top: 36px;
  z-index: 190;
  overflow: hidden;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: stretch; flex-wrap: nowrap;
}
.nav-link {
  padding: 15px 22px;
  font-family: var(--serif); font-size: 14px;
  color: var(--gray);
  border-right: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative; user-select: none;
  white-space: nowrap;
}
.nav-link:first-child { border-left: 1px solid var(--border); }
.nav-link:hover { color: var(--paper); background: rgba(237,230,208,0.03); }
.nav-link.active { color: var(--paper); background: rgba(237,230,208,0.04); }
.nav-link.active::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--gold);
}
.nav-pip {
  width: 5px; height: 5px; border-radius: 50%;
  flex-shrink: 0;
}
.np-magic   { background: var(--red); }
.np-laugh   { background: var(--orange); }
.np-ban     { background: var(--purple); }
.np-amazing { background: var(--gold); }
.nav-num {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray2); margin-left: 2px;
}
.nav-search {
  margin-left: auto; padding: 15px 20px;
  display: flex; align-items: center; gap: 8px;
  color: var(--gray); cursor: pointer;
  transition: color var(--transition);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em;
}
.nav-search:hover { color: var(--paper); }
.nav-search svg { opacity: 0.6; }

/* ═══════════════════════════════════════════
   PAGE LAYOUT
═══════════════════════════════════════════ */
.page-wrap {
  max-width: 1280px; margin: 0 auto;
  padding: 40px 28px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 44px;
  animation: revealUp 0.7s 0.2s ease both;
}

/* ═══════════════════════════════════════════
   TICKER
═══════════════════════════════════════════ */
.ticker {
  grid-column: 1 / -1;
  border: 1px solid rgba(184,50,50,0.2);
  background: linear-gradient(90deg, rgba(184,50,50,0.06) 0%, transparent 50%);
  display: flex; align-items: stretch; overflow: hidden;
  margin-bottom: 4px;
}
.ticker-label {
  background: var(--red); color: #fff;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em;
  padding: 0 14px;
  display: flex; align-items: center;
  flex-shrink: 0; white-space: nowrap;
}
.ticker-track {
  padding: 10px 20px;
  overflow: hidden; position: relative; flex: 1;
}
.ticker-items {
  display: flex; gap: 0;
  white-space: nowrap;
  animation: tickerScroll 28s linear infinite;
}
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-items:hover { animation-play-state: paused; }
.ticker-item {
  font-family: var(--serif); font-size: 13px; color: var(--paper2);
  padding: 0 32px; cursor: pointer;
  transition: color var(--transition);
}
.ticker-item:hover { color: var(--gold2); }
.ticker-sep {
  color: var(--gray2); font-family: var(--mono); font-size: 10px;
  padding-right: 32px;
}

/* ═══════════════════════════════════════════
   SECTION HEADER
═══════════════════════════════════════════ */
.sec-hd {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 22px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.sec-title {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  color: var(--paper); letter-spacing: 0.03em;
}
.sec-en {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray2); letter-spacing: 0.15em;
}
.sec-rule { flex: 1; height: 1px; background: linear-gradient(to right, var(--border2), transparent); }
.sec-more {
  font-family: var(--mono); font-size: 10px;
  color: var(--gold); letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(176,138,56,0.3);
  padding-bottom: 1px; cursor: pointer;
  transition: color var(--transition);
}
.sec-more:hover { color: var(--gold2); }

/* ═══════════════════════════════════════════
   HERO CARD
═══════════════════════════════════════════ */
.hero-card {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg3);
  border: 1px solid var(--border);
  overflow: hidden; margin-bottom: 2px;
  cursor: pointer;
  transition: border-color var(--transition);
}
.hero-card:hover { border-color: rgba(176,138,56,0.25); }
.hero-img {
  position: relative; overflow: hidden;
  height: 320px; /* 固定高度，保证inner 100% 可用 */
}
.hero-img-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a15 0%, #252520 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.hero-img-inner::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 20px,
      rgba(237,230,208,0.018) 20px,
      rgba(237,230,208,0.018) 21px
    );
}
.hero-img-inner::after {
  content: 'NO IMAGE ARCHIVED';
  position: absolute;
  font-family: var(--mono); font-size: 9px;
  color: rgba(237,230,208,0.22); letter-spacing: 0.3em;
  text-align: center;
}
.hero-img-label {
  position: absolute; bottom: 16px; left: 16px;
  font-family: var(--mono); font-size: 9px;
  color: var(--gray2); letter-spacing: 0.15em;
}
.hero-badge {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--mono); font-size: 9px;
  color: var(--gold); letter-spacing: 0.2em;
  background: rgba(176,138,56,0.1);
  border: 1px solid rgba(176,138,56,0.25);
  padding: 4px 10px;
}
.hero-body {
  padding: 32px 28px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero-meta {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.cat-tag {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.15em; padding: 3px 9px;
  border: 1px solid; text-transform: uppercase; cursor: pointer;
  transition: all var(--transition);
}
.ct-magic   { color: var(--red);    border-color: rgba(184,50,50,0.4); }
.ct-magic:hover   { background: var(--red-dim); }
.ct-laugh   { color: var(--orange); border-color: rgba(192,100,40,0.4); }
.ct-laugh:hover   { background: rgba(192,100,40,0.1); }
.ct-ban     { color: var(--purple); border-color: rgba(124,92,154,0.4); }
.ct-ban:hover     { background: rgba(124,92,154,0.1); }
.ct-amazing { color: var(--gold);   border-color: rgba(176,138,56,0.4); }
.ct-amazing:hover { background: var(--gold-dim); }

.art-date {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray2); letter-spacing: 0.05em;
}
.art-no {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray2); margin-left: auto;
}
.hero-title {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  line-height: 1.55; color: var(--paper);
  margin-bottom: 14px;
  transition: color var(--transition);
}
.hero-card:hover .hero-title { color: var(--gold2); }
.hero-excerpt {
  font-size: 13px; color: var(--gray);
  line-height: 1.85; font-weight: 300;
  flex: 1; margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-foot {
  display: flex; flex-direction: column; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.hero-foot-meta {
  display: flex; align-items: center; gap: 20px; flex-wrap: nowrap;
}
.hero-foot-actions {
  display: flex; justify-content: flex-end;
}
.art-source {
  font-family: var(--mono); font-size: 11px;
  color: var(--gray2); letter-spacing: 0.05em;
  white-space: nowrap;
}
.art-source strong { color: var(--gray); font-weight: 500; }
.read-btn {
  font-family: var(--mono); font-size: 10px;
  color: var(--gold); letter-spacing: 0.15em;
  border: 1px solid rgba(176,138,56,0.25);
  padding: 7px 20px;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.read-btn:hover { background: var(--gold-dim); border-color: rgba(176,138,56,0.5); }

/* ═══════════════════════════════════════════
   ARTICLE GRID (2-col)
═══════════════════════════════════════════ */
.art-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  margin-bottom: 2px;
}
.art-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  overflow: hidden; cursor: pointer;
  transition: border-color var(--transition);
  display: flex; flex-direction: column;
}
.art-card:hover { border-color: rgba(176,138,56,0.22); }
.art-card-img {
  height: 160px; overflow: hidden;
  flex-shrink: 0; position: relative;
}
.art-card-img-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a15 0%, #222220 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.art-card-img-inner::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 16px,
    rgba(237,230,208,0.015) 16px, rgba(237,230,208,0.015) 17px
  );
}
.art-card-img-inner::after {
  content: 'NO IMAGE';
  font-family: var(--mono); font-size: 8px;
  color: rgba(237,230,208,0.1); letter-spacing: 0.25em;
  position: absolute;
}
.art-card-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.art-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.art-card-title {
  font-family: var(--serif); font-size: 15px; font-weight: 500;
  color: var(--paper); line-height: 1.55; flex: 1;
  margin-bottom: 12px;
  transition: color var(--transition);
}
.art-card:hover .art-card-title { color: var(--gold2); }
.art-card-foot {
  margin-top: auto;
  font-family: var(--mono); font-size: 10px; color: var(--gray);
  display: flex; justify-content: space-between;
}

/* ═══════════════════════════════════════════
   ARTICLE ROWS (list)
═══════════════════════════════════════════ */
.art-rows { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.art-row {
  display: grid; grid-template-columns: 80px 1fr;
  background: var(--bg3);
  overflow: hidden; cursor: pointer;
  transition: background var(--transition);
}
.art-row:hover { background: rgba(237,230,208,0.03); }
.art-row-img {
  width: 80px; height: 80px; overflow: hidden;
  background: var(--bg4); flex-shrink: 0;
  display: block; /* 防止作为grid item时高度塌陷 */
}
.art-row-img-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1d1d18, #252520);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.art-row-img-inner::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 12px,
    rgba(237,230,208,0.018) 12px, rgba(237,230,208,0.018) 13px
  );
}
.art-row-body {
  padding: 11px 16px;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  min-width: 0;
}
.art-row-title {
  font-family: var(--serif); font-size: 14px; font-weight: 500;
  color: var(--paper); line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.art-row:hover .art-row-title { color: var(--gold2); }
.art-row-meta { display: flex; align-items: center; gap: 10px; }
.art-row-date { font-family: var(--mono); font-size: 10px; color: var(--gray); }
.art-row-src  { font-family: var(--mono); font-size: 10px; color: var(--gray); margin-left: auto; }

/* ═══════════════════════════════════════════
   DIVIDER
═══════════════════════════════════════════ */
.divider {
  display: flex; align-items: center; gap: 14px;
  margin: 36px 0; opacity: 0.2;
}
.divider-line { flex: 1; height: 1px; background: var(--paper); }
.divider-glyph {
  font-family: var(--mono); font-size: 11px; color: var(--paper);
  letter-spacing: 0.15em;
}

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.sb-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sb-head {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.sb-head-title {
  font-family: var(--mono); font-size: 10px;
  color: var(--gold); letter-spacing: 0.18em;
}
.sb-head-more {
  font-family: var(--mono); font-size: 9px;
  color: var(--gray2); letter-spacing: 0.1em; cursor: pointer;
  transition: color var(--transition);
}
.sb-head-more:hover { color: var(--gold); }
.sb-body { padding: 14px 16px; }

/* STAMP */
.stamp-wrap {
  display: flex; justify-content: center; padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}
.stamp {
  width: 90px; height: 90px; border-radius: 50%;
  border: 2px solid rgba(184,50,50,0.3);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  color: rgba(184,50,50,0.45);
  position: relative;
}
.stamp::before {
  content: ''; position: absolute;
  width: 98px; height: 98px; border-radius: 50%;
  border: 1px solid rgba(184,50,50,0.12);
}
.stamp::after {
  content: ''; position: absolute;
  width: 80px; height: 80px; border-radius: 50%;
  border: 1px dashed rgba(184,50,50,0.15);
}
.stamp-cn { font-family: var(--serif); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; }
.stamp-en { font-family: var(--mono); font-size: 7px; letter-spacing: 0.15em; }
.stamp-year { font-family: var(--mono); font-size: 9px; margin-top: 2px; }

/* ARCHIVE ROOMS */
.room-list { display: flex; flex-direction: column; gap: 2px; }
.room {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; background: rgba(237,230,208,0.02);
  border: 1px solid var(--border); cursor: pointer;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.room::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.rm-magic::before   { background: var(--red); }
.rm-laugh::before   { background: var(--orange); }
.rm-ban::before     { background: var(--purple); }
.rm-amazing::before { background: var(--gold); }
.room:hover { background: rgba(237,230,208,0.04); }
.room-name { font-family: var(--serif); font-size: 14px; color: var(--paper); }
.room-r { display: flex; align-items: center; gap: 8px; }
.room-cnt { font-family: var(--mono); font-size: 11px; color: var(--gray2); }
.room-arr { font-size: 13px; color: var(--gray2); transition: transform var(--transition); }
.room:hover .room-arr { transform: translateX(3px); color: var(--gold); }

/* RECENT LIST */
.recent-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.recent-item:last-child { border-bottom: none; padding-bottom: 0; }
.recent-item:hover { padding-left: 4px; }
.recent-thumb {
  width: 48px; height: 48px; flex-shrink: 0;
  background: var(--bg4); border: 1px solid var(--border);
  overflow: hidden;
}
.recent-thumb-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1d1d18, #28281f);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 8px; color: var(--gray2);
}
.recent-text { min-width: 0; }
.recent-title {
  font-family: var(--serif); font-size: 12px; color: var(--paper);
  line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 4px;
  transition: color var(--transition);
}
.recent-item:hover .recent-title { color: var(--gold2); }
.recent-meta { font-family: var(--mono); font-size: 9px; color: var(--gray2); }

/* RANKED LIST */
.ranked-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: all var(--transition);
}
.ranked-item:last-child { border-bottom: none; padding-bottom: 0; }
.ranked-item:hover { padding-left: 4px; }
.rank-num {
  font-family: var(--mono); font-size: 18px;
  color: var(--gray2); line-height: 1;
  flex-shrink: 0; width: 20px; text-align: right;
  margin-top: 2px;
}
.ranked-item:nth-child(1) .rank-num { color: var(--gold); }
.ranked-item:nth-child(2) .rank-num { color: var(--paper3); }
.ranked-item:nth-child(3) .rank-num { color: #a8966e; }
.ranked-title {
  font-family: var(--serif); font-size: 13px; color: var(--paper2);
  line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.ranked-item:hover .ranked-title { color: var(--gold2); }

/* TAG CLOUD */
.tag-cloud {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 164px; overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}
.tag-cloud.expanded { max-height: 600px; }
.tag-expand {
  display: block; width: 100%; margin-top: 10px;
  font-family: var(--mono); font-size: 9px;
  color: var(--gray2); letter-spacing: 0.12em;
  background: none; border: 1px solid var(--border2);
  padding: 5px 0; text-align: center; cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.tag-expand:hover { color: var(--gold); border-color: rgba(176,138,56,0.3); }
.tag-item {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray); letter-spacing: 0.06em;
  border: 1px solid var(--border2); padding: 4px 10px;
  cursor: pointer; transition: all var(--transition);
}
.tag-item:hover { color: var(--paper); border-color: rgba(176,138,56,0.3); background: var(--gold-dim); }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 40px 28px;
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start;
}
.footer-brand-name {
  font-family: var(--serif); font-size: 20px; font-weight: 600;
  color: var(--paper2);
}
.footer-tagline {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray2); letter-spacing: 0.18em;
  margin-top: 8px;
}
.footer-desc {
  font-size: 12px; color: var(--gray); line-height: 1.8;
  margin-top: 14px; font-weight: 300; max-width: 360px;
}
.footer-nav {
  display: flex; gap: 24px; flex-wrap: wrap;
  justify-content: flex-end; align-items: flex-start;
}
.footer-nav a {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray); letter-spacing: 0.1em;
  padding: 2px 0; transition: color var(--transition);
}
.footer-nav a:hover { color: var(--gold); }
.footer-bottom {
  max-width: 1280px; margin: 0 auto; padding: 14px 28px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 5px;
  font-family: var(--mono); font-size: 9px;
  color: var(--gray2); letter-spacing: 0.08em;
}
.footer-disclaimer {
  color: var(--gray2);
  font-size: 8.5px; line-height: 1.7; letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════
   ──── ARTICLE PAGE ────
═══════════════════════════════════════════ */
#articleView { display: none; }
#articleView.active { display: block; }

.art-page {
  max-width: 1280px; margin: 0 auto; padding: 40px 28px 80px;
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto auto auto auto auto auto auto auto;
  gap: 0 52px;
  animation: revealUp 0.5s ease both;
}

/* BREADCRUMB */
.breadcrumb {
  grid-column: 1 / -1; grid-row: 1;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; color: var(--gray2);
  margin-bottom: 8px; letter-spacing: 0.08em;
  padding-bottom: 0;
}
.breadcrumb a { cursor: pointer; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { opacity: 0.6; }

/* ARTICLE HEADER */
.art-header {
  grid-column: 1; grid-row: 2;
  padding-bottom: 28px; border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.art-header-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.art-accession {
  font-family: var(--mono); font-size: 10px;
  color: var(--gold); letter-spacing: 0.2em;
  border: 1px solid rgba(176,138,56,0.25);
  padding: 3px 10px;
}
.art-h-title {
  font-family: var(--serif); font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 700; line-height: 1.45;
  color: var(--paper); margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.art-byline {
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap;
}
.byline-item {
  display: flex; flex-direction: column; gap: 2px;
}
.byline-label {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray); letter-spacing: 0.12em;
}
.byline-value {
  font-family: var(--sans); font-size: 14px;
  color: var(--paper); font-weight: 400;
}
.byline-divider { width: 1px; height: 30px; background: var(--border2); }

/* ARTICLE HERO IMAGE */
.art-hero-img {
  grid-column: 1; grid-row: 4;
  width: 100%; aspect-ratio: 16/7; overflow: hidden;
  background: var(--bg3); border: 1px solid var(--border);
  margin-bottom: 28px; position: relative;
}
.art-hero-img-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a15 0%, #252520 45%, #1d1d18 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.art-hero-img-inner::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(237,230,208,0.01) 3px, rgba(237,230,208,0.01) 6px);
}
.art-hero-img-label {
  font-family: var(--mono); font-size: 10px; color: var(--gray2);
  letter-spacing: 0.15em; z-index: 1;
}
.art-hero-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 16px;
  background: rgba(11,11,9,0.7);
  font-family: var(--mono); font-size: 9px; color: var(--gray);
  letter-spacing: 0.08em;
}

/* ARTICLE CONTENT */
.art-content {
  grid-column: 1; grid-row: 5;
  font-family: var(--serif); font-size: 16px;
  color: var(--paper2); line-height: 1.9; font-weight: 300;
}
.art-content p { margin-bottom: 1.5em; text-indent: 2em; }
.art-content p:last-child { margin-bottom: 0; }
.art-content strong { font-weight: 600; color: var(--paper); }
.art-content em {  }
.art-content blockquote {
  border-left: 3px solid var(--gold);
  margin: 2em 0; padding: 16px 24px;
  background: rgba(176,138,56,0.04);
   color: var(--paper3);
}
.art-content blockquote p { margin: 0; text-indent: 0; }

/* DELETED NOTICE */
.deleted-notice {
  grid-column: 1; grid-row: 3;
  border: 1px solid rgba(184,50,50,0.3);
  background: rgba(184,50,50,0.05);
  padding: 14px 18px;
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 20px;
}
.del-icon {
  font-family: var(--mono); font-size: 9px;
  color: var(--red); letter-spacing: 0.2em;
  border: 1px solid rgba(184,50,50,0.4);
  padding: 3px 8px; flex-shrink: 0; margin-top: 1px;
}
.del-text {
  font-family: var(--serif); font-size: 13px;
  color: var(--paper3); line-height: 1.7; 
}
.del-text strong { color: var(--paper2); font-style: normal; }

/* ARTICLE TAGS */
.art-tags {
  grid-column: 1; grid-row: 6;
  display: flex; align-items: center; gap: 10px;
  padding-top: 28px; border-top: 1px solid var(--border);
  margin-top: 28px; flex-wrap: wrap;
}
.art-tags-label {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray2); letter-spacing: 0.15em;
}

/* ═══════════════════════════════════════════
   AI COMMENTARY
═══════════════════════════════════════════ */
.ai-commentary {
  border: 1px solid rgba(176,138,56,0.2);
  background: linear-gradient(160deg, rgba(176,138,56,0.04) 0%, transparent 60%);
  overflow: hidden;
}
.ai-commentary-head {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(176,138,56,0.15);
  display: flex; flex-direction: column; gap: 10px;
}
.ai-head-top {
  display: flex; align-items: center; justify-content: space-between;
}
.ai-head-left {
  display: flex; align-items: center; gap: 8px;
}
.ai-label {
  font-family: var(--mono); font-size: 10px;
  color: var(--gold); letter-spacing: 0.2em;
}
.ai-badge {
  font-family: var(--mono); font-size: 9px;
  color: var(--gray); letter-spacing: 0.1em;
  border: 1px solid var(--border2); padding: 2px 8px;
}
.ai-generate-btn {
  font-family: var(--mono); font-size: 10px;
  color: var(--bg); background: var(--gold);
  border: none; padding: 7px 0;
  cursor: pointer; letter-spacing: 0.12em;
  transition: background var(--transition), opacity var(--transition);
  width: 100%; text-align: center;
}
.ai-generate-btn:hover { background: var(--gold2); }
.ai-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ai-commentary-body {
  padding: 16px 16px 14px;
  min-height: 80px;
}
.ai-placeholder {
  display: flex; align-items: center; gap: 14px;
  color: var(--gray); font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.1em;
}
.ai-placeholder-icon {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(176,138,56,0.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--gold); font-size: 14px;
}

/* 生成中动画 */
.ai-loading {
  display: none;
  align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px;
  color: var(--gray); letter-spacing: 0.1em;
  padding: 4px 0;
}
.ai-loading.active { display: flex; }
.ai-dots span {
  display: inline-block; width: 4px; height: 4px;
  background: var(--gold); border-radius: 50%; margin: 0 2px;
  animation: dotBounce 1.2s ease infinite;
}
.ai-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
  0%,80%,100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* 输出文字 */
.ai-output {
  display: none;
}
.ai-output.active { display: block; }
.ai-output-sections {
  display: flex; flex-direction: column; gap: 20px;
}
.ai-section {}
.ai-section-label {
  font-family: var(--mono); font-size: 9px;
  color: var(--gold); letter-spacing: 0.2em;
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.ai-section-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(176,138,56,0.2), transparent);
}
.ai-section-text {
  font-family: var(--serif); font-size: 14px;
  color: var(--paper2); line-height: 1.85; font-weight: 300;
  text-indent: 2em;
}
.ai-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.ai-footer-note {
  font-family: var(--mono); font-size: 9px;
  color: var(--gray2); letter-spacing: 0.08em;
}
.ai-regenerate {
  font-family: var(--mono); font-size: 9px;
  color: var(--gray); letter-spacing: 0.1em;
  cursor: pointer; background: none; border: none;
  transition: color var(--transition); padding: 0;
}
.ai-regenerate:hover { color: var(--gold); }

/* ARTICLE SIDEBAR */
.art-sidebar {
  grid-column: 2;
  grid-row: 2 / 9;
  align-self: start;
}
.art-sb-sticky {
  position: sticky; top: 80px;
}
.art-sb-block {
  background: var(--bg3); border: 1px solid var(--border);
  overflow: hidden; margin-bottom: 20px;
}

/* SOURCE CARD */
.source-card {
  padding: 0;
  position: relative;
  overflow: hidden;
}
/* 顶部金色装饰条 */
.source-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), rgba(176,138,56,0.2), transparent);
}
/* 右上角暗纹装饰 */
.source-card::after {
  content: '404';
  position: absolute; top: 16px; right: 16px;
  font-family: var(--mono); font-size: 48px; font-weight: 700;
  color: rgba(176,138,56,0.04); letter-spacing: -2px;
  pointer-events: none; line-height: 1;
  user-select: none;
}
.source-card-inner { padding: 18px 20px 20px; }
.source-label {
  font-family: var(--mono); font-size: 9px;
  color: var(--gold); letter-spacing: 0.22em;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.source-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(176,138,56,0.25), transparent);
}

/* 馆藏编号大字展示 */
.source-accession {
  font-family: var(--mono); font-size: 28px; font-weight: 700;
  color: var(--paper); letter-spacing: 0.05em;
  line-height: 1; margin-bottom: 18px;
  display: flex; align-items: baseline; gap: 6px;
}
.source-accession-hash {
  font-size: 16px; color: var(--gold); font-weight: 400;
}

.source-rows { display: flex; flex-direction: column; }
.source-row {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.source-row:last-child { border-bottom: none; }
.source-row-label {
  font-family: var(--mono); font-size: 9px;
  color: var(--gray2); letter-spacing: 0.12em;
}
.source-row-value {
  font-family: var(--serif); font-size: 13px;
  color: var(--paper); font-weight: 400;
  text-align: right;
}
.source-row-value a {
  color: var(--gold); font-size: 10px;
  font-family: var(--mono); letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(176,138,56,0.3);
  transition: border-color var(--transition);
}
.source-row-value a:hover { border-color: var(--gold); }

/* 404状态徽章 */
.source-status {
  margin: 16px 0 0;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(184,50,50,0.06);
  border: 1px solid rgba(184,50,50,0.2);
}
.status-404 {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.15em; padding: 3px 8px;
  background: var(--red-dim); color: var(--red);
  border: 1px solid rgba(184,50,50,0.35);
}
.status-text {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray); letter-spacing: 0.05em;
}
/* 底部装饰 */
.source-card-foot {
  padding: 10px 20px;
  background: rgba(176,138,56,0.04);
  border-top: 1px solid rgba(176,138,56,0.1);
  display: flex; align-items: center; justify-content: space-between;
}
.source-card-stamp {
  font-family: var(--mono); font-size: 8px;
  color: rgba(176,138,56,0.3); letter-spacing: 0.2em;
}
.source-card-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(176,138,56,0.2);
}

/* ═══════════════════════════════════════════
   CATEGORY / TAG PAGE
═══════════════════════════════════════════ */
.cat-page {
  max-width: 1280px; margin: 0 auto;
  padding: 0 28px 80px;
  animation: revealUp 0.4s ease both;
}

/* 分类头 */
.cat-header {
  padding: 44px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.cat-header-inner {}
.cat-breadcrumb {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray2); letter-spacing: 0.1em;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}
.cat-breadcrumb span:first-child:hover { color: var(--gold); }
.crumb-sep { color: var(--gray2); opacity: 0.65; }

.cat-title-row {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 14px;
}
.cat-pip-large {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.cat-pip-magic  { background: var(--red); box-shadow: 0 0 8px var(--red); }
.cat-pip-laugh  { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.cat-pip-ban    { background: var(--purple); box-shadow: 0 0 8px var(--purple); }
.cat-pip-amazing{ background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.tag-hash {
  font-family: var(--mono); font-size: 28px;
  color: var(--gold); line-height: 1; opacity: 0.6;
}
.cat-title {
  font-family: var(--serif); font-size: 32px; font-weight: 600;
  color: var(--paper); letter-spacing: 0.02em;
}
.cat-count-badge {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray); letter-spacing: 0.12em;
  border: 1px solid var(--border2); padding: 4px 12px;
  margin-left: 4px; align-self: center;
}
.cat-desc {
  font-size: 13px; color: var(--gray); line-height: 1.8;
  font-weight: 300; max-width: 600px;
}

/* 标签头 */
.tag-header {
  padding: 44px 0 32px;
  border-bottom: 1px solid var(--border);
}

/* 工具栏 */
.cat-toolbar {
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky; top: calc(36px + 45px); z-index: 100;
}
.cat-toolbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
}
.cat-sort { display: flex; align-items: center; gap: 6px; }
.sort-label {
  font-family: var(--mono); font-size: 9px;
  color: var(--gray2); letter-spacing: 0.15em; margin-right: 6px;
}
.sort-btn {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray2); letter-spacing: 0.1em;
  padding: 5px 12px; border: 1px solid transparent;
  cursor: pointer; transition: all var(--transition);
}
.sort-btn:hover { color: var(--paper); border-color: var(--border2); }
.sort-btn.active {
  color: var(--gold); border-color: rgba(176,138,56,0.3);
  background: rgba(176,138,56,0.06);
}
.cat-view-toggle { display: flex; gap: 4px; }
.view-btn {
  font-size: 14px; color: var(--gray2); cursor: pointer;
  padding: 4px 8px; border: 1px solid transparent;
  transition: all var(--transition); line-height: 1;
}
.view-btn:hover { color: var(--paper); }
.view-btn.active { color: var(--gold); border-color: rgba(176,138,56,0.3); }

/* 컨텐츠 영역 */
.cat-content { padding-top: 28px; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}

/* 분页 */
.cat-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 40px 0 0;
}
.page-btn {
  font-family: var(--mono); font-size: 11px;
  color: var(--gray); letter-spacing: 0.08em;
  padding: 7px 14px; border: 1px solid var(--border2);
  cursor: pointer; background: var(--bg3);
  transition: all var(--transition);
}
.page-btn:hover:not(.disabled):not(.active) {
  color: var(--paper); border-color: rgba(237,230,208,0.2);
}
.page-btn.active {
  color: var(--gold); border-color: rgba(176,138,56,0.4);
  background: rgba(176,138,56,0.08);
}
.page-btn.disabled { opacity: 0.3; cursor: not-allowed; }
.page-ellipsis {
  font-family: var(--mono); color: var(--gray2);
  padding: 0 4px;
}

/* 响应式 */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .cat-page { padding: 0 16px 48px; }
  .cat-header { padding: 28px 0 20px; }
  .cat-title { font-size: 24px; }
  .cat-toolbar { top: calc(36px + 43px); }
  .cat-toolbar-inner { flex-wrap: wrap; gap: 8px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .sort-btn { padding: 4px 8px; font-size: 9px; }
  .cat-pagination { flex-wrap: wrap; padding-top: 28px; }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — iPad (768–1024px)
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  /* masthead缩小 */
  .masthead { padding: 36px 20px 28px; gap: 20px; }
  .brand-title { font-size: clamp(36px, 5vw, 56px); }
  .brand-sub { font-size: 10px; letter-spacing: 0.14em; }
  .masthead-motto { font-size: 13px; }
  .mstat-num { font-size: 18px; }

  /* 导航padding缩小 */
  .nav-link { padding: 13px 14px; font-size: 13px; gap: 7px; }
  .nav-inner { padding: 0 20px; }

  /* 主布局：侧边栏缩小到240px */
  .page-wrap {
    grid-template-columns: 1fr 240px;
    gap: 28px;
    padding: 28px 20px 60px;
  }

  /* hero卡片图片高度降低 */
  .hero-img { height: 240px; }
  .hero-body { padding: 22px 20px; }
  .hero-title { font-size: 18px; }

  /* 文章页侧边栏缩到220px */
  .art-page {
    grid-template-columns: 1fr 220px;
    gap: 0 32px;
    padding: 28px 20px 60px;
  }
  .art-h-title { font-size: clamp(22px, 3vw, 32px); }
  .art-content { font-size: 15px; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — 手机+iPad竖屏 (<768px)
═══════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── 工具栏 ── */
  .util-bar { height: auto; padding: 8px 0; }
  .util-inner { padding: 0 16px; }
  .util-links { display: none; }
  .util-text { font-size: 9px; letter-spacing: 0.06em; }

  /* ── masthead ── */
  .masthead {
    grid-template-columns: 1fr;
    padding: 28px 16px 22px;
    gap: 16px;
  }
  .brand-kicker { font-size: 9px; margin-bottom: 10px; }
  .brand-title { font-size: clamp(32px, 9vw, 48px); }
  .brand-sub { font-size: 9px; letter-spacing: 0.12em; margin-top: 10px; }
  .masthead-right { text-align: left; }
  .masthead-motto { font-size: 13px; line-height: 1.7; }
  .masthead-stats {
    justify-content: flex-start;
    gap: 16px;
    margin-top: 14px;
  }
  .mstat { padding-right: 16px; }
  .mstat-num { font-size: 20px; }
  .mstat-label { font-size: 9px; }

  /* ── 导航：横向滚动 ── */
  .primary-nav { top: 36px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-inner { padding: 0; min-width: max-content; }
  .nav-link { padding: 12px 16px; font-size: 13px; white-space: nowrap; }
  .nav-search { padding: 12px 16px; }

  /* ── 主布局：单列 ── */
  .page-wrap {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 16px 16px 48px;
  }
  .sidebar { display: none; }

  /* ── Ticker ── */
  .ticker { margin-bottom: 16px; }
  .ticker-label { font-size: 9px; padding: 0 10px; }
  .ticker-item { font-size: 12px; padding: 0 20px; }

  /* ── Section header ── */
  .sec-hd { margin-bottom: 14px; }
  .sec-title { font-size: 15px; }
  .sec-en { display: none; } /* 手机上隐藏英文副标题 */

  /* ── Hero card：上图下文 ── */
  .hero-card { grid-template-columns: 1fr; }
  .hero-img { height: 200px; }
  .hero-body { padding: 18px 16px 20px; }
  .hero-title { font-size: 17px; line-height: 1.5; }
  .hero-excerpt { font-size: 12px; -webkit-line-clamp: 3; }

  /* ── 2列卡片改为1列 ── */
  .art-grid { grid-template-columns: 1fr; }
  .art-card-img { height: 140px; }
  .art-card-title { font-size: 14px; }

  /* ── 行列表缩小缩略图 ── */
  .art-row { grid-template-columns: 64px 1fr; }
  .art-row-img { width: 64px; height: 64px; }
  .art-row-body { padding: 9px 12px; gap: 4px; }
  .art-row-title { font-size: 13px; }
  .art-row-src { display: none; } /* 手机隐藏来源，太拥挤 */

  /* ── 分隔线 ── */
  .divider { margin: 24px 0; }

  /* ── Footer ── */
  .site-footer {}
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 16px;
  }
  .footer-brand-name { font-size: 16px; }
  .footer-nav {
    justify-content: flex-start;
    gap: 16px;
  }
  .footer-bottom {
    padding: 12px 16px;
    flex-direction: column;
    gap: 4px;
    font-size: 8px;
  }

  /* ── 文章页 ── */
  .art-page {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 0;
    padding: 16px 16px 48px;
  }
  .art-sidebar { display: none; }
  .breadcrumb { grid-column: 1; grid-row: auto; font-size: 9px; margin-bottom: 12px; }
  .art-header  { grid-column: 1; grid-row: auto; padding-bottom: 20px; margin-bottom: 20px; }
  .art-header-meta { gap: 8px; flex-wrap: wrap; }
  .art-accession { font-size: 9px; }
  .art-h-title { font-size: clamp(20px, 5.5vw, 28px); margin-bottom: 16px; }
  .art-byline { gap: 12px; }
  .byline-divider { display: none; }
  .byline-label { font-size: 9px; }
  .byline-value { font-size: 12px; }
  .deleted-notice { grid-column: 1; grid-row: auto; padding: 12px 14px; margin-bottom: 16px; }
  .del-text { font-size: 12px; }
  .art-hero-img { grid-column: 1; grid-row: auto; margin-bottom: 20px; }
  .art-content { grid-column: 1; grid-row: auto; font-size: 15px; }
  .art-tags { grid-column: 1; grid-row: auto; margin-top: 20px; padding-top: 20px; }
  .art-share { grid-column: 1; grid-row: auto; }
  .art-nav-posts { grid-column: 1; grid-row: auto; grid-template-columns: 1fr; }
  .ai-commentary-head { padding: 12px 14px; flex-wrap: wrap; gap: 10px; }
  .ai-commentary-body { padding: 16px 14px; }
  .ai-footer { padding: 10px 14px; }
  .ai-section-text { font-size: 13px; }

  /* ── 文章页nav（返回首页） ── */
  #articleView .primary-nav { animation: none; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — 小手机 (<390px)
═══════════════════════════════════════════ */
@media (max-width: 390px) {
  .brand-title { font-size: 30px; }
  .hero-title { font-size: 15px; }
  .art-h-title { font-size: 18px; }
  .masthead-stats { gap: 12px; }
  .mstat-num { font-size: 17px; }
}

/* ═══════════════════════════════════════════
   阅读进度条
═══════════════════════════════════════════ */
#readProgress {
  position: fixed; top: 0; left: 0; z-index: 9998;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   返回顶部
═══════════════════════════════════════════ */
#backToTop {
  position: fixed; bottom: 32px; right: 28px; z-index: 500;
  width: 40px; height: 40px;
  background: var(--bg3); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity 0.3s, border-color var(--transition), background var(--transition);
  font-family: var(--mono); font-size: 14px; color: var(--gray);
}
#backToTop.visible { opacity: 1; pointer-events: auto; }
#backToTop:hover { background: var(--bg4); border-color: rgba(176,138,56,0.4); color: var(--gold); }

/* ═══════════════════════════════════════════
   分享按钮
═══════════════════════════════════════════ */
.art-share {
  grid-column: 1; grid-row: 7;
  display: flex; align-items: center; gap: 10px;
  padding-top: 24px; margin-top: 4px;
  flex-wrap: wrap;
}

/* 上下篇导航 */
.art-nav-posts {
  grid-column: 1 / -1; grid-row: 9;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  margin-top: 40px; border-top: 1px solid var(--border); padding-top: 0;
}
.art-nav-prev, .art-nav-next {
  padding: 20px 24px;
  background: var(--bg2); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
  transition: all var(--transition); text-decoration: none;
}
.art-nav-prev:hover, .art-nav-next:hover {
  background: var(--bg3); border-color: rgba(176,138,56,0.25);
}
.art-nav-next { text-align: right; }
.art-nav-label {
  font-family: var(--mono); font-size: 9px;
  color: var(--gray2); letter-spacing: 0.15em;
}
.art-nav-title {
  font-family: var(--serif); font-size: 13px;
  color: var(--paper2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.art-nav-prev:hover .art-nav-title,
.art-nav-next:hover .art-nav-title { color: var(--gold2); }
.share-label {
  font-family: var(--mono); font-size: 9px;
  color: var(--gray2); letter-spacing: 0.15em;
}
.share-btn {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray); letter-spacing: 0.1em;
  border: 1px solid var(--border2); padding: 6px 14px;
  cursor: pointer; background: none;
  transition: all var(--transition); display: flex; align-items: center; gap: 6px;
}
.share-btn:hover { color: var(--gold); border-color: rgba(176,138,56,0.4); background: var(--gold-dim); }
.share-btn.copied { color: #3a9a5c; border-color: rgba(58,154,92,0.4); }

/* ═══════════════════════════════════════════
   搜索覆盖层
═══════════════════════════════════════════ */
#searchOverlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(11,11,9,0.92);
  backdrop-filter: blur(8px);
  display: none; flex-direction: column; align-items: center;
  padding-top: 12vh;
  animation: fadeIn 0.2s ease;
}
#searchOverlay.active { display: flex; }
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }

.search-box {
  width: 100%; max-width: 680px; padding: 0 24px;
}
.search-input-wrap {
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 12px; margin-bottom: 32px;
}
.search-input-wrap svg { color: var(--gold); flex-shrink: 0; }
#searchInput {
  flex: 1; background: none; border: none; outline: none;
  font-family: var(--serif); font-size: 24px;
  color: var(--paper); caret-color: var(--gold);
}
#searchInput::placeholder { color: var(--gray2); }
.search-close {
  font-family: var(--mono); font-size: 11px;
  color: var(--gray2); cursor: pointer; letter-spacing: 0.1em;
  flex-shrink: 0; padding: 4px 8px;
  transition: color var(--transition);
}
.search-close:hover { color: var(--paper); }

.search-results { width: 100%; }
.search-hint {
  font-family: var(--mono); font-size: 11px;
  color: var(--gray2); letter-spacing: 0.1em; text-align: center;
  padding: 20px 0;
}
.search-result-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0; cursor: pointer;
  transition: padding var(--transition);
}
.search-result-item:hover { padding-left: 8px; }
.sri-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sri-title {
  font-family: var(--serif); font-size: 16px;
  color: var(--paper); line-height: 1.5;
  margin-bottom: 6px;
  transition: color var(--transition);
}
.search-result-item:hover .sri-title { color: var(--gold2); }
.sri-excerpt {
  font-size: 13px; color: var(--gray); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.sri-title mark, .sri-excerpt mark {
  background: rgba(176,138,56,0.25); color: var(--gold2);
  border-radius: 2px; padding: 0 2px;
}
.search-count {
  font-family: var(--mono); font-size: 10px;
  color: var(--gray2); letter-spacing: 0.1em;
  padding: 12px 0 20px; text-align: center;
}
@media (max-width: 768px) {
  #searchOverlay { padding-top: 8vh; }
  #searchInput { font-size: 18px; }
  .search-box { padding: 0 16px; }
  #backToTop { bottom: 20px; right: 16px; }
}