/* ========== 主题变量（默认：星夜蓝） ========== */
:root,
html[data-theme="aurora"] {
  --bg: #05070d;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.045);
  --panel-hover: rgba(255, 255, 255, 0.07);
  --chip-bg: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.22);
  --text: #e6ebf4;
  --text-dim: #94a0b5;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --accent-3: #f472b6;
  --accent-soft: rgba(255, 255, 255, 0.65);
  --accent-rgb: 34, 211, 238;
  --star-rgb: 148, 200, 255;
  --nav-bg: rgba(7, 10, 18, 0.72);
  --menu-bg: rgba(14, 19, 30, 0.94);
  --grid-line: rgba(255, 255, 255, 0.025);
  --sweep: rgba(255, 255, 255, 0.05);
  --glow: rgba(34, 211, 238, 0.22);
  --glow-a: #22d3ee;
  --glow-b: #a78bfa;
  --glow-opacity: 0.17;
  --shadow: rgba(0, 0, 0, 0.28);
  --shadow-hover: rgba(0, 0, 0, 0.5);
  --on-accent: #0b0f1a;
}

/* 霓虹紫 */
html[data-theme="neon"] {
  --bg: #0b0713;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.045);
  --panel-hover: rgba(255, 255, 255, 0.07);
  --chip-bg: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.22);
  --text: #eee8f7;
  --text-dim: #a89cb9;
  --accent: #c084fc;
  --accent-2: #f472b6;
  --accent-3: #818cf8;
  --accent-soft: rgba(255, 255, 255, 0.65);
  --accent-rgb: 192, 132, 252;
  --star-rgb: 210, 170, 255;
  --nav-bg: rgba(14, 8, 24, 0.72);
  --menu-bg: rgba(24, 13, 36, 0.94);
  --grid-line: rgba(255, 255, 255, 0.025);
  --sweep: rgba(255, 255, 255, 0.05);
  --glow: rgba(192, 132, 252, 0.22);
  --glow-a: #c084fc;
  --glow-b: #f472b6;
  --glow-opacity: 0.18;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
  --on-accent: #14091f;
}

/* 暖橙 */
html[data-theme="ember"] {
  --bg: #100a06;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.045);
  --panel-hover: rgba(255, 255, 255, 0.07);
  --chip-bg: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.22);
  --text: #f5ece2;
  --text-dim: #b3a294;
  --accent: #fbbf24;
  --accent-2: #fb7185;
  --accent-3: #f97316;
  --accent-soft: rgba(255, 255, 255, 0.65);
  --accent-rgb: 251, 191, 36;
  --star-rgb: 255, 205, 140;
  --nav-bg: rgba(20, 12, 7, 0.72);
  --menu-bg: rgba(32, 19, 11, 0.94);
  --grid-line: rgba(255, 255, 255, 0.025);
  --sweep: rgba(255, 255, 255, 0.05);
  --glow: rgba(251, 191, 36, 0.2);
  --glow-a: #fbbf24;
  --glow-b: #fb7185;
  --glow-opacity: 0.16;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
  --on-accent: #1a1005;
}

/* 森野绿 */
html[data-theme="forest"] {
  --bg: #06100c;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.045);
  --panel-hover: rgba(255, 255, 255, 0.07);
  --chip-bg: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.22);
  --text: #e3f2ea;
  --text-dim: #8fa99c;
  --accent: #34d399;
  --accent-2: #22d3ee;
  --accent-3: #a3e635;
  --accent-soft: rgba(255, 255, 255, 0.65);
  --accent-rgb: 52, 211, 153;
  --star-rgb: 150, 230, 200;
  --nav-bg: rgba(7, 18, 13, 0.72);
  --menu-bg: rgba(11, 28, 20, 0.94);
  --grid-line: rgba(255, 255, 255, 0.025);
  --sweep: rgba(255, 255, 255, 0.05);
  --glow: rgba(52, 211, 153, 0.2);
  --glow-a: #34d399;
  --glow-b: #22d3ee;
  --glow-opacity: 0.16;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
  --on-accent: #06170f;
}

/* 晨雾白（浅色） */
html[data-theme="daylight"] {
  --bg: #f6f8fc;
  --panel: rgba(15, 23, 42, 0.03);
  --panel-strong: rgba(255, 255, 255, 0.85);
  --panel-hover: rgba(255, 255, 255, 0.98);
  --chip-bg: rgba(15, 23, 42, 0.045);
  --border: rgba(15, 23, 42, 0.11);
  --border-strong: rgba(15, 23, 42, 0.15);
  --border-hover: rgba(37, 99, 235, 0.42);
  --text: #16203a;
  --text-dim: #5c6880;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-3: #0ea5e9;
  --accent-soft: rgba(255, 255, 255, 0.9);
  --accent-rgb: 37, 99, 235;
  --star-rgb: 46, 88, 168;
  --nav-bg: rgba(246, 248, 252, 0.8);
  --menu-bg: rgba(255, 255, 255, 0.96);
  --grid-line: rgba(15, 23, 42, 0.045);
  --sweep: rgba(15, 23, 42, 0.045);
  --glow: rgba(37, 99, 235, 0.18);
  --glow-a: #93c5fd;
  --glow-b: #c4b5fd;
  --glow-opacity: 0.35;
  --shadow: rgba(30, 50, 90, 0.09);
  --shadow-hover: rgba(30, 50, 90, 0.18);
  --on-accent: #ffffff;
}

:root {
  --radius: 18px;
  --max: 1120px;
}

/* ========== 基础 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.35s, color 0.35s;
}
a { color: inherit; text-decoration: none; }

/* ========== 背景装饰 ========== */
#starfield { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

.bg-grid {
  position: fixed; inset: 0; z-index: -3;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}

.bg-glow {
  position: fixed; z-index: -2; border-radius: 50%;
  filter: blur(120px); opacity: var(--glow-opacity); pointer-events: none;
}
.bg-glow-a {
  width: 560px; height: 560px; background: var(--glow-a); top: -180px; left: -120px;
  animation: drift-a 16s ease-in-out infinite alternate;
}
.bg-glow-b {
  width: 620px; height: 620px; background: var(--glow-b); top: -100px; right: -160px;
  animation: drift-b 20s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-140px, 100px) scale(0.9); } }

#cursor-glow {
  position: fixed; top: 0; left: 0; z-index: -1;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.07), transparent 65%);
  pointer-events: none; opacity: 0; transition: opacity 0.6s;
}
.has-cursor-glow #cursor-glow { opacity: 1; }

/* ========== 导航 ========== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: flex-end; gap: 26px;
  max-width: var(--max); margin: 0 auto; padding: 18px 28px;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, padding 0.35s, box-shadow 0.35s;
}
.nav.scrolled {
  padding: 12px 28px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 40px var(--shadow);
}

.nav-links { display: flex; gap: 30px; font-size: 15px; }
.nav-links a { position: relative; color: var(--text-dim); padding: 4px 0; transition: color 0.25s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ========== 皮肤切换器 ========== */
.theme-switch { position: relative; }
.theme-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 10px;
  background: var(--chip-bg); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 13px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.theme-btn:hover { color: var(--text); border-color: var(--accent); }
.theme-btn-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45);
}
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 12px); z-index: 60;
  width: 196px; padding: 8px; border-radius: 14px;
  background: var(--menu-bg); border: 1px solid var(--border);
  box-shadow: 0 20px 50px var(--shadow-hover);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: none;
}
.theme-switch.open .theme-menu { display: block; }
.theme-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  font-size: 13px; color: var(--text-dim);
  transition: background 0.2s, color 0.2s;
}
.theme-option:hover { background: var(--panel-hover); color: var(--text); }
.theme-option.active { color: var(--text); }
.theme-swatch {
  width: 26px; height: 18px; border-radius: 6px; flex-shrink: 0;
  border: 1px solid var(--border);
}
.theme-check { margin-left: auto; font-size: 12px; color: var(--accent); opacity: 0; }
.theme-option.active .theme-check { opacity: 1; }

/* ========== Hero ========== */
main { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

.hero { position: relative; padding: 72px 0 56px; text-align: center; }

.hero-eyebrow {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px; letter-spacing: 4px; color: var(--accent); margin-bottom: 22px;
}

.hero h1 { font-size: clamp(34px, 5.5vw, 58px); font-weight: 800; letter-spacing: 1px; line-height: 1.25; }

.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: grad-flow 6s linear infinite;
}
@keyframes grad-flow { to { background-position: 300% 0; } }

.hero-sub { margin: 24px auto 0; max-width: 680px; color: var(--text-dim); font-size: 15px; line-height: 2; }

/* ========== 区块 ========== */
.section { padding: 56px 0; }
.section-head { margin-bottom: 30px; }
.section-head h2 { font-size: 28px; font-weight: 700; }
.section-head p { color: var(--text-dim); margin-top: 6px; font-size: 15px; }

/* ========== 作品列表 ========== */
.plist { display: flex; flex-direction: column; gap: 26px; }

.prow {
  position: relative; display: flex; align-items: center; gap: 30px;
  padding: 32px 34px; border-radius: var(--radius);
  background: var(--panel-strong);
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 34px var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.prow::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--row-accent, var(--accent)), var(--accent-2));
  opacity: 0.38;
  transition: opacity 0.25s, width 0.25s;
}
.prow::after {
  content: ""; position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, var(--sweep), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.prow:hover {
  transform: translateX(8px);
  border-color: var(--border-hover);
  background: var(--panel-hover);
  box-shadow: 0 20px 54px var(--shadow-hover);
}
.prow:hover::before { opacity: 1; width: 5px; }
.prow:hover::after { left: 120%; }

.accent-cyan { --row-accent: #22d3ee; }
.accent-violet { --row-accent: #a78bfa; }
.accent-amber { --row-accent: #fbbf24; }
.accent-green { --row-accent: #34d399; }

.prow-num {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 34px; font-weight: 800; line-height: 1; flex-shrink: 0;
  width: 76px; text-align: center; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--row-accent, var(--accent)), var(--accent-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.card-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: var(--on-accent);
  background: linear-gradient(135deg, var(--row-accent, var(--accent)), var(--accent-soft));
  transition: box-shadow 0.3s;
}

.prow-main { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.prow-title { font-size: 21px; font-weight: 700; }
.prow-tagline { color: var(--text-dim); font-size: 14px; }

.card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tag {
  font-size: 12px; color: var(--text-dim);
  background: var(--chip-bg); border: 1px solid var(--border);
  padding: 2px 10px; border-radius: 6px;
}

.prow-arrow { color: var(--row-accent, var(--accent)); flex-shrink: 0; }
.prow-arrow svg { width: 26px; height: 26px; transition: transform 0.25s; }
.prow:hover .prow-arrow svg { transform: translateX(6px); }

/* ========== 关于 ========== */
.about-card {
  padding: 36px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border);
}
.about-card h2 { font-size: 24px; margin-bottom: 14px; }
.about-card p { color: var(--text-dim); max-width: 720px; }

.contact-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.contact-item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 12px;
  background: var(--chip-bg); border: 1px solid var(--border);
}
.contact-label { font-size: 13px; color: var(--text-dim); }
.contact-value {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px; font-weight: 600; color: var(--text);
  user-select: all;
}

/* ========== 页脚 ========== */
.footer {
  max-width: var(--max); margin: 40px auto 0; padding: 30px 28px 40px;
  border-top: 1px solid var(--border);
  text-align: center; color: var(--text-dim); font-size: 13px;
}
.footer a:hover { color: var(--accent); }

/* ========== 详情页 ========== */
.detail { padding-top: 40px; padding-bottom: 40px; }

.back-link { display: inline-block; color: var(--text-dim); font-size: 14px; margin-bottom: 26px; transition: color 0.2s; }
.back-link:hover { color: var(--accent); }

.detail-head { display: flex; gap: 20px; align-items: center; margin-bottom: 34px; }
.detail-head .card-icon { width: 64px; height: 64px; font-size: 30px; border-radius: 16px; }
.detail-head h1 { font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; }
.detail-tagline { color: var(--text-dim); margin-top: 6px; font-size: 15px; }

.detail-body { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 24px; }
.detail-side { position: sticky; top: 96px; }

.panel {
  padding: 26px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border);
}
.panel h2 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.panel h2::before { content: ""; display: inline-block; width: 4px; height: 14px; border-radius: 2px; background: var(--accent); margin-right: 10px; vertical-align: -2px; }

.desc { color: var(--text-dim); font-size: 15px; }

.features { list-style: none; }
.features li { position: relative; padding: 7px 0 7px 24px; color: var(--text-dim); font-size: 15px; }
.features li::before {
  content: ""; position: absolute; left: 4px; top: 17px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

.shots { display: grid; gap: 14px; }
.shot { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }
.shot-placeholder {
  aspect-ratio: 16 / 8; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, var(--sweep), transparent 60%),
    repeating-linear-gradient(45deg, var(--sweep) 0 12px, transparent 12px 24px);
  color: var(--text-dim); font-size: 14px; text-align: center; line-height: 2;
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: "Cascadia Code", Consolas, monospace; font-size: 13px;
  padding: 5px 14px; border-radius: 8px;
  background: var(--chip-bg); border: 1px solid var(--border); color: var(--text-dim);
}

.dl-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 16px; border-radius: 12px; margin-bottom: 12px;
  border: 1px solid var(--border); background: var(--panel);
  transition: border-color 0.2s;
}
a.dl-item:hover { border-color: var(--accent); }
.dl-label { font-weight: 600; font-size: 15px; width: 100%; }
.dl-type { font-size: 12px; color: var(--text-dim); }
.dl-note { font-size: 12px; color: var(--text-dim); }
.dl-btn {
  margin-left: auto; font-size: 13px; font-weight: 600; padding: 5px 16px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent);
}
.is-pending .dl-btn { background: var(--chip-bg); color: var(--text-dim); }
.dl-empty { color: var(--text-dim); font-size: 14px; }

.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14px; }
.meta dt { color: var(--text-dim); }
.meta dd { text-align: right; }

.not-found { text-align: center; padding: 100px 0; }
.not-found h1 { margin-bottom: 26px; }

/* ========== 动画 ========== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .grad, .bg-glow-a, .bg-glow-b { animation: none; }
  #cursor-glow { display: none; }
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .detail-body { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}

/* 手机端：列表行改为「序号在左上 + 内容占满」的两栏网格，隐藏箭头腾出宽度 */
@media (max-width: 640px) {
  .nav { padding: 14px 18px; gap: 14px; }
  .nav.scrolled { padding: 10px 18px; }
  .nav-links { gap: 18px; font-size: 14px; }
  .theme-btn { padding: 5px 9px; font-size: 12px; }
  .theme-menu { width: 176px; }

  main { padding: 0 18px; }

  .hero { padding: 52px 0 44px; }
  .hero-eyebrow { font-size: 11px; letter-spacing: 3px; margin-bottom: 16px; }
  .hero h1 { font-size: 32px; }
  .hero-sub { font-size: 14px; line-height: 1.9; margin-top: 18px; }

  .section { padding: 40px 0; }
  .section-head { margin-bottom: 22px; }
  .section-head h2 { font-size: 22px; }
  .section-head p { font-size: 14px; }

  .plist { gap: 18px; }
  .prow {
    display: grid;
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 4px 16px;
    padding: 22px 20px;
  }
  .prow-num { width: auto; font-size: 24px; text-align: left; }
  .prow-main { grid-column: 2; gap: 6px; }
  .prow-title { font-size: 18px; }
  .prow-tagline { font-size: 13px; line-height: 1.6; }
  .card-tags { margin-top: 2px; gap: 6px; }
  .tag { font-size: 11px; padding: 2px 8px; }
  .prow-arrow { display: none; }

  .about-card { padding: 26px 22px; }
  .about-card h2 { font-size: 20px; }
  .about-card p { font-size: 14px; }
  .contact-row { gap: 10px; margin-top: 18px; }
  .contact-item { padding: 8px 14px; gap: 8px; }
  .contact-value { font-size: 13px; }

  .footer { margin: 28px auto 0; padding: 24px 18px 32px; }

  .detail { padding-top: 24px; }
  .back-link { margin-bottom: 18px; font-size: 13px; }
  .detail-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
  .detail-head .card-icon { width: 54px; height: 54px; font-size: 24px; border-radius: 14px; }
  .detail-head h1 { font-size: 24px; }
  .detail-tagline { font-size: 14px; }

  .detail-main, .detail-side { gap: 16px; }
  .panel { padding: 20px 18px; }
  .panel h2 { font-size: 16px; }
  .desc { font-size: 14px; }
  .features li { font-size: 14px; padding: 6px 0 6px 20px; }
  .features li::before { top: 15px; }
  .chips { gap: 8px; }
  .chip { font-size: 12px; padding: 4px 10px; }

  .dl-item { padding: 14px; }
  .dl-label { font-size: 14px; }
  .dl-btn { font-size: 12px; padding: 4px 14px; }
  .meta { font-size: 13px; gap: 6px 14px; }

  .not-found { padding: 64px 0; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 28px; }
  .prow { grid-template-columns: 40px 1fr; padding: 20px 16px; }
  .prow-num { font-size: 21px; }
  .prow-title { font-size: 17px; }
  .theme-btn span.theme-btn-label { display: none; }
}

/* ========== 搜索与筛选 ========== */
.filter-bar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-radius: 12px;
  background: var(--chip-bg); border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}
.search-box svg { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }
.search-box input {
  flex: 1; min-width: 0; padding: 12px 0;
  background: transparent; border: 0; outline: 0;
  color: var(--text); font-size: 14px; font-family: inherit;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  padding: 6px 14px; border-radius: 999px;
  background: var(--chip-bg); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 13px; cursor: pointer; font-family: inherit;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.filter-chip:hover { color: var(--text); border-color: var(--accent); }
.filter-chip.active {
  color: var(--on-accent); border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.filter-result { display: none; margin: 0 0 14px; font-size: 13px; color: var(--text-dim); }
.filter-result.visible { display: block; }
.empty-state {
  padding: 48px 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border);
  text-align: center; color: var(--text-dim); font-size: 14px;
}

/* ========== 说明页 ========== */
.doc-main { max-width: 860px; margin: 0 auto; padding: 40px 28px 24px; }
.doc-head { margin-bottom: 30px; }
.doc-eyebrow {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px; letter-spacing: 3px; color: var(--accent); margin-bottom: 12px;
}
.doc-head h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.doc-intro { color: var(--text-dim); margin-top: 12px; font-size: 15px; }
.doc-section { margin-bottom: 18px; }
.doc-section h2 { font-size: 17px; }
.doc-section p { color: var(--text-dim); font-size: 14px; line-height: 1.9; }
.doc-section ul {
  margin: 8px 0 0 0; padding-left: 20px;
  color: var(--text-dim); font-size: 14px; line-height: 1.9;
}
.doc-section code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px; padding: 1px 6px; border-radius: 5px;
  background: var(--chip-bg); border: 1px solid var(--border); color: var(--accent);
}

/* ========== 页脚链接与通用按钮 ========== */
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 10px; margin-top: 8px;
}
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-sep { opacity: 0.45; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 26px; border-radius: 12px; font-size: 14px; font-weight: 600;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
}

/* ========== 新增组件的移动端 ========== */
@media (max-width: 640px) {
  .search-box input { font-size: 13px; padding: 11px 0; }
  .filter-chip { font-size: 12px; padding: 5px 11px; }
  .doc-main { padding: 28px 18px 20px; }
  .doc-head h1 { font-size: 26px; }
  .doc-intro { font-size: 14px; }
  .doc-section p, .doc-section ul { font-size: 13px; }
  .footer-links { gap: 8px; font-size: 12px; }
}
