/* =====================================================================
   公安县青少年科学技术教育协会 · 官网设计系统
   - 零依赖、零构建；改这一份文件即改全站视觉
   - 亮 / 暗 / 跟随系统 三态，切换无闪烁
   ===================================================================== */

:root {
  /* 品牌色 */
  --brand-900: #07203c;
  --brand-800: #0b2545;
  --brand-700: #10335f;
  --brand-600: #17457e;
  --brand-500: #1f6feb;
  --cyan-400: #22d3ee;
  --cyan-300: #67e8f9;
  --sky-300: #7fd3ff;
  --mint-300: #5eead4;
  --amber-400: #fbbf24;

  /* 语义色（亮色） */
  --bg: #f6f9fc;
  --bg-soft: #eef4fb;
  --surface: #ffffff;
  --surface-2: #f2f7fd;
  --surface-glass: rgba(255, 255, 255, .72);
  --border: #e2ecf6;
  --border-strong: #cfe0f0;
  --text: #0f2740;
  --text-2: #44648a;
  --text-3: #7d97b5;
  --accent: var(--brand-600);
  --accent-weak: rgba(31, 111, 235, .1);
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;

  /* 形状与节奏 */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, .06), 0 2px 8px rgba(11, 37, 69, .04);
  --shadow-md: 0 4px 12px rgba(11, 37, 69, .07), 0 12px 28px rgba(11, 37, 69, .06);
  --shadow-lg: 0 10px 24px rgba(11, 37, 69, .1), 0 28px 60px rgba(11, 37, 69, .1);
  --ring: 0 0 0 3px rgba(34, 211, 238, .35);
  --container: 1200px;
  --nav-h: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --grad-brand: linear-gradient(135deg, var(--cyan-400) 0%, var(--sky-300) 55%, var(--brand-500) 130%);
  --grad-deep: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-600) 100%);
  --grad-text: linear-gradient(100deg, var(--cyan-400), var(--sky-300) 45%, var(--mint-300));
}

:root[data-theme="dark"] {
  --bg: #060d18;
  --bg-soft: #0a1524;
  --surface: #0e1c2e;
  --surface-2: #13243a;
  --surface-glass: rgba(14, 28, 46, .78);
  --border: #1c3050;
  --border-strong: #274261;
  --text: #e8f2fb;
  --text-2: #a8c2dc;
  --text-3: #7393b3;
  --accent: var(--cyan-400);
  --accent-weak: rgba(34, 211, 238, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  --grad-deep: linear-gradient(135deg, #071326 0%, #10324f 100%);
}

/* ---------------- 基础重置 ---------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding-left: 1.2em; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: var(--surface-glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; gap: 16px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad-brand);
  display: grid; place-items: center; color: #041423; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 14px rgba(34, 211, 238, .35);
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.02em; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--text-3); letter-spacing: .08em; }

.nav-menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-item {
  position: relative; padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: 15px; color: var(--text-2); cursor: pointer; white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-item:hover { color: var(--text); background: var(--accent-weak); }
.nav-item.active { color: var(--text); font-weight: 600; }
.nav-item.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 1px; height: 2px;
  background: var(--grad-brand); border-radius: 2px;
}
.nav-cta {
  margin-left: 8px; padding: 9px 18px; border-radius: var(--radius-pill);
  background: var(--grad-brand); color: #041423; font-weight: 700; font-size: 14px;
  box-shadow: 0 6px 18px rgba(34, 211, 238, .3);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.nav-cta:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 26px rgba(34, 211, 238, .42); }

.nav-drop {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 190px; padding: 10px; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; pointer-events: none;
  transition: all .28s var(--ease);
}
.nav-item.has-drop:hover .nav-drop,
.nav-item.has-drop:focus-within .nav-drop { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.nav-drop a { display: block; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-2); font-size: 14px; }
.nav-drop a:hover { background: var(--accent-weak); color: var(--text); }

.theme-btn {
  width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
  cursor: pointer; transition: all .3s var(--ease);
}
.theme-btn:hover { transform: rotate(-18deg); border-color: var(--cyan-400); }

.burger { display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }

.drawer {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 55; padding: 20px;
  background: var(--bg); overflow-y: auto; transform: translateX(-100%);
  transition: transform .38s var(--ease);
}
.drawer.open { transform: none; }
.drawer-group { margin-bottom: 22px; }
.drawer-group h4 { font-size: 13px; color: var(--text-3); letter-spacing: .1em; margin-bottom: 8px; }
.drawer-group a { display: block; padding: 11px 14px; border-radius: var(--r-sm); color: var(--text); border: 1px solid transparent; }
.drawer-group a:active { background: var(--accent-weak); }

/* ---------------- 通用块 ---------------- */
main { min-height: 60vh; }
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.surface-alt { background: var(--bg-soft); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-title { font-size: clamp(22px, 3.4vw, 30px); letter-spacing: -.02em; }
.section-title::after {
  content: ""; display: block; width: 46px; height: 3px; margin-top: 10px;
  border-radius: 3px; background: var(--grad-brand);
}
.section-desc { color: var(--text-2); font-size: 15px; margin: 8px 0 0; }
.link-more { color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: var(--radius-pill); background: var(--accent-weak); color: var(--accent);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s var(--ease);
}
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card-body { padding: 22px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--grad-brand); color: #041423; border-color: transparent; box-shadow: 0 8px 22px rgba(34, 211, 238, .3); }
.btn-primary:hover { box-shadow: 0 16px 34px rgba(34, 211, 238, .42); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--radius-pill);
  background: var(--accent-weak); color: var(--accent); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.chip-soft { background: var(--surface-2); color: var(--text-2); }
.chip-warn { background: rgba(251, 191, 36, .16); color: var(--warn); }
.chip-ok { background: rgba(22, 163, 74, .14); color: var(--ok); }
.chip-danger { background: rgba(220, 38, 38, .14); color: var(--danger); }

/* ---------------- 首页 Hero ---------------- */
.hero { position: relative; overflow: hidden; padding: 68px 0 76px; background: var(--grad-deep); color: #eaf6ff; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none;
}
.hero::before { width: 460px; height: 460px; right: -80px; top: -140px; background: rgba(34, 211, 238, .3); }
.hero::after { width: 380px; height: 380px; left: -110px; bottom: -180px; background: rgba(94, 234, 212, .22); }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.2; letter-spacing: -.03em; }
.hero p.lead { color: rgba(234, 246, 255, .78); font-size: clamp(15px, 1.8vw, 18px); max-width: 30em; margin: 18px 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-ghost { border-color: rgba(234, 246, 255, .35); color: #eaf6ff; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 40px; }
.hero-stat { padding: 16px 18px; border-radius: var(--r-md); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.hero-stat b { display: block; font-size: 22px; letter-spacing: -.02em; }
.hero-stat span { font-size: 13px; color: rgba(234, 246, 255, .68); }

.hero-panel {
  padding: 26px; border-radius: var(--r-xl); background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.hero-panel h3 { font-size: 16px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.hero-list { list-style: none; padding: 0; margin: 0; }
.hero-list li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.hero-list li:first-child { border-top: none; }
.hero-list .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 10px; flex-shrink: 0; background: var(--cyan-400); box-shadow: 0 0 0 4px rgba(34, 211, 238, .22); }
.hero-list a { color: #eaf6ff; font-size: 14.5px; line-height: 1.6; }
.hero-list .meta { display: block; font-size: 12px; color: rgba(234, 246, 255, .6); }

/* ---------------- 入口卡 ---------------- */
.entry-card { padding: 26px 24px; }
.entry-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-brand); color: #041423; margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(34, 211, 238, .28);
  transition: transform .45s var(--ease);
}
.card-hover:hover .entry-icon { transform: rotate(-8deg) scale(1.08); }
.entry-card h3 { font-size: 18px; margin-bottom: 6px; }
.entry-card p { color: var(--text-2); font-size: 14.5px; margin: 0 0 14px; }
.entry-card .arrow { color: var(--accent); font-weight: 700; }

/* ---------------- 文章列表 ---------------- */
.news-item { display: grid; grid-template-columns: 132px 1fr; gap: 20px; padding: 20px; align-items: center; }
.news-thumb { width: 132px; height: 88px; border-radius: var(--r-md); overflow: hidden; background: var(--grad-deep); position: relative; flex-shrink: 0; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.65); font-size: 22px; font-weight: 800; }
.news-title { font-size: 17.5px; margin-bottom: 6px; transition: color .25s var(--ease); }
.news-item:hover .news-title { color: var(--accent); }
.news-sum { color: var(--text-2); font-size: 14.5px; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { display: flex; gap: 14px; color: var(--text-3); font-size: 13px; flex-wrap: wrap; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 16px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 14.5px; white-space: nowrap; cursor: pointer; transition: all .28s var(--ease); }
.tab:hover { border-color: var(--cyan-400); color: var(--text); }
.tab.active { background: var(--grad-brand); color: #041423; border-color: transparent; font-weight: 700; }

.pager { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 30px 0; flex-wrap: wrap; }
.pager button { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.pager button.active { background: var(--grad-brand); color: #041423; border-color: transparent; font-weight: 700; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- 详情页 ---------------- */
.prose-custom { font-size: 16.5px; line-height: 1.95; color: var(--text); }
.prose-custom h2 { font-size: 21px; margin: 34px 0 14px; padding-left: 12px; border-left: 4px solid var(--cyan-400); }
.prose-custom h3 { font-size: 18px; margin: 26px 0 10px; }
.prose-custom p { margin: 0 0 18px; }
.prose-custom img { border-radius: var(--r-md); margin: 18px 0; }
.prose-custom a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose-custom blockquote { margin: 18px 0; padding: 14px 18px; border-left: 4px solid var(--border-strong); color: var(--text-2); background: var(--surface-2); border-radius: 0 var(--r-md) var(--r-md) 0; }
.prose-custom ul, .prose-custom ol { margin: 0 0 18px; }
.prose-custom li { margin-bottom: 6px; }
.prose-custom table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.prose-custom th, .prose-custom td { border: 1px solid var(--border); padding: 10px 12px; }
.prose-custom th { background: var(--surface-2); }

.article-head { padding: 34px 0 8px; }
.breadcrumb { display: flex; gap: 8px; font-size: 13.5px; color: var(--text-3); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.article-title { font-size: clamp(24px, 3.6vw, 34px); line-height: 1.35; margin-bottom: 14px; }
.article-meta { display: flex; gap: 16px; color: var(--text-3); font-size: 13.5px; flex-wrap: wrap; }

.toc-box { position: sticky; top: 84px; }
.toc-box h4 { font-size: 13px; color: var(--text-3); letter-spacing: .1em; margin-bottom: 10px; }
.toc-box a { display: block; padding: 7px 10px; border-left: 2px solid transparent; color: var(--text-2); font-size: 14px; }
.toc-box a:hover, .toc-box a.active { border-left-color: var(--cyan-400); color: var(--accent); }

/* ---------------- 人物卡 ---------------- */
.person { padding: 24px 20px; text-align: center; }
.person-avatar {
  width: 78px; height: 78px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden;
  background: var(--grad-brand); color: #041423; display: grid; place-items: center;
  font-size: 26px; font-weight: 800; box-shadow: 0 10px 26px rgba(34, 211, 238, .28);
}
.person h4 { font-size: 17px; }
.person .ptitle { color: var(--accent); font-size: 13.5px; margin: 4px 0 8px; }
.person .pbio { color: var(--text-2); font-size: 13.5px; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 18px; }
.label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--surface); transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan-400); box-shadow: var(--ring); }
.textarea { min-height: 130px; resize: vertical; line-height: 1.75; }
.hint { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.checkline input { margin-top: 4px; }

/* ---------------- 资源下载 ---------------- */
.file-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.file-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent); font-weight: 700; font-size: 12px; flex-shrink: 0; }
.file-main { flex: 1; min-width: 0; }
.file-name { font-weight: 600; }
.file-sub { font-size: 13px; color: var(--text-3); }

/* ---------------- 页脚 ---------------- */
.footer { margin-top: 20px; padding: 46px 0 96px; background: var(--surface); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer h5 { font-size: 14px; margin-bottom: 12px; }
.footer a, .footer li { color: var(--text-2); font-size: 14px; }
.footer ul { list-style: none; padding: 0; }
.footer li { margin-bottom: 7px; }
.footer .copyright { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 13px; }
.footer .copyright .legal-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; margin: 0; }
.footer .copyright .legal-line + .legal-line { margin-top: 8px; }
.footer .copyright .icp { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--border); }
.footer .copyright .icp:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------------- 移动端底部 Tab ---------------- */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface-glass); backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}
.tabbar-inner { display: flex; }
.tabbar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 11.5px; color: var(--text-3); }
.tabbar-item.active { color: var(--accent); font-weight: 700; }
.tabbar-item svg { width: 21px; height: 21px; }

/* ---------------- 状态 ---------------- */
.skeleton { border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.sk-line { height: 14px; margin-bottom: 10px; }
.sk-block { height: 90px; }

.empty { padding: 60px 20px; text-align: center; color: var(--text-3); }
.empty-icon { font-size: 40px; margin-bottom: 10px; }

.toast-wrap { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast { padding: 11px 20px; border-radius: var(--radius-pill); background: var(--brand-800); color: #eaf6ff; box-shadow: var(--shadow-lg); font-size: 14.5px; animation: toastIn .35s var(--ease); }
.toast.ok { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.toast.err { background: linear-gradient(135deg, #991b1b, #dc2626); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- 后台 ---------------- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; background: var(--bg); }
.admin-side { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { margin-bottom: 22px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-sm); color: var(--text-2); font-size: 14.5px; margin-bottom: 4px; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a.active { background: var(--accent-weak); color: var(--accent); font-weight: 700; }
.admin-nav .group-title { font-size: 12px; color: var(--text-3); letter-spacing: .1em; padding: 14px 14px 6px; }
.admin-main { padding: 26px 30px 60px; overflow-x: hidden; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-top h2 { font-size: 22px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { padding: 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--text-3); }

.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { color: var(--text-3); font-size: 13px; font-weight: 600; white-space: nowrap; }
.table tr:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; padding: 9px 12px; font-size: 14px; }

.modal-mask { position: fixed; inset: 0; z-index: 300; background: rgba(7, 26, 48, .55); backdrop-filter: blur(4px); display: none; padding: 20px; overflow-y: auto; }
.modal-mask.open { display: flex; align-items: flex-start; justify-content: center; }
.modal { width: min(760px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); margin: 40px auto; animation: popIn .32s var(--ease); }
.modal.wide { width: min(920px, 100%); }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 22px; max-height: 68vh; overflow-y: auto; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--grad-deep); }
.login-card { width: min(400px, 100%); padding: 34px 30px; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-lg); }

.badge-draft { color: var(--warn); }
.badge-pub { color: var(--ok); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero-panel { display: none; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; display: none; }
  .admin-side.open { display: block; }
  .admin-main { padding: 20px 16px 90px; }
}
@media (max-width: 720px) {
  :root { --nav-h: 56px; }
  .nav-menu { display: none; }
  .burger { display: grid; place-items: center; margin-left: auto; }
  .theme-btn { margin-left: 8px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 38px 0; }
  .hero { padding: 44px 0 52px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .tabbar { display: block; }
  .toast-wrap { bottom: 82px; }
  .form-row { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; gap: 12px; }
  .news-thumb { width: 100%; height: 168px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   教育门户皮肤（省级青少年科技教育协会门户版式）
   —— 双段式页头（浅蓝渐变 + 城市剪影 + 蓝色横排导航）+ 蓝色页脚
   —— 覆盖上面的默认导航样式；类名统一 edu- 前缀，避免与历史样式互相污染
   ===================================================================== */
:root {
  --edu-blue: #0081df;
  --edu-blue-d: #0069b8;
  --edu-blue-l: #2f88d8;
  --edu-red: #e60016;
  --edu-red-d: #b72e2e;
  --edu-ink: #333;
  --edu-ink-2: #666;
  --edu-line: #e8e8e8;
  --edu-page: #fafafa;
  --edu-wrap: 1300px;
  --edu-top-h: 118px;
  --edu-nav-h: 44px;
  --nav-h: calc(var(--edu-top-h) + var(--edu-nav-h));
}
body { background: var(--edu-page); }

.edu-wrap { width: 100%; max-width: var(--edu-wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- 页头上段：浅蓝渐变 + 天际线 ---------- */
.edu-top {
  /* 不能用 overflow:hidden：会把「登录」下拉菜单裁掉（2026-11-18 修复） */
  position: relative; z-index: 30;
  background: linear-gradient(180deg, #f2f9ff 0%, #e2f0fd 46%, #d2e7fa 100%);
  border-bottom: 1px solid #cfe2f4;
}
.edu-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--edu-top-h);
  background: url(../img/mock/skyline.svg) bottom right / auto 100% no-repeat;
  opacity: .85; pointer-events: none;
}
.edu-top-in {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 18px; height: var(--edu-top-h);
}
.edu-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.edu-logo { flex-shrink: 0; display: block; }
.edu-logo-img {
  height: 66px; width: auto; display: block;
  filter: drop-shadow(0 2px 6px rgba(22, 104, 201, .18));
}
.edu-brand-txt { min-width: 0; }
.edu-brand-txt b {
  display: block; font-size: 31px; line-height: 1.2; font-weight: 800;
  color: #1668c9; letter-spacing: 1px; white-space: nowrap;
}
.edu-brand-txt em {
  display: block; margin-top: 3px; font-style: normal;
  font-size: 11.5px; letter-spacing: .07em; color: #2b7cc9; opacity: .9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.edu-acts { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.edu-acts .edu-act[hidden] { display: none; }
/* 登录状态：一个明显的「● 名字 / 角色」胶囊，避免用户看不出是否已登录 */
.edu-user[hidden] { display: none; }
.edu-user {
  display: inline-flex; align-items: center; gap: 8px; max-width: 210px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: rgba(4, 46, 88, .92); border: 1px solid rgba(255, 255, 255, .55);
  color: #fff; line-height: 1.15; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(4, 32, 60, .35);
}
.edu-user-dot { font-size: 10px; color: #42e39b; text-shadow: 0 0 6px rgba(66, 227, 155, .8); }
.edu-user-txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.edu-user-txt b { font-size: 13px; font-weight: 700; color: #fff; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.edu-user-txt em { font-size: 11px; font-style: normal; color: #bfe0ff; }
@media (max-width: 1080px) { .edu-user { max-width: 150px; } .edu-user-txt b { max-width: 100px; } }
.edu-act {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 15px;
  border: 0; border-radius: 4px; background: var(--edu-blue-l); color: #fff;
  font-size: 14px; line-height: 34px; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease);
}
.edu-act:hover { background: #1d78cc; }
.edu-act.solid { background: var(--edu-blue-d); }
.edu-act.solid:hover { background: #005da6; }
.edu-act .theme-btn, .edu-acts .theme-btn {
  width: 34px; height: 34px; border-radius: 4px; background: rgba(255, 255, 255, .55);
  border: 1px solid #b8d6ef; color: #1668c9; font-size: 15px;
}
.edu-acts .theme-btn:hover { transform: none; border-color: #1668c9; }

/* 微信身份入口 */
.edu-wx-wrap { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }
.edu-act-wx { padding: 0 13px; }
.edu-act-wx.is-on { background: #07c160; }
.edu-act-wx.is-on:hover { background: #06ad56; }
.edu-wx-av {
  width: 21px; height: 21px; border-radius: 50%; object-fit: cover;
  background: rgba(255, 255, 255, .4); flex-shrink: 0;
}
.edu-wx-menu {
  position: absolute; top: 40px; right: 0; z-index: 120; min-width: 200px;
  padding: 13px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); box-shadow: 0 10px 28px rgba(15, 39, 64, .16);
}
.edu-wx-menu[hidden] { display: none; }
/* 注册下拉（老师注册 / 学生注册合并为一个按钮） */
.edu-wx-menu .edu-reg-item {
  display: block; padding: 8px 10px; border-radius: 8px;
  text-decoration: none; color: var(--text);
}
.edu-wx-menu .edu-reg-item + .edu-reg-item { margin-top: 6px; }
.edu-wx-menu .edu-reg-item:hover { background: var(--surface-2); }
.edu-wx-menu .edu-reg-item b { display: block; font-size: 14px; font-weight: 600; }
.edu-wx-menu .edu-reg-item span { display: block; margin-top: 2px; font-size: 12px; color: var(--text-2); }
.edu-wx-menu-hd { display: flex; align-items: center; gap: 10px; }
.edu-wx-menu-hd .edu-wx-av.big { width: 38px; height: 38px; background: var(--surface-2); }
.edu-wx-menu-hd b {
  display: block; font-size: 14px; color: var(--text); max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.edu-wx-menu-hd span { display: block; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.edu-wx-menu button {
  width: 100%; height: 33px; margin-top: 11px; border: 1px solid var(--border-strong);
  border-radius: 8px; background: var(--surface-2); color: var(--text-2);
  font-size: 13px; cursor: pointer; transition: background-color .2s var(--ease);
}
.edu-wx-menu button:hover { background: var(--bg-soft); color: var(--text); }

.edu-search { position: relative; z-index: 1; display: flex; gap: 8px; padding: 0 0 14px; }
.edu-search[hidden] { display: none; }
.edu-search input {
  flex: 1; height: 38px; padding: 0 14px; border: 1px solid #c8ddf0; border-radius: 4px;
  background: #fff; color: var(--edu-ink); font-size: 14px;
}
.edu-search button {
  height: 38px; padding: 0 22px; border: 0; border-radius: 4px;
  background: var(--edu-blue); color: #fff; font-size: 14px; cursor: pointer;
}

.edu-burger {
  display: none; width: 42px; height: 42px; margin-left: auto; flex-shrink: 0;
  border: 1.5px solid #1668c9; border-radius: 6px; background: #fff;
  color: #1668c9; font-size: 20px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 6px rgba(22, 104, 201, .18);
}

/* ---------- 页头下段：蓝色导航条 ---------- */
.edu-nav { position: relative; z-index: 10; background: var(--edu-blue); }
.edu-nav-in { display: flex; justify-content: center; }
.edu-nav-a {
  position: relative; display: block; padding: 0 26px; line-height: var(--edu-nav-h);
  color: #fff; font-size: 16px; white-space: nowrap; cursor: pointer;
  transition: background-color .18s var(--ease);
}
.edu-nav-a:hover, .edu-nav-a.active { background: var(--edu-blue-d); }
.edu-drop {
  position: absolute; top: 100%; left: 0; z-index: 80; min-width: 168px;
  display: none; padding: 6px 0; background: var(--edu-blue);
  box-shadow: 0 10px 24px rgba(6, 52, 92, .22);
}
.edu-nav-a.has-drop:hover .edu-drop, .edu-nav-a.has-drop:focus-within .edu-drop { display: block; }
.edu-drop a { display: block; padding: 10px 16px; color: #fff; font-size: 14px; line-height: 1.4; white-space: nowrap; }
.edu-drop a:hover { background: var(--edu-blue-d); }

/* ---------- 页脚：联系我们蓝块 + 版权条 ---------- */
.edu-foot { margin-top: 0; background: #fff; }
.edu-foot-contact {
  background: linear-gradient(120deg, #0b74c4 0%, #0081df 60%, #2f9ee8 100%);
  color: #fff; padding: 34px 0 30px;
}
.edu-foot-contact h4 { font-size: 20px; margin-bottom: 14px; letter-spacing: 1px; }
.edu-foot-contact .foot-cols { display: flex; flex-wrap: wrap; gap: 12px 46px; font-size: 14.5px; opacity: .96; }
.edu-foot-contact .foot-cols span { display: inline-flex; align-items: center; gap: 7px; }
.edu-foot-contact a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .5); }
/* 联系条：左侧信息 + 右侧公众号二维码卡片 */
.edu-foot-contact .foot-in {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.edu-foot-contact .foot-info { min-width: 0; }
.foot-qr {
  flex-shrink: 0; background: #fff; border-radius: 8px; padding: 8px 10px;
  box-shadow: 0 8px 22px rgba(0, 42, 80, .18); transition: transform .25s var(--ease);
}
.foot-qr:hover { transform: translateY(-2px); }
.foot-qr img { display: block; width: 320px; height: auto; }
.edu-foot-copy { padding: 16px 0 20px; font-size: 13px; color: #7a8a99; }
.edu-foot-copy p { margin: 0 0 6px; }
.edu-foot-copy .legal-line { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.edu-foot-copy a { color: #7a8a99; }
.edu-foot-copy a:hover { color: var(--edu-blue); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  :root { --edu-top-h: 96px; }
  .edu-brand-txt b { font-size: 25px; }
  .edu-logo-img { height: 56px; }
  .edu-nav-a { padding: 0 17px; font-size: 15px; }
}
@media (max-width: 900px) {
  :root { --edu-top-h: 74px; --edu-nav-h: 0px; }
  .edu-brand-txt b { font-size: 19px; letter-spacing: .5px; }
  .edu-brand-txt em { display: none; }
  .edu-logo-img { height: 44px; }
  .edu-acts { display: flex; gap: 7px; }
  .edu-act:not(.edu-act-wx):not(#edu-logout), .edu-acts .theme-btn { display: none; }
  .edu-burger { display: block; }
  .edu-nav { display: none; }
  .edu-foot-contact .foot-in { flex-direction: column; align-items: flex-start; gap: 22px; }
}
@media (max-width: 520px) {
  :root { --edu-top-h: 64px; }
  .edu-brand { gap: 10px; }
  .edu-brand-txt b { font-size: 16px; white-space: normal; line-height: 1.25; }
  .edu-logo-img { height: 38px; }
  .edu-act-wx { padding: 0 10px; }
  .edu-act-wx span { display: none; }
  .edu-foot-contact { padding: 26px 0 22px; }
  .edu-foot-contact h4 { font-size: 17px; }
  .edu-foot-contact .foot-cols { flex-direction: column; gap: 8px; font-size: 13.5px; }
  .foot-qr img { width: 218px; }
}
