/* ==========================================================================
   绘萤者 lynvortex.top — 全站统一样式表
   唯一入口。所有页面（首页 / 文章列表 / 文章详情 / 关于 / 后台）共用。
   由原 index.html、about.html、articles.html、post.html 四套并行样式合并而来。
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  --primary: #0066ff;
  --primary-dark: #0044cc;
  --primary-light: #e8f0ff;
  --primary-50: #e6f0ff;
  --primary-600: #0052cc;

  --text-main: #1a1a2e;
  --text-sub: #4b5563;
  --text-muted: #9ca3af;

  --bg-page: #f7f8fc;
  --bg-card: #ffffff;
  --bg-soft: #f9fafb;

  --border: #e5e7eb;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .07);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .10);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .12);

  --radius-card: 14px;
  --radius-sm: 8px;

  --nav-h: 64px;

  --font-serif: 'Noto Serif SC', Georgia, serif;
  --font-sans: 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;

  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
}

/* ---------- 基础重置 ---------- */
*, ::before, ::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { border: 0; background: none; cursor: pointer; font-family: inherit; font-size: inherit; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; fill: currentColor; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
#app-content { flex: 1; }

/* ==========================================================================
   导航栏
   ========================================================================== */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .5rem; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.logo img { width: 32px; height: 32px; border-radius: 50%; }
.desktop-nav { display: flex; align-items: center; gap: 2rem; }
.nav-link { position: relative; font-size: .95rem; color: var(--text-sub); transition: color .15s; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link.active { font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.action-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--text-sub); transition: background .15s; font-size: 1rem;
}
.action-btn:hover { background: #f3f4f6; }
.mobile-menu-btn { display: none; }
.mobile-menu { display: none; flex-direction: column; gap: .75rem; padding-bottom: 1rem; }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: .5rem .75rem; border-radius: var(--radius-sm); color: #374151; font-size: .95rem; transition: background .12s; }
.mobile-menu a:hover { background: #f3f4f6; }
.mobile-menu a.active { color: var(--primary); background: var(--primary-light); font-weight: 500; }

@media (max-width: 767px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
}

/* ==========================================================================
   搜索框（导航栏下拉）
   ========================================================================== */
.search-wrap { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.search-wrap.show { max-height: 80px; }
.search-inner {
  display: flex; align-items: center; gap: .5rem; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0 1rem; height: 48px; margin: 0 auto 1.5rem; max-width: 768px;
  box-shadow: var(--shadow-sm);
}
.search-input { flex: 1; border: 0; outline: 0; font-size: 16px; padding: .5rem 0; color: #1f2937; background: none; }
.search-input::placeholder { color: var(--text-muted); }
.search-clear { color: var(--text-muted); cursor: pointer; flex-shrink: 0; }
.search-clear:hover { color: var(--text-sub); }
.search-submit { color: var(--primary); font-weight: 500; padding: .25rem .75rem; border-radius: 4px; transition: background .15s; flex-shrink: 0; }
.search-submit:hover { background: #f3f4f6; }

/* ==========================================================================
   英雄区（首页）
   ========================================================================== */
.hero {
  position: relative; height: 100vh; min-height: 540px; display: flex; align-items: center;
  background-image: url(/images/bg.webp);
  background-size: cover; background-position: center;
  color: #fff; overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(5, 12, 40, .78) 0, rgba(10, 30, 80, .6) 60%, rgba(0, 50, 120, .45) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero-content { text-align: center; max-width: 780px; margin: 0 auto; padding: 0 1.5rem; }
.hero-eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(147, 197, 253, .85); margin-bottom: 1.5rem;
  border: 1px solid rgba(147, 197, 253, .3); border-radius: 100px; padding: .35rem 1rem;
}
.hero-title {
  font-family: var(--font-serif); font-size: clamp(2.8rem, 8vw, 5.5rem); font-weight: 700;
  color: #fff; line-height: 1.15; margin-bottom: 1.5rem; letter-spacing: .01em;
  text-shadow: 0 2px 32px rgba(0, 0, 0, .35);
}
.hero-title span { display: block; color: #93c5fd; }
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem); color: rgba(255, 255, 255, .72);
  line-height: 1.7; max-width: 520px; margin: 0 auto 2.5rem;
}
.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%); z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: rgba(255, 255, 255, .5); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }

/* 内页横幅 */
.page-banner { background: linear-gradient(135deg, #0a1e50, #1a3a8a, #0066ff); padding: 3rem 0; text-align: center; color: #fff; }
.page-banner h1 { font-size: clamp(1.6rem, 5vw, 2.5rem); font-weight: 700; margin-bottom: .5rem; }
.page-banner p { font-size: clamp(.9rem, 2.5vw, 1.1rem); color: rgba(255, 255, 255, .7); max-width: 560px; margin: 0 auto; }

/* ==========================================================================
   通用区块
   ========================================================================== */
.main-content { padding: 2.5rem 1.25rem 3.5rem; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-title { font-size: 1.4rem; font-weight: 700; }
.section-more { font-size: .9rem; color: var(--primary); white-space: nowrap; }
.section-more:hover { color: var(--primary-dark); }

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #eef0f4 25%, #e2e5ea 37%, #eef0f4 63%);
  background-size: 400% 100%;
  animation: skeleton-anim 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-anim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ==========================================================================
   文章卡片 — 列表式（首页 + 文章列表共用）
   ========================================================================== */
.article-list { display: flex; flex-direction: column; gap: 1rem; max-width: 900px; margin: 0 auto; }
.article-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1rem;
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #dbeafe; }
.article-card-thumb { width: 96px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: #eef0f4; }
.article-card-thumb-placeholder {
  width: 96px; height: 72px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary); font-size: 1.25rem;
}
.article-card-body { flex: 1; min-width: 0; }
.article-card-title { font-size: 1.05rem; font-weight: 600; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.article-card:hover .article-card-title { color: var(--primary); }
.article-card-title.all-link { color: var(--primary); }
.article-card-desc { font-size: .875rem; color: var(--text-sub); margin-top: .35rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.article-card-date { font-size: .8rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.article-card-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.tag {
  display: inline-block; font-size: .72rem; padding: .15rem .55rem; border-radius: 999px;
  background: var(--primary-50); color: var(--primary-600); font-weight: 500;
}
.no-result { text-align: center; color: var(--text-muted); padding: 2.5rem 0; }

@media (max-width: 560px) {
  .article-card { flex-wrap: wrap; }
  .article-card-thumb, .article-card-thumb-placeholder { width: 64px; height: 56px; }
  .article-card-date { width: 100%; text-align: right; }
}

/* ==========================================================================
   文章详情页
   ========================================================================== */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(to right, var(--primary), #8b5cf6); z-index: 9999;
  transition: width .1s linear;
}
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .875rem; color: var(--text-muted); margin-bottom: 1.5rem; max-width: 56rem; margin-left: auto; margin-right: auto; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .current { color: var(--text-main); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 20rem; }

.post-shell { max-width: 56rem; margin: 0 auto; }
.post-article { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); overflow: hidden; }
.post-hero { position: relative; height: 16rem; overflow: hidden; background: #1f2937; }
@media (min-width: 768px) { .post-hero { height: 20rem; } }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-hero-mask { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .35) 55%, transparent); }
.post-hero-text { position: absolute; bottom: 0; left: 0; width: 100%; padding: 2rem; }
.post-title { font-size: clamp(1.6rem, 4vw, 2.35rem); font-weight: 800; color: #fff; line-height: 1.25; margin-bottom: .85rem; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; color: #e5e7eb; font-size: .875rem; }
.post-meta .date-badge { background: var(--primary); color: #fff; padding: .15rem .5rem; border-radius: 4px; font-size: .75rem; }
.post-meta .meta-item { display: inline-flex; align-items: center; gap: .25rem; }
.post-body { padding: 2.5rem 1.5rem; }
@media (min-width: 768px) { .post-body { padding: 2.5rem 3rem; } }
.post-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.post-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .875rem; color: var(--text-muted); flex-wrap: wrap; }
.post-footer a { display: inline-flex; align-items: center; gap: .25rem; cursor: pointer; }
.post-footer a:hover { color: var(--primary); }

.post-nav { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2rem; }
@media (min-width: 768px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a, .post-nav .spacer { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 1.25rem; box-shadow: var(--shadow-sm); transition: border-color .2s; display: block; }
.post-nav a:hover { border-color: #bfdbfe; }
.post-nav .nav-label { font-size: .75rem; color: var(--text-muted); }
.post-nav .nav-title { font-size: .9rem; font-weight: 500; margin-top: .25rem; }
.post-nav a:hover .nav-title { color: var(--primary); }
.post-nav .next { text-align: right; }

.side-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 768px) { .side-grid { grid-template-columns: 1fr 1fr; } }
.side-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.side-card h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.author-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.author-row img { width: 48px; height: 48px; border-radius: 50%; }
.author-row .name { font-weight: 700; }
.author-row .motto { font-size: .75rem; color: var(--text-muted); }
.side-card .desc { font-size: .875rem; color: var(--text-sub); margin-bottom: 1rem; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  width: 100%; padding: .55rem 1rem; font-size: .875rem; border-radius: var(--radius-sm);
  border: 1px solid var(--primary); color: var(--primary); transition: background .15s;
}
.btn-outline:hover { background: var(--primary-50); }
.related-list { display: flex; flex-direction: column; gap: .85rem; font-size: .875rem; }
.related-list a:hover { color: var(--primary); }
.related-list .r-title { font-weight: 500; }
.related-list .r-date { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }

/* 上下篇 / 推荐阅读 骨架 */
.related-skeleton { height: 2.5rem; border-radius: var(--radius-sm); }

/* 加载遮罩 */
#global-loading { position: fixed; inset: 0; background: #fff; z-index: 100; display: flex; align-items: center; justify-content: center; }
#global-loading.hidden { display: none; }
#global-loading .inner { text-align: center; color: var(--text-sub); }
#global-loading .icon { width: 1.5em; height: 1.5em; animation: spin 1s linear infinite; margin-bottom: .5rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 顶部提示条 */
#toast {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  background: var(--ok); color: #fff; text-align: center;
  padding: .5rem 1rem; box-shadow: var(--shadow-md);
  transform: translateY(-100%); transition: transform .3s ease;
}
#toast.show { transform: translateY(0); }

/* 代码块 + 复制按钮 */
.code-block-wrapper { position: relative; margin: 1.5rem 0; border-radius: var(--radius-sm); overflow: hidden; background: #24292e; }
.code-block-wrapper pre { margin: 0 !important; padding: 2.5rem 1.5rem 1.5rem !important; background: #24292e !important; color: #e1e4e8 !important; overflow-x: auto; }
.code-block-wrapper pre code { background: none !important; color: #e1e4e8 !important; font-family: var(--font-mono); font-size: .875rem; line-height: 1.6; }
.copy-btn {
  position: absolute; top: .5rem; right: .5rem; padding: .25rem .6rem; font-size: .75rem;
  background: rgba(255, 255, 255, .1); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, .2);
  border-radius: .25rem; opacity: 0; transition: opacity .2s, background .2s; z-index: 10;
}
.code-block-wrapper:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: rgba(255, 255, 255, .2); }

/* ==========================================================================
   文章正文排版（.prose）— 含 posts.json 中已使用的全部类
   ========================================================================== */
.prose { color: #374151; line-height: 1.85; font-size: 1.02rem; word-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose h1 { font-size: 2em; margin: 1.2em 0 .5em; font-weight: 800; line-height: 1.3; }
.prose h2 { font-size: 1.5em; margin: 1.6em 0 .7em; font-weight: 700; border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.prose h3 { font-size: 1.22em; margin: 1.3em 0 .6em; font-weight: 600; }
.prose h4 { font-size: 1.05em; margin: 1.2em 0 .5em; font-weight: 600; }
.prose p { margin-bottom: 1.15em; }
.prose ul, .prose ol { padding-left: 1.6em; margin-bottom: 1.15em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; max-width: 100%; height: auto; box-shadow: var(--shadow-sm); }
.prose blockquote { border-left: 4px solid var(--primary); padding: 1em 1.5em; margin: 1.5em 0; color: var(--text-sub); background: var(--bg-soft); border-radius: 0 4px 4px 0; }
.prose code { background: #f3f4f6; padding: .2em .4em; border-radius: .25rem; font-size: .875em; color: #eb5757; font-family: var(--font-mono); }
.prose pre { background: #1e293b; color: #e2e8f0; padding: 1.5em; border-radius: var(--radius-sm); overflow-x: auto; margin: 1.5em 0; }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose a { color: var(--primary); text-decoration: underline; }
.prose a:hover { color: var(--primary-dark); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95em; }
.prose th, .prose td { border: 1px solid var(--border); padding: .6em .8em; text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 600; }

/* 图片组（posts.json 已使用） */
.img-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1.75em 0; }
@media (min-width: 640px) { .img-grid { grid-template-columns: 1fr 1fr; } }
.img-item { margin: 0; }
.img-item img { margin: 0; width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.img-item figcaption { font-size: .82rem; color: var(--text-muted); text-align: center; margin-top: .5rem; }

/* 单图 + 说明（posts.json 已使用） */
.img-with-caption { margin: 1.75em 0; }
.img-with-caption img { margin: 0 0 .5rem; }
.img-with-caption .caption { font-size: .82rem; color: var(--text-muted); text-align: center; margin: 0; }

/* 提示框（posts.json 已使用，也支持 > [!NOTE] 语法） */
.callout { border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin: 1.25em 0; border-left: 4px solid; }
.callout p { margin: 0 0 .4em; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-weight: 600; margin-bottom: .35rem !important; }
.callout-note { background: #eff6ff; border-color: #3b82f6; color: #1e3a8a; }
.callout-tip { background: #ecfdf5; border-color: #10b981; color: #065f46; }
.callout-warning { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.callout-danger { background: #fef2f2; border-color: #ef4444; color: #991b1b; }

/* ==========================================================================
   关于页
   ========================================================================== */
.about-card { background: var(--bg-card); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); padding: 2rem; margin-bottom: 1.5rem; border: 1px solid var(--border); }
.about-card:hover { box-shadow: var(--shadow-md); }
.about-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.about-icon.blue { background: linear-gradient(135deg, var(--primary-light), #dbeafe); color: var(--primary); }
.about-icon .icon { width: 1.5em; height: 1.5em; }
.about-hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.about-hero-inner h2 { font-size: 1.3rem; font-weight: 700; }
.about-hero-inner p { color: var(--text-sub); line-height: 1.8; max-width: 640px; }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-vision { background: linear-gradient(135deg, var(--primary), var(--primary-600)); border-radius: var(--radius-card); padding: 1.75rem; color: #fff; box-shadow: var(--shadow-md); }
.about-vision h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.about-vision p { color: rgba(255, 255, 255, .82); font-size: .92rem; line-height: 1.7; }
.about-mission { background: var(--bg-card); border-radius: var(--radius-card); padding: 1.75rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.about-mission:hover { box-shadow: var(--shadow-md); }
.about-mission h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.about-mission p { color: var(--text-sub); font-size: .92rem; line-height: 1.7; }
.about-badge { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.about-badge.on-blue { background: rgba(255, 255, 255, .15); }
.about-badge.on-light { background: var(--primary-light); color: var(--primary); }

.contact-section { background: var(--bg-card); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); padding: 2rem; border: 1px solid var(--border); }
.contact-section h3 { font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: 1.5rem; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-item { background: var(--bg-soft); border-radius: 12px; padding: 1.25rem; text-align: center; transition: background .15s; display: block; }
.contact-item:hover { background: var(--primary-light); }
.contact-item .icon-wrap { width: 48px; height: 48px; margin: 0 auto .75rem; background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: color .15s; }
.contact-item:hover .icon-wrap { color: var(--primary); }
.contact-item h4 { font-size: .95rem; font-weight: 600; margin-bottom: .25rem; }
.contact-item p { font-size: .85rem; color: var(--text-sub); }

/* ==========================================================================
   页脚
   ========================================================================== */
.footer { background: #111827; color: var(--text-muted); padding: 1.75rem 0; text-align: center; font-size: .85rem; margin-top: auto; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap; }
.footer-links-label { font-size: .78rem; color: #6b7280; letter-spacing: .06em; }
.footer-link { color: #93c5fd; font-size: .85rem; transition: color .15s; }
.footer-link:hover { color: #bfdbfe; }
.footer-copy { color: #6b7280; font-size: .82rem; }
.footer-beian { margin-top: .4rem; }
.footer-beian a { color: #6b7280; text-decoration: underline; }
.footer-beian a:hover { color: #9ca3af; }
.footer-beian img { display: inline-block; width: 16px; height: 16px; vertical-align: middle; margin-right: 4px; border: 0; }

/* ==========================================================================
   返回顶部 / 错误页
   ========================================================================== */
.back-to-top {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 40;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); transition: opacity .3s, visibility .3s, background .15s;
  opacity: 0; visibility: hidden;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); }

.error-page { text-align: center; padding: 5rem 1.25rem; }
.error-code { font-size: clamp(3.5rem, 14vw, 7rem); font-weight: 800; color: var(--primary); line-height: 1; }
.error-page h1 { font-size: 1.5rem; margin: 1rem 0 .5rem; }
.error-page p { color: var(--text-sub); margin-bottom: 1.75rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .65rem 1.5rem; border-radius: 999px;
  background: var(--primary); color: #fff; font-weight: 500;
  box-shadow: var(--shadow-sm); transition: background .2s, box-shadow .2s;
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
