/* ============================================================
   智元矩阵 ZHIYUAN MATRIX · Liquid Glass Design System v4 PRO
   全栈精修版 —— 更精致的玻璃质感 · 更清晰的层级 · 更流畅的交互
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  color-scheme: light;

  /* 液态玻璃材质 */
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.75);
  --glass-subtle: rgba(255, 255, 255, 0.35);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-edge: rgba(255, 255, 255, 0.9);
  --glass-hl: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --glass-blur: blur(12px) saturate(160%);

  /* 背景渐变 —— 更柔和的色彩 */
  --bg: #EDEEF4;
  --bg-grad:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(99, 132, 255, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 45% at 80% 10%, rgba(189, 147, 249, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(125, 211, 252, 0.15), transparent 55%),
    linear-gradient(180deg, #EDEEF4 0%, #E8EAF2 100%);

  --bg-2: rgba(255, 255, 255, 0.4);
  --surface: rgba(255, 255, 255, 0.4);
  --text: #131620;
  --text-2: #2D3142;
  --muted: #5A6072;
  --faint: #8B91A3;
  --accent: #0A84FF;
  --accent-2: #BF5AF2;
  --accent-deep: #0066CC;
  --accent-soft: rgba(10, 132, 255, 0.1);
  --warm: #FF6B5B;
  --danger: #FF3B30;
  --success: #30D158;

  --line: rgba(255, 255, 255, 0.5);
  --line-soft: rgba(255, 255, 255, 0.3);
  --line-strong: rgba(255, 255, 255, 0.8);

  --shadow-1: 0 2px 12px rgba(30, 40, 80, 0.06);
  --shadow-2: 0 8px 28px rgba(30, 40, 80, 0.1);
  --shadow-3: 0 20px 60px rgba(30, 40, 80, 0.15);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --nav-h: 60px;
  --maxw: 1120px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "HarmonyOS Sans SC", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-1: .18s;
  --dur-2: .3s;
  --dur-3: .5s;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --glass: rgba(28, 30, 44, 0.55);
  --glass-strong: rgba(38, 40, 56, 0.72);
  --glass-subtle: rgba(28, 30, 44, 0.3);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-edge: rgba(255, 255, 255, 0.18);
  --glass-hl: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --glass-blur: blur(12px) saturate(140%);

  --bg: #0A0C12;
  --bg-grad:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(70, 90, 200, 0.15), transparent 60%),
    radial-gradient(ellipse 60% 45% at 80% 10%, rgba(140, 70, 190, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(50, 130, 190, 0.1), transparent 55%),
    linear-gradient(180deg, #0A0C12 0%, #0E1018 100%);

  --bg-2: rgba(255, 255, 255, 0.04);
  --surface: rgba(255, 255, 255, 0.05);
  --text: #F0F1F5;
  --text-2: #C8CAD4;
  --muted: #9CA0B0;
  --faint: #666B7A;
  --accent: #64D2FF;
  --accent-2: #DA8FFF;
  --accent-deep: #40C0FF;
  --accent-soft: rgba(100, 210, 255, 0.12);
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --line-strong: rgba(255, 255, 255, 0.16);
  --shadow-1: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg);
  background-image: var(--bg-grad);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px; line-height: 1.65; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transform: translateZ(0);
}
body::before { display: none !important; }
::selection { background: var(--accent); color: #fff; }
a { color: var(--accent); text-decoration: none; transition: color var(--dur-1) var(--ease); }
a:hover { color: var(--accent-deep); }
img, video, canvas, svg { max-width: 100%; height: auto; display: block; }
hr { border: none; height: 1px; background: var(--line-soft); margin: 48px 0; }
main { position: relative; z-index: 1; }
.wrap { width: min(var(--maxw), calc(100% - 48px)); margin-inline: auto; }
.huiwen { display: none !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 100, 120, 0.2); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 100, 120, 0.35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-xs); }

/* ---------- 3. 导航 ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: var(--glass-hl);
  transition: all var(--dur-2) var(--ease);
}
.nav.scrolled { height: 54px; background: var(--glass-strong); box-shadow: var(--glass-hl), var(--shadow-1); }
.nav-inner { width: min(1200px, calc(100% - 48px)); margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.nav-brand .brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; line-height: 1.1; }
.nav-brand .brand-sub { display: block; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .2em; color: var(--faint); margin-top: 2px; }

.seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700; font-size: 14px;
  box-shadow: var(--glass-hl), 0 4px 12px var(--accent-soft);
}
.seal-sm { width: 24px; height: 24px; font-size: 11px; border-radius: 7px; }
.seal-lg { width: 52px; height: 52px; font-size: 22px; border-radius: 14px; }

.nav-links { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.nav-links a {
  padding: 7px 14px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: all var(--dur-1) var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--glass-subtle); }
.nav-links a.active { color: var(--text); font-weight: 600; background: var(--glass-strong); box-shadow: var(--glass-hl); }

.nav-toggle {
  display: none; margin-left: auto;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border: 1px solid var(--glass-border); border-radius: 10px;
  background: var(--glass-subtle); color: var(--text);
  cursor: pointer; font-size: 16px;
}

.nav-search, .nav-login {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 5px 14px;
  border-radius: var(--r-pill);
  background: var(--glass-subtle);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-hl);
  color: var(--text); cursor: pointer; font-size: 13px;
  transition: all var(--dur-2) var(--ease);
}
.nav-search:hover, .nav-login:hover { background: var(--glass-strong); }

/* ---------- 4. 首屏 ---------- */
.hero {
  position: relative; min-height: 80vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--nav-h) + 64px) 0 72px;
  overflow: hidden;
}
.hero-ink { position: absolute; inset: 0; pointer-events: none; opacity: .3; }
.hero-content { position: relative; z-index: 2; width: 100%; max-width: 840px; margin-inline: auto; padding-inline: 24px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-subtle);
  box-shadow: var(--glass-hl);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  color: var(--muted); text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 4.2rem);
  line-height: 1.05; letter-spacing: -0.035em;
  margin: 24px 0 18px; color: var(--text);
}
.hero-title .zhu {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-divider {
  width: 48px; height: 3px; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  margin: 0 auto 20px;
}
.hero-sub { font-size: clamp(1rem, 2vw, 1.12rem); color: var(--muted); max-width: 600px; margin: 0 auto 32px; line-height: 1.75; }
.hero-byline { font-size: 14px; color: var(--faint); margin-top: 24px; }
.author-name { color: var(--text-2); font-weight: 600; letter-spacing: 0.02em; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-seal { display: none; }

.page-head { padding: calc(var(--nav-h) + 64px) 0 8px; }
.page-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 12px; letter-spacing: -0.035em;
}
.page-desc { color: var(--muted); margin: 0 0 36px; max-width: 640px; font-size: 15px; line-height: 1.7; }
.vt-title { display: none; }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; border-radius: var(--r-pill);
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  letter-spacing: -0.01em; cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--dur-2) var(--ease);
}
.btn-red {
  background: linear-gradient(135deg, var(--accent), #007AFF);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-soft), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-soft), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn-ghost {
  background: var(--glass);
  border-color: var(--glass-border);
  box-shadow: var(--glass-hl);
  color: var(--text);
}
.btn-ghost:hover { background: var(--glass-strong); transform: translateY(-2px); box-shadow: var(--glass-hl), var(--shadow-1); }
.btn:active { transform: translateY(0) scale(.98); }

.more-btn {
  background: var(--glass-subtle) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-hl);
  border-radius: var(--r-pill) !important;
  color: var(--muted) !important;
  font-size: 12px !important; font-weight: 500;
  padding: 6px 14px !important; cursor: pointer;
  transition: all var(--dur-1) var(--ease) !important;
}
.more-btn:hover { background: var(--glass-strong) !important; color: var(--text) !important; }

.mini-btn {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--glass-subtle);
  border: 1px solid var(--glass-border);
  color: var(--muted); font-size: 12px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: all var(--dur-1) var(--ease);
}
.mini-btn:hover { background: var(--glass-strong); color: var(--text); }
.mini-btn.danger:hover { background: rgba(255, 59, 48, 0.12); color: var(--danger); }

/* ---------- 6. 区块 ---------- */
.section { padding: 72px 0 8px; position: relative; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 32px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  margin: 0; letter-spacing: -0.025em; color: var(--text);
}
.section-more { font-size: 13px; color: var(--muted); border: none; background: none; padding: 0; white-space: nowrap; cursor: pointer; }
.section-more:hover { color: var(--accent); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); overflow: hidden; margin-top: 36px;
  background: var(--glass);
  box-shadow: var(--glass-hl), var(--shadow-1);
}
.stat { padding: 28px 20px; background: transparent; text-align: center; transition: background var(--dur-1) var(--ease); }
.stat:hover { background: var(--glass-subtle); }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.stat-num sup { font-size: .4em; color: var(--accent); vertical-align: super; }
.stat-label { margin-top: 10px; font-size: 11px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }

/* ---------- 7. 卡片 ---------- */
.card-grid, .grid-2, .grid-3, .grid-4 { display: grid; gap: 18px; }
.card-grid { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; display: flex; flex-direction: column;
  padding: 24px;
  border: 1px solid var(--glass-border); border-radius: var(--r-lg);
  background: var(--glass);
  box-shadow: var(--glass-hl), var(--shadow-1);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
  text-decoration: none; color: inherit;
}
.card:hover {
  box-shadow: var(--glass-hl), var(--shadow-2);
  transform: translateY(-3px);
}

.card-tag, .chip, .tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 500;
  background: var(--glass-subtle);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  transition: all var(--dur-1) var(--ease);
}
.card-tag.gold { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip { cursor: pointer; }
.chip:hover { background: var(--glass-strong); color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tag::before { content: "#"; color: var(--faint); margin-right: 1px; }

.card-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.4; margin: 12px 0 8px; letter-spacing: -0.02em; }
.card-title a { color: var(--text); }
.card-summary { font-size: 14px; color: var(--muted); line-height: 1.65; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.card-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--text); }
.card-link .arr { transition: transform var(--dur-2) var(--ease); }
.card:hover .card-link .arr { transform: translateX(3px); }

/* series-card */
.series-card { padding: 22px; }
.sc-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.sc-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent);
  flex-shrink: 0;
}
.sc-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin: 0; }
.sc-en { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; color: var(--faint); margin-top: 2px; }
.sc-desc { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0 0 14px; flex: 1; }
.sc-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--faint); font-family: var(--font-mono); }

/* ---------- 8. 列表 ---------- */
.post-list { display: flex; flex-direction: column; }
.post-row, .paper-row, .update-item, .tut-row {
  display: grid; gap: 14px; padding: 20px 16px;
  border: 1px solid transparent; border-radius: var(--r-md);
  background: transparent;
  transition: all var(--dur-1) var(--ease);
}
.post-row { grid-template-columns: 80px 1fr; align-items: start; }
.post-row:hover, .paper-row:hover, .update-item:hover, .tut-row:hover {
  background: var(--glass-subtle);
  border-color: var(--glass-border);
}
.post-date { text-align: left; }
.post-date .d { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: -0.03em; }
.post-date .ym { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); margin-top: 6px; letter-spacing: .06em; }
.post-row-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin: 0 0 6px; line-height: 1.4; letter-spacing: -0.02em; }
.post-row-title a { color: var(--text); }
.post-row-title a:hover { color: var(--accent); }
.post-row-summary { font-size: 14px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-row .cover-thumb { width: 88px; height: 66px; object-fit: cover; border-radius: var(--r-sm); }

.paper-row { grid-template-columns: 1fr auto; align-items: start; }
.paper-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 0 0 6px; line-height: 1.4; letter-spacing: -0.02em; }
.paper-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--faint); margin-bottom: 8px; }
.paper-abstract-cn { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin: 0; }
.paper-ops { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.paper-more { display: none; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.paper-more.show { display: flex; }

.tag-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pin-badge { color: var(--warm); font-size: 11px; font-weight: 500; margin-right: 6px; }

/* ---------- 9. 子导航 & 过滤 ---------- */
.sub-nav {
  display: inline-flex; gap: 3px; padding: 3px;
  border-radius: var(--r-pill);
  background: var(--glass-subtle);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-hl);
  margin-bottom: 28px;
}
.sub-nav button {
  padding: 7px 16px; border: none; border-radius: var(--r-pill);
  background: transparent; color: var(--muted);
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all var(--dur-1) var(--ease);
}
.sub-nav button:hover { color: var(--text); }
.sub-nav button.active {
  background: var(--glass-strong);
  color: var(--text); font-weight: 600;
  box-shadow: var(--glass-hl);
}
.sn-count { font-family: var(--font-mono); font-size: 10px; color: var(--faint); margin-left: 3px; }

.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }

/* ---------- 10. 搜索 & 表单 ---------- */
.search-box {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  background: var(--glass);
  box-shadow: var(--glass-hl);
  transition: all var(--dur-2);
}
.search-box:focus-within {
  background: var(--glass-strong);
  border-color: var(--accent);
  box-shadow: var(--glass-hl), 0 0 0 3px var(--accent-soft);
}
.search-box input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 14px; padding: 2px; min-width: 100px; }
.search-box input::placeholder { color: var(--faint); }
.search-box svg { color: var(--faint); flex: none; }

.filter-select {
  background: var(--glass) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-hl);
  border-radius: var(--r-pill) !important;
  color: var(--text) !important;
  font-family: var(--font-sans) !important;
  font-size: 12.5px !important; font-weight: 500;
  padding: 7px 16px !important; cursor: pointer; outline: none;
}

.field { text-align: left; margin-bottom: 18px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--glass-subtle);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 11px 14px;
  font-family: inherit; font-size: 14.5px;
  transition: all var(--dur-2);
}
.field textarea { min-height: 220px; resize: vertical; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus {
  background: var(--glass); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); outline: none;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---------- 11. 弹窗 ---------- */
.modal-mask, .cmdk-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 25, 50, 0.3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity var(--dur-2) var(--ease);
}
.modal-mask.show, .cmdk-overlay.open { opacity: 1; pointer-events: auto; }
.modal-mask { display: flex; align-items: center; justify-content: center; padding: 20px; }

.modal {
  position: relative;
  width: min(460px, 100%);
  padding: 28px 26px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--glass-hl), var(--shadow-3);
  transform: translateY(12px) scale(.98); opacity: 0;
  transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2);
}
.modal.modal-wide { width: min(620px, 100%); max-height: 85vh; overflow-y: auto; }
.modal-mask.show .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: 0 0 8px; letter-spacing: -0.02em; }
.modal p { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; line-height: 1.65; }
.modal .m-ops { display: flex; gap: 8px; justify-content: flex-end; }

.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translate(-50%, 14px);
  z-index: 300; padding: 10px 20px;
  border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 500;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-hl), var(--shadow-2);
  color: var(--text); opacity: 0;
  transition: all var(--dur-3) var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 12. 文章页 ---------- */
.post-hero { padding: calc(var(--nav-h) + 56px) 0 0; }
.post-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.25; letter-spacing: -0.03em; margin: 16px 0; word-break: break-word; }
.post-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); letter-spacing: .04em; }

.article-body { max-width: 700px; margin: 44px auto; font-size: 16px; line-height: 1.8; color: var(--text); }
.article-body h1, .article-body h2, .article-body h3, .article-body h4 { font-family: var(--font-display); letter-spacing: -0.02em; }
.article-body h2 { font-weight: 700; font-size: 22px; margin: 44px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.article-body h3 { font-weight: 700; font-size: 18px; margin: 32px 0 12px; }
.article-body h4 { font-weight: 600; font-size: 16px; margin: 24px 0 10px; }
.article-body p { margin: 16px 0; }
.article-body strong { color: var(--text); font-weight: 700; background: linear-gradient(transparent 62%, var(--accent-soft) 62%); }
.article-body blockquote {
  margin: 24px 0; padding: 14px 20px;
  border-left: 3px solid var(--accent);
  background: var(--glass-subtle);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--muted); font-size: 15.5px;
}
.article-body code {
  background: var(--glass-subtle);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 2px 6px; font-family: var(--font-mono); font-size: .85em;
  color: var(--accent);
}
.article-body pre {
  background: var(--glass) !important;
  border: 1px solid var(--glass-border) !important;
  padding: 18px 20px; border-radius: var(--r-md);
  overflow-x: auto;
  box-shadow: var(--glass-hl) !important;
}
.article-body pre code { background: none; border: none; padding: 0; color: var(--text); }
.article-body img { border-radius: var(--r-md); margin: 24px auto; }
.article-body table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid var(--line-soft); padding: 9px 12px; text-align: left; }
.article-body th { background: var(--glass-subtle); font-weight: 600; }
.article-body a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.article-body a:hover { border-bottom-color: var(--accent); }
.article-body li { margin: .5em 0; }
.article-body li::marker { color: var(--accent); }
.article-body ul, .article-body ol { padding-left: 1.5em; }

.zy-details {
  border: 1px solid var(--glass-border); border-radius: var(--r-md);
  margin: 20px 0; background: var(--glass);
  box-shadow: var(--glass-hl); overflow: hidden;
}
.zy-details > summary { cursor: pointer; padding: 13px 18px; font-weight: 600; color: var(--text); list-style: none; }
.zy-details > summary::-webkit-details-marker { display: none; }
.zy-details > :not(summary) { padding: 0 18px; }
.zy-details > :last-child { padding-bottom: 18px; }

.cite-box {
  margin: 0; padding: 12px 14px;
  background: var(--glass-subtle) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--r-sm) !important;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted) !important;
  white-space: pre-wrap; word-break: break-all; line-height: 1.65;
}

/* ---------- 13. 工具件 ---------- */
.back-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--glass-border); border-radius: var(--r-pill);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-hl), var(--shadow-2);
  color: var(--text); cursor: pointer;
  opacity: 0; transform: translateY(10px);
  transition: all var(--dur-2) var(--ease-out);
}
.back-top.show { opacity: 1; transform: translateY(0); }

/* ---------- 14. 分页 ---------- */
.pagination { display: flex; gap: 5px; justify-content: center; padding: 40px 0 20px; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  box-shadow: var(--glass-hl);
  color: var(--muted); font-size: 13px; font-family: inherit;
  cursor: pointer; transition: all var(--dur-1) var(--ease);
}
.page-btn:hover:not([disabled]) { background: var(--glass-strong); color: var(--text); }
.page-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.page-btn[disabled] { opacity: .4; cursor: default; }

.pn-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.pn-nav a {
  display: block; padding: 18px 20px;
  border: 1px solid var(--glass-border); border-radius: var(--r-md);
  background: var(--glass);
  box-shadow: var(--glass-hl);
  color: var(--text); text-decoration: none;
  transition: all var(--dur-2) var(--ease);
}
.pn-nav a:hover { background: var(--glass-strong); box-shadow: var(--glass-hl), var(--shadow-1); transform: translateY(-2px); }

/* ---------- 15. 页脚 ---------- */
.footer {
  margin-top: 80px; padding: 48px 0 32px;
  border-top: 1px solid var(--line-soft);
  background: var(--glass-subtle);
}
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .fb-name { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.footer-brand p { color: var(--muted); font-size: 13px; line-height: 1.65; max-width: 300px; }
.footer h4, .footer-h { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; color: var(--text); margin: 0 0 14px; }
.footer-links a { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.footer-links a:hover { color: var(--accent); }
.footer-motto { color: var(--faint); font-size: 12.5px; line-height: 1.7; margin-top: 8px; }
.footer-bottom {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--faint);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* ---------- 16. 关于页 ---------- */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 36px; margin-top: 16px; }
.about-card {
  padding: 28px 24px;
  border: 1px solid var(--glass-border); border-radius: var(--r-lg);
  background: var(--glass);
  box-shadow: var(--glass-hl), var(--shadow-1);
  text-align: center; height: fit-content;
}
.about-logo { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 14px; }
.about-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin: 0 0 4px; letter-spacing: -0.02em; }
.about-role { font-size: 12.5px; color: var(--accent); margin-bottom: 18px; }
.about-info { text-align: left; margin-bottom: 18px; }
.about-info > div { font-size: 13px; color: var(--muted); margin-bottom: 6px; line-height: 1.55; }
.about-info .k { color: var(--faint); font-size: 11.5px; }
.social-row { display: flex; gap: 8px; justify-content: center; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-pill);
  background: var(--glass-subtle);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  transition: all var(--dur-2) var(--ease);
}
.social-btn:hover { background: var(--glass-strong); color: var(--text); transform: translateY(-2px); }

.about-section { margin-bottom: 36px; }
.about-h { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 0 0 18px; letter-spacing: -0.02em; }

.timeline { display: flex; flex-direction: column; }
.tl-item { padding: 0 0 24px 22px; border-left: 2px solid var(--line-soft); position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -5px; top: 3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.tl-date { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: .05em; margin-bottom: 5px; }
.tl-title { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; margin: 0 0 6px; }
.tl-desc { font-size: 14px; color: var(--muted); line-height: 1.65; margin: 0; }

.book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.book {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--glass-border); border-radius: var(--r-md);
  background: var(--glass);
  box-shadow: var(--glass-hl);
  transition: all var(--dur-2) var(--ease);
}
.book:hover { background: var(--glass-strong); transform: translateY(-2px); }
.book-spine {
  writing-mode: vertical-rl;
  padding: 8px 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 11px; font-weight: 600;
  border-radius: 5px; letter-spacing: .08em;
  flex-shrink: 0;
}
.book-name { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; margin: 0 0 3px; }
.book-author { font-size: 12px; color: var(--faint); margin: 0; }

.term-list { display: flex; flex-direction: column; gap: 14px; }
.term-item {
  padding: 18px 20px;
  border: 1px solid var(--glass-border); border-radius: var(--r-md);
  background: var(--glass);
  box-shadow: var(--glass-hl);
}
.term-name { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.term-name span { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); margin-left: 8px; font-weight: 400; }
.term-item p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.65; }

/* ---------- 17. 骨架 & 空状态 ---------- */
.skeleton { border-radius: var(--r-md); }
.sk-line { height: 10px; border-radius: var(--r-pill); background: var(--line-soft); margin-bottom: 8px; }
.sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }

.empty { text-align: center; padding: 48px 20px; color: var(--faint); }
.empty .glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: var(--r-lg);
  background: var(--glass-subtle); border: 1px solid var(--glass-border);
  font-size: 22px; margin-bottom: 12px;
}

/* ---------- 18. 后台 ---------- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-side {
  border-right: 1px solid var(--line-soft);
  background: var(--glass-subtle);
  padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side .nav-brand { padding: 0 18px 16px; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
.admin-main { padding: 36px 36px 60px; min-width: 0; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.admin-nav button, .admin-nav a {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 12px; border: none; border-radius: var(--r-sm);
  background: transparent; color: var(--muted);
  font-family: var(--font-sans); font-size: 13.5px;
  cursor: pointer; text-align: left; text-decoration: none;
  transition: all var(--dur-1) var(--ease);
}
.admin-nav button:hover, .admin-nav a:hover { background: var(--glass-subtle); color: var(--text); }
.admin-nav button.active, .admin-nav a.active { background: var(--text); color: var(--bg); font-weight: 600; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.admin-stat {
  padding: 18px 16px;
  border: 1px solid var(--glass-border); border-radius: var(--r-md);
  background: var(--glass);
  box-shadow: var(--glass-hl);
}
.admin-stat .n { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1; }
.admin-stat .l { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

.admin-title { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin: 0 0 4px; letter-spacing: -0.025em; }
.admin-desc { color: var(--muted); font-size: 13.5px; margin: 0 0 24px; }
.admin-panel { display: none; }
.admin-panel.active { display: block }

.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 28px; }
.activity-list { display: flex; flex-direction: column; gap: 8px; }

.logout {
  display: block; width: calc(100% - 20px); margin: 16px 10px 0;
  padding: 9px; border: 1px solid var(--glass-border); border-radius: var(--r-sm);
  background: var(--glass-subtle); color: var(--muted);
  font-family: var(--font-sans); font-size: 12.5px;
  cursor: pointer; transition: all var(--dur-1) var(--ease);
}
.logout:hover { background: rgba(255, 59, 48, 0.1); color: var(--danger); }

.admin-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--glass-border); border-radius: var(--r-md);
  background: var(--glass);
  box-shadow: var(--glass-hl);
  overflow: hidden; font-size: 13.5px;
}
.admin-table th, .admin-table td {
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.admin-table th {
  background: var(--glass-subtle);
  font-weight: 600; font-size: 12px; letter-spacing: .04em; color: var(--muted);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--glass-subtle); }
.row-check { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }

.batch-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px; padding: 10px 12px;
  border: 1px solid var(--glass-border); border-radius: var(--r-md);
  background: var(--glass-subtle);
  font-size: 12.5px; color: var(--muted);
}
.batch-bar select {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--r-sm); color: var(--text);
  padding: 5px 10px; font-family: inherit; font-size: 12.5px;
}

.sub-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.sub-tabs button {
  background: none; border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted); font-family: inherit; font-size: 13.5px;
  padding: 8px 14px; cursor: pointer;
  transition: all var(--dur-1) var(--ease);
  margin-bottom: -1px;
}
.sub-tabs button:hover { color: var(--text); }
.sub-tabs button.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.sub-panel { display: none; } .sub-panel.active { display: block; }

.check-line { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text); }
.check-line input { width: 15px; height: 15px; accent-color: var(--accent); }
.img-pick { display: flex; gap: 12px; align-items: center; }
.img-pick img { width: 90px; height: 60px; object-fit: cover; border-radius: var(--r-sm); }
.ver-item { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.ver-item .t { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.ver-item .ti { flex: 1; color: var(--text); }
.invite-link { display: flex; gap: 10px; margin-top: 12px; }
.invite-link input { flex: 1; font-family: var(--font-mono); font-size: 11.5px; }

.danger-zone {
  border: 1px solid rgba(255, 59, 48, 0.25); border-radius: var(--r-md);
  padding: 20px 22px; margin-top: 28px;
  background: rgba(255, 59, 48, 0.05);
}
.danger-zone h4 { margin: 0 0 6px; color: var(--danger); font-weight: 600; font-size: 14px; }
.danger-zone p { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; }
.log-type-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }

/* ---------- 19. 登录页 ---------- */
.admin-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-wrap { width: 100%; max-width: 380px; }
.login-card {
  padding: 36px 28px 28px;
  border: 1px solid var(--glass-border); border-radius: var(--r-xl);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-hl), var(--shadow-3);
  text-align: center;
}
.login-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin: 0 0 4px; letter-spacing: -0.02em; }
.login-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em; color: var(--faint); margin: 0 0 24px; }
.form-error {
  display: none; padding: 9px 12px; border-radius: var(--r-sm);
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.2);
  color: var(--danger); font-size: 12.5px; margin-bottom: 14px;
}
.form-error.show { display: block; }
.w-full { width: 100%; }

/* ---------- 20. 知识库 ---------- */
.kb-tab-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kb-tab-bar .search-box { margin-left: auto; }
.tut-no { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--faint); line-height: 1.1; width: 50px; flex-shrink: 0; letter-spacing: -0.03em; }
.tut-body h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.tut-body h3 a { color: var(--text); }
.tut-body .tut-summary { margin: 0 0 10px; font-size: 14px; color: var(--muted); line-height: 1.65; }
.tut-meta { display: flex; gap: 14px; align-items: center; font-size: 11.5px; color: var(--faint); flex-wrap: wrap; }
.tut-meta .rt { font-family: var(--font-mono); }

/* ---------- 21. 动效 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.hero-content > * { animation: fadeUp .7s var(--ease-out) both; }
.hero-content > *:nth-child(1) { animation-delay: .04s; }
.hero-content > *:nth-child(2) { animation-delay: .1s; }
.hero-content > *:nth-child(3) { animation-delay: .16s; }
.hero-content > *:nth-child(4) { animation-delay: .22s; }
.hero-content > *:nth-child(5) { animation-delay: .28s; }

/* ---------- 22. 响应式 ---------- */
@media (max-width: 1024px) {
  .card-grid, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .book-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root {
    --nav-h: 56px;
    --glass-blur: blur(6px) saturate(120%);
  }
  body { font-size: 15px; background-image: linear-gradient(180deg, #EDEEF4 0%, #E8EAF2 100%); }
  .wrap { width: calc(100% - 32px); }
  .nav-inner { width: calc(100% - 28px); gap: 10px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 3px;
    background: var(--glass-strong);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 14px 16px 20px;
    display: none;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    box-shadow: var(--shadow-2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; border-radius: var(--r-sm); font-size: 15.5px; }
  .nav-search, .nav-login { margin-top: 8px; justify-content: center; width: 100%; }
  .hero { min-height: auto; padding: calc(var(--nav-h) + 48px) 0 56px; }
  .hero-title { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .section { padding: 56px 0 8px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 24px; }
  .card-grid, .grid-2, .grid-3, .grid-4, .stats { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
  .paper-row { grid-template-columns: 1fr; }
  .post-date { display: flex; gap: 8px; align-items: baseline; }
  .post-date .d { font-size: 20px; }
  .footer { margin-top: 56px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .article-body { font-size: 15.5px; margin: 32px auto; }
  .form-row { grid-template-columns: 1fr; }

  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: sticky; top: 0; z-index: 50;
    height: auto; border-right: none; border-bottom: 1px solid var(--line-soft);
    padding: 10px 0;
    background: var(--glass-strong);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  }
  .admin-side .nav-brand { padding: 0 14px 10px; }
  .admin-nav { flex-direction: row; overflow-x: auto; padding: 0 10px; gap: 3px; }
  .admin-nav button, .admin-nav a { white-space: nowrap; padding: 7px 12px; font-size: 12.5px; }
  .logout { width: auto; margin: 10px 10px 0; padding: 7px 14px; }
  .admin-main { padding: 18px 14px 44px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .admin-stat .n { font-size: 20px; }
  .quick-actions { flex-direction: column; }
  .quick-actions .btn { width: 100%; }
  .admin-table { display: block; overflow-x: auto; font-size: 12.5px; }
  .batch-bar { padding: 8px; }
  .login-card { padding: 28px 20px 22px; }

  .pn-nav { grid-template-columns: 1fr; }
  .back-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .kb-tab-bar .search-box { margin-left: 0; width: 100%; }
  .tut-row { gap: 12px; padding: 16px 0; }
  .tut-no { font-size: 20px; width: 32px; }
  .filter-bar .search-box { width: 100%; margin-left: 0 !important; }
  .sub-nav { width: 100%; overflow-x: auto; }
}
@media (max-width: 380px) {
  .wrap { width: calc(100% - 24px); }
  .hero-title { font-size: 1.65rem; }
}
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .nav-toggle, .back-top { min-width: 42px; min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
@media print {
  body { background: #fff !important; color: #1a1a1a !important; }
  .nav, .back-top, .footer, .hero-cta, .admin-side, .logout { display: none !important; }
  .article-body { max-width: 100%; }
}
