/* ============================================================
   PPSSPP 官网 · 共享样式表
   Premium design system — 玻璃拟态 / 三主题 / 响应式
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
  /* 品牌色 */
  --brand: #3b82f6;
  --brand-2: #06b6d4;
  --brand-3: #8b5cf6;
  --accent: #22d3ee;

  /* 字体 */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC",
    "Microsoft YaHei", sans-serif;

  /* 动效曲线（premium 手感） */
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* 圆角 */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;

  /* 过渡 */
  --t-fast: 0.18s;
  --t: 0.3s;
  --t-slow: 0.6s;

  color-scheme: light;
}

/* 浅色主题（默认） */
:root,
[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-2: #eaf0f8;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --text-soft: #475569;
  --text-faint: #94a3b8;
  --shadow: 0 20px 60px -20px rgba(15, 23, 42, 0.18);
  --glass-blur: 22px;
  --grid-line: rgba(15, 23, 42, 0.05);
}

/* 深色主题 */
[data-theme="dark"] {
  --bg: #070b16;
  --bg-2: #0c1222;
  --surface: rgba(20, 28, 48, 0.55);
  --surface-solid: #0f1626;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #eef2ff;
  --text-soft: #aab4cf;
  --text-faint: #6b7793;
  --shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.7);
  --glass-blur: 24px;
  --grid-line: rgba(148, 163, 184, 0.06);
  color-scheme: dark;
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(70px + env(safe-area-inset-top) + 16px);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background var(--t-slow) var(--ease-premium),
    color var(--t) var(--ease-premium);
  min-height: 100vh;
}

/* 背景氛围光斑 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(50% 50% at 88% 12%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(60% 60% at 50% 100%, rgba(6, 182, 212, 0.14), transparent 60%);
  pointer-events: none;
  transition: opacity var(--t-slow) ease;
}
[data-theme="dark"] body::before {
  opacity: 1;
}
[data-theme="light"] body::before {
  opacity: 0.6;
}

/* 背景网格 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* 键盘可达性：焦点可见（WCAG 2.1 AA），鼠标点击不显示描边 */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 8px;
}
button:focus-visible,
.theme-toggle:focus-visible {
  outline-offset: 4px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- 排版 ---------- */
h1,
h2,
h3,
h4 {
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--glass-blur));
}

.gradient-text {
  background: linear-gradient(120deg, var(--brand), var(--brand-2) 45%, var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-soft);
  max-width: 60ch;
}

/* ---------- 布局容器 ---------- */
.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.section {
  padding: clamp(64px, 9vw, 130px) 0;
}

.section-head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 18px 0 14px;
}
.section-head h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 18px 0 14px;
  overflow-wrap: break-word;
}
.section-head p {
  color: var(--text-soft);
  max-width: 56ch;
  margin-inline: auto;
}

/* ---------- 导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background var(--t) ease, border-color var(--t) ease;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

/* ---------- 可见面包屑 ---------- */
.breadcrumb {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
  padding: 11px 0;
  transition: background var(--t) ease, border-color var(--t) ease;
}
.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--t) ease;
  padding: 6px 6px;
  border-radius: 8px;
}
.breadcrumb a:hover { opacity: .75; text-decoration: underline; }
.breadcrumb .sep { color: var(--text-soft); opacity: .5; }
.breadcrumb [aria-current="page"] { color: var(--text-soft); }
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand .logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 8px 24px -8px var(--brand);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-soft);
  transition: color var(--t) ease, background var(--t) ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

/* 主题切换 */
.theme-toggle {
  position: relative;
  width: 68px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  font-size: 0.95rem;
  overflow: hidden;
  transition: border-color var(--t) ease;
}
.theme-toggle .knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.8rem;
  transition: transform var(--t) var(--ease-spring);
}
[data-theme-display="light"] .theme-toggle .knob {
  transform: translateX(0);
}
[data-theme-display="dark"] .theme-toggle .knob {
  transform: translateX(32px);
}
[data-theme-display="system"] .theme-toggle .knob {
  transform: translateX(16px);
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--t) var(--ease-premium),
    box-shadow var(--t) var(--ease-premium), background var(--t) ease;
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  color: #fff;
  box-shadow: 0 14px 36px -12px var(--brand);
}
.btn-primary:hover {
  box-shadow: 0 20px 50px -12px var(--brand);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(var(--glass-blur));
}
.btn-ghost:hover {
  background: var(--surface-solid);
}
.btn-lg {
  padding: 17px 34px;
  font-size: 1.05rem;
}
.magnetic {
  position: relative;
}

/* ---------- 玻璃卡片 ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(40px, 7vw, 92px) 0 clamp(44px, 6vw, 76px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin: 22px 0 20px;
  overflow-wrap: break-word;
}
.hero .lead {
  margin-bottom: 32px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hero 视觉（模拟器窗口） */
.device-mock {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-xl);
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
  transition: transform var(--t-slow) var(--ease-premium);
}
.device-mock:hover {
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
}
.device-screen {
  height: 100%;
  border-radius: var(--r-md);
  background:
    radial-gradient(80% 80% at 30% 20%, rgba(59, 130, 246, 0.55), transparent 60%),
    radial-gradient(90% 90% at 80% 90%, rgba(139, 92, 246, 0.5), transparent 60%),
    linear-gradient(135deg, #0b1224, #131c38);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.device-screen .play {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.6rem;
  backdrop-filter: blur(8px);
  animation: pulse 2.4s var(--ease-premium) infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}
.device-screen .hud {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}
.floating-chip {
  position: absolute;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  font-weight: 600;
  animation: floaty 5s ease-in-out infinite;
}
.floating-chip.c1 { top: -14px; left: -10px; }
.floating-chip.c2 { bottom: 10%; right: -18px; animation-delay: 1.2s; }
.floating-chip.c3 { top: 38%; left: -22px; animation-delay: 2.4s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* 数据统计条 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.stat {
  text-align: center;
  padding: 22px 14px;
}
.stat .num {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .label {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 4px;
}

/* ---------- 功能卡片网格 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  padding: 30px 26px;
  transition: transform var(--t) var(--ease-premium),
    border-color var(--t) ease, box-shadow var(--t) var(--ease-premium);
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand);
  box-shadow: 0 30px 70px -26px var(--brand);
}
.feature-card .ico {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(139, 92, 246, 0.18));
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--text-soft);
  font-size: 0.96rem;
}

/* 平台徽章 */
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 12px;
}
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--glass-blur));
  transition: transform var(--t) var(--ease-premium), border-color var(--t) ease;
}
.platform-badge:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
}

/* ---------- 下载卡片 ---------- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.download-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--t) var(--ease-premium), border-color var(--t) ease;
}
.download-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand);
}
.download-card .os-ico {
  font-size: 2.4rem;
}
.download-card h3 {
  font-size: 1.3rem;
}
.download-card .meta {
  font-size: 0.85rem;
  color: var(--text-faint);
}
.download-card .btn {
  margin-top: auto;
  justify-content: center;
}
/* 单卡片（二维码 + 网盘下载）响应式堆叠 */
@media (max-width: 680px) {
  .download-card[style*="grid"] {
    grid-template-columns: 1fr !important;
    text-align: center;
    justify-items: center;
    gap: 26px;
  }
  .download-card[style*="grid"] .tip {
    text-align: left;
  }
}

/* 说明 / 要求列表 */
.spec-list {
  list-style: none;
  display: grid;
  gap: 12px;
}
.spec-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-soft);
}
.spec-list li::before {
  content: "▹";
  color: var(--brand);
  font-weight: 700;
}

/* 警示框 */
.notice {
  display: flex;
  gap: 14px;
  padding: 20px 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.95rem;
}
.notice .n-ico {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.notice.warn {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.08);
}

/* ---------- 教程步骤 ---------- */
.steps {
  display: grid;
  gap: 20px;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  padding: 28px 30px;
  align-items: start;
}
.step .step-no {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 10px 28px -10px var(--brand);
}
.step h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.step p {
  color: var(--text-soft);
}
.step code,
.inline-code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--brand);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* 提示框（tip） */
.tip {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: var(--r-sm);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.3);
  font-size: 0.9rem;
  color: var(--text-soft);
}
.tip strong {
  color: var(--text);
}

/* ---------- FAQ 手风琴 ---------- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur));
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .plus {
  transition: transform var(--t) var(--ease-premium);
  color: var(--brand);
  font-size: 1.4rem;
}
.faq-item.open .plus {
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow) var(--ease-premium);
  padding: 0 24px;
  color: var(--text-soft);
}
.faq-item.open .faq-a {
  max-height: 320px;
  padding-bottom: 22px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 36px;
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  font-size: 0.95rem;
  margin-bottom: 14px;
  color: var(--text);
}
.footer-grid a {
  display: block;
  color: var(--text-soft);
  padding: 5px 0;
  font-size: 0.92rem;
  transition: color var(--t) ease;
}
.footer-grid a:hover {
  color: var(--brand);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ---------- 滚动揭示动画 ---------- */
/* 仅当 JS 可用(.js 由 head 内联脚本注入)才隐藏初态，no-JS / 渲染失败 / 爬虫无 JS 时内容默认可见，避免正文永久隐藏 */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-premium), transform 0.7s var(--ease-premium);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-cta,
  .hero .eyebrow {
    justify-content: center;
  }
  .device-mock {
    transform: none;
    max-width: 520px;
    margin-inline: auto;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }
  .nav-links {
    position: fixed;
    inset: calc(70px + env(safe-area-inset-top)) 0 auto 0;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform var(--t) var(--ease-premium);
  }
  .nav-links.open {
    transform: none;
  }
  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 13px;
  }
  .nav-toggle {
    display: grid;
    place-items: center;
  }
  /* 移动端隐藏装饰性浮标，避免负偏移被裁切/引发横向溢出 */
  .floating-chip {
    display: none;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .step {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* 尊重减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 文章体系：教程列表 + 单篇排版 ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.article-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform var(--t) var(--ease-premium), border-color var(--t) var(--ease-premium), box-shadow var(--t) var(--ease-premium);
}
.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.article-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.article-card .thumb {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  color: #fff;
}
.article-card .body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.article-card h3 { font-size: 1.22rem; line-height: 1.4; }
.article-card p { color: var(--text-soft); font-size: .92rem; flex: 1; }
.article-card .meta { font-size: .82rem; color: var(--text-soft); margin-top: auto; }
.tag {
  align-self: flex-start;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--brand);
  background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .3);
  padding: 3px 11px;
  border-radius: 999px;
}

/* 单篇文章排版 */
.article { max-width: 760px; margin-inline: auto; }
.article-header { text-align: center; margin-bottom: clamp(26px, 4vw, 40px); }
.article-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 14px 0 12px;
  overflow-wrap: break-word;
}
.article-meta {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: .9rem;
  margin-top: 10px;
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-cover {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 3rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  margin-bottom: 36px;
}
.article-body { font-size: 1.05rem; line-height: 1.85; }
.article-body h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin: 44px 0 16px;
  color: var(--text);
  scroll-margin-top: calc(70px + env(safe-area-inset-top) + 16px);
}
.article-body h3 {
  font-size: 1.25rem;
  margin: 30px 0 12px;
  color: var(--text);
}
.article-body p { margin: 0 0 18px; color: var(--text-soft); overflow-wrap: break-word; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 1.4em; color: var(--text-soft); }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body strong { color: var(--text); }
.article-body code, .inline-code {
  font-family: "JetBrains Mono", monospace;
  font-size: .86rem;
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--brand);
  overflow-wrap: break-word;
  word-break: break-word;
}
.article-body blockquote {
  margin: 0 0 18px;
  padding: 14px 20px;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-soft);
}
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.article-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.article-nav a:hover { text-decoration: underline; }
