/* ============================================================
   文脉 · 中华文化门户 - 样式表
   ============================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --seal: #C43A31;
  --seal-dark: #a02e26;
  --ink: #1a1a1a;
  --ink-mid: #3d3d3d;
  --ink-light: #6b6b6b;
  --ink-muted: #9d9d9d;
  --parchment: #faf7f0;
  --parchment-dark: #f0ebe0;
  --parchment-border: #e0d8c8;
  --gold: #b8924a;
  --gold-light: #d4af6a;
  --white: #ffffff;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.12);
  --transition: all 0.25s ease;
  --font-serif: 'Noto Serif SC', 'Songti SC', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { text-decoration: none; color: inherit; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--parchment); }
::-webkit-scrollbar-thumb { background: var(--parchment-border); border-radius: 3px; }

/* ---------- 容器 ---------- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   导航栏
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(250, 247, 240, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.nav.scrolled {
  border-bottom-color: var(--parchment-border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; gap: 0;
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700;
  color: var(--ink); letter-spacing: 0.05em;
  padding: 8px 12px 8px 0;
  transition: var(--transition);
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--seal); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--seal); color: #fff;
  font-size: 1rem; font-weight: 700;
}
.nav-links {
  display: flex; align-items: center; list-style: none;
  gap: 0; margin-left: 32px;
}
.nav-links li { display: flex; align-items: center; }
.nav-btn {
  display: block; padding: 6px 16px;
  font-size: 0.95rem; color: var(--ink-mid);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}
.nav-btn:hover { color: var(--seal); background: rgba(196, 58, 49, 0.06); }
.nav-btn.active { color: var(--seal); font-weight: 500; }
.nav-user { margin-left: auto; }
.btn-user {
  padding: 7px 18px;
  border: 1.5px solid var(--seal);
  border-radius: 20px;
  color: var(--seal); font-size: 0.9rem;
  transition: var(--transition);
}
.btn-user:hover { background: var(--seal); color: #fff; }
.mobile-menu-btn {
  display: none; font-size: 1.4rem;
  padding: 6px 10px; margin-left: 12px;
  color: var(--ink-mid);
}
@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--parchment); border-bottom: 1px solid var(--parchment-border); flex-direction: column; padding: 12px 0; }
  .nav-links.mobile-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-btn { width: 100%; padding: 12px 24px; border-radius: 0; }
}

/* ---------- 面包屑 ---------- */
.breadcrumb-bar {
  background: var(--parchment-dark);
  border-bottom: 1px solid var(--parchment-border);
  position: sticky; top: 64px; z-index: 100;
}
.breadcrumb-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 10px 24px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 0.85rem;
}
.bc-link {
  color: var(--seal); cursor: pointer;
  padding: 2px 4px; border-radius: 3px;
  transition: var(--transition);
}
.bc-link:hover { background: rgba(196,58,49,0.1); }
.bc-sep { color: var(--ink-muted); margin: 0 2px; }
.bc-current { color: var(--ink-mid); font-weight: 500; }

/* ============================================================
   主内容区
   ============================================================ */
#mainContent { margin-top: 64px; min-height: calc(100vh - 64px); }

/* ---------- Hero ---------- */
.hero {
  min-height: 90vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1a1208 0%, #2d1a0e 40%, #1a0a0a 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at 30% 60%, rgba(196,58,49,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(184,146,74,0.1) 0%, transparent 50%);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 40px 24px;
}
.hero-title-wrap { margin-bottom: 20px; }
.hero-title {
  font-family: var(--font-serif); font-size: clamp(5rem, 12vw, 10rem);
  color: var(--parchment); font-weight: 700;
  letter-spacing: 0.1em; line-height: 1;
}
.hero-title-accent { color: var(--seal); }
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--gold-light); font-family: var(--font-serif);
  letter-spacing: 0.3em; margin-top: 12px;
}
.hero-desc {
  color: rgba(255,255,255,0.7); font-size: 1rem;
  line-height: 2; margin: 24px 0 36px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-hero {
  padding: 14px 36px; border-radius: 28px;
  background: var(--seal); color: #fff;
  font-size: 1rem; font-family: var(--font-serif);
  letter-spacing: 0.1em; transition: var(--transition);
  border: 2px solid var(--seal);
}
.btn-hero:hover { background: var(--seal-dark); border-color: var(--seal-dark); transform: translateY(-2px); }
.btn-hero-ghost { background: transparent; color: var(--gold-light); border-color: var(--gold-light); }
.btn-hero-ghost:hover { background: rgba(212,175,106,0.15); }
.hero-scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.4); font-size: 1.2rem;
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ---------- 特色模块卡片 ---------- */
.home-features { padding: 80px 0; background: var(--parchment); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--white); border: 1px solid var(--parchment-border);
  border-radius: var(--radius-lg); padding: 32px 24px;
  cursor: pointer; transition: var(--transition);
  display: flex; flex-direction: column; align-items: flex-start;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--seal); transform: scaleX(0); transition: var(--transition);
  transform-origin: left;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--parchment-border); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-card-upload { border-style: dashed; border-color: var(--seal); }
.fc-icon { font-size: 2.2rem; margin-bottom: 16px; }
.feature-card h3 { font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 10px; }
.feature-card p { color: var(--ink-light); font-size: 0.9rem; line-height: 1.8; flex: 1; }
.fc-arrow { margin-top: 20px; color: var(--seal); font-size: 1.2rem; font-weight: bold; }

/* ---------- 最新内容 ---------- */
.home-latest { padding: 60px 0; background: var(--parchment-dark); }
.section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }
.section-header h2 { font-family: var(--font-serif); font-size: 1.6rem; }
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-tab {
  padding: 6px 16px; border-radius: 20px; font-size: 0.85rem;
  border: 1px solid var(--parchment-border); color: var(--ink-light);
  background: var(--white); transition: var(--transition);
}
.cat-tab:hover, .cat-tab.active { background: var(--seal); color: #fff; border-color: var(--seal); }

/* ---------- 卡片网格 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.content-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: var(--transition); cursor: pointer;
}
.content-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cc-cover {
  height: 160px; display: flex; align-items: center; justify-content: center;
  background: var(--parchment-dark); overflow: hidden;
}
.cc-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover-placeholder, .film-cover-placeholder, .music-cover-placeholder {
  width: 80px; height: 100px; background: var(--seal);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 1.2rem; font-weight: bold;
  border-radius: 4px; box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}
.film-cover-placeholder, .music-cover-placeholder { width: 100px; height: 100px; border-radius: 8px; font-size: 2rem; }
.cc-body { padding: 16px 20px; }
.cc-tag {
  display: inline-block; padding: 2px 10px; border-radius: 10px;
  background: rgba(196,58,49,0.1); color: var(--seal);
  font-size: 0.75rem; margin-bottom: 8px;
}
.cc-body h4 { font-family: var(--font-serif); font-size: 1rem; margin-bottom: 6px; }
.cc-body p { font-size: 0.85rem; color: var(--ink-light); line-height: 1.6; }
.cc-summary { margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cc-meta { margin-top: 10px; font-size: 0.8rem; color: var(--ink-muted); }

/* ---------- 统计 ---------- */
.home-stat { padding: 60px 0; background: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
@media (max-width: 600px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-item { padding: 24px 0; }
.stat-num { display: block; font-family: var(--font-serif); font-size: 2.2rem; color: var(--gold-light); font-weight: 700; }
.stat-label { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: 6px; }

/* ---------- 页脚 ---------- */
.footer { background: #0d0d0d; color: rgba(255,255,255,0.5); text-align: center; padding: 40px 24px; }
.footer-logo { font-family: var(--font-serif); font-size: 1.8rem; color: var(--gold-light); margin-bottom: 8px; }
.footer-sub { font-size: 0.9rem; margin-bottom: 16px; }
.footer-copy { font-size: 0.8rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; margin-top: 16px; }

/* ============================================================
   地方志页面
   ============================================================ */
.page-hero-sm {
  background: linear-gradient(135deg, var(--ink) 0%, #2d1a0e 100%);
  padding: 60px 24px 48px;
  text-align: center;
  margin-bottom: 0;
}
.page-hero-sm h2 { font-family: var(--font-serif); font-size: 2.2rem; color: var(--parchment); margin-bottom: 12px; }
.page-hero-sm p { color: rgba(255,255,255,0.7); font-size: 1rem; }
.upload-bar { margin-top: 20px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-upload {
  padding: 10px 24px; border-radius: 20px;
  background: transparent; border: 1.5px solid var(--gold-light);
  color: var(--gold-light); font-size: 0.9rem;
  transition: var(--transition);
}
.btn-upload:hover { background: rgba(212,175,106,0.2); }

/* ---------- 省份网格 ---------- */
.province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; padding: 40px 0;
}
.area-card {
  background: var(--white); border: 1px solid var(--parchment-border);
  border-radius: var(--radius-lg); padding: 24px 20px;
  cursor: pointer; transition: var(--transition);
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.area-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--seal); }
.area-card-icon { font-size: 1.8rem; margin-bottom: 10px; }
.area-card-name { font-family: var(--font-serif); font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.area-card-level { font-size: 0.75rem; color: var(--ink-muted); }

/* ---------- 区域详情页 ---------- */
.area-detail-hero {
  padding: 60px 24px 48px; color: #fff;
}
.area-detail-hero .container { max-width: 1160px; margin: 0 auto; }
.btn-back-white {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.4); color: rgba(255,255,255,0.8);
  font-size: 0.9rem; transition: var(--transition); margin-bottom: 24px;
}
.btn-back-white:hover { background: rgba(255,255,255,0.15); }
.area-detail-hero h1 { font-family: var(--font-serif); font-size: 2.5rem; margin-bottom: 8px; }
.area-detail-hero p { color: rgba(255,255,255,0.7); }
.area-detail-body { padding: 40px 0; display: flex; flex-direction: column; gap: 32px; }
.area-info-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px 32px; box-shadow: var(--shadow);
}
.area-info-card h3 { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 14px; color: var(--ink); }
.area-meta-row { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 16px; font-size: 0.85rem; color: var(--ink-light); }
.area-upload-bar { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-upload-sm {
  padding: 8px 20px; border-radius: 20px;
  border: 1.5px solid var(--seal); color: var(--seal);
  font-size: 0.85rem; background: transparent; transition: var(--transition);
}
.btn-upload-sm:hover { background: var(--seal); color: #fff; }

/* 文章列表 */
.area-articles h3, .area-children h3, .area-leaf h3 {
  font-family: var(--font-serif); font-size: 1.2rem;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--parchment-border);
}
.article-list { display: flex; flex-direction: column; gap: 12px; }
.article-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border: 1px solid var(--parchment-border);
  border-radius: var(--radius); padding: 16px 20px;
  cursor: pointer; transition: var(--transition);
}
.article-item:hover { border-color: var(--seal); box-shadow: var(--shadow); }
.ai-content { flex: 1; }
.ai-content h4 { font-family: var(--font-serif); margin-bottom: 4px; }
.ai-content p { font-size: 0.85rem; color: var(--ink-light); }
.ai-meta { font-size: 0.8rem; color: var(--ink-muted); margin-top: 6px; display: block; }
.ai-arrow { color: var(--seal); font-size: 1.2rem; margin-left: 16px; }

/* 子级网格 */
.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.child-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border: 1px solid var(--parchment-border);
  border-radius: var(--radius); padding: 14px 18px;
  cursor: pointer; transition: var(--transition);
}
.child-card:hover { border-color: var(--seal); transform: translateX(4px); }
.child-name { font-size: 0.95rem; }
.child-arrow { color: var(--seal); }

/* 道路示例 */
.road-example { margin-top: 24px; }
.road-example h4 { font-size: 1rem; font-family: var(--font-serif); margin-bottom: 12px; color: var(--ink-mid); }
.area-leaf h3 { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--parchment-border); }
.road-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.road-tag {
  padding: 6px 16px; border-radius: 20px;
  background: var(--parchment-dark); border: 1px solid var(--parchment-border);
  font-size: 0.85rem; color: var(--ink-mid);
}
.road-note { margin-top: 12px; font-size: 0.8rem; color: var(--ink-muted); }

/* ============================================================
   书/影/乐/专栏页面
   ============================================================ */
.page-content { }
.genre-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.genre-tab {
  padding: 7px 18px; border-radius: 20px;
  border: 1px solid var(--parchment-border); color: var(--ink-light);
  background: var(--white); font-size: 0.9rem; transition: var(--transition);
}
.genre-tab:hover, .genre-tab.active { background: var(--seal); color: #fff; border-color: var(--seal); }
.columns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; padding: 40px 0; }
.column-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 28px; display: flex; gap: 20px;
  box-shadow: var(--shadow); transition: var(--transition);
}
.column-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.col-avatar, .col-avatar img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.col-avatar-placeholder {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: var(--seal); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 1.4rem;
}
.col-body h3 { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: 4px; }
.col-author { font-size: 0.85rem; color: var(--ink-light); margin-bottom: 8px; }
.col-desc { font-size: 0.9rem; color: var(--ink-mid); line-height: 1.7; }
.col-count { display: inline-block; margin-top: 10px; font-size: 0.8rem; color: var(--seal); }

/* ============================================================
   文章详情页
   ============================================================ */
.article-page { padding: 48px 0; }
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 20px;
  border: 1px solid var(--parchment-border); color: var(--ink-mid);
  font-size: 0.9rem; transition: var(--transition); margin-bottom: 32px;
}
.btn-back:hover { border-color: var(--seal); color: var(--seal); }
.article-title { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 16px; line-height: 1.4; }
.article-meta { display: flex; gap: 20px; font-size: 0.85rem; color: var(--ink-muted); padding-bottom: 20px; border-bottom: 1px solid var(--parchment-border); margin-bottom: 28px; }
.article-content { font-size: 1rem; line-height: 2; color: var(--ink-mid); }

/* ============================================================
   弹窗：上传、注册/登录
   ============================================================ */
.modal-overlay, .user-menu-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 2000;
}
.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: min(520px, 90vw); max-height: 85vh;
  background: var(--parchment); border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 2001; opacity: 0; pointer-events: none;
  transition: var(--transition); overflow: hidden;
  display: flex; flex-direction: column;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid var(--parchment-border);
  background: var(--white); flex-shrink: 0;
}
.modal-header h3 { font-family: var(--font-serif); font-size: 1.2rem; }
.modal-header button { font-size: 1.2rem; color: var(--ink-muted); width: 32px; height: 32px; border-radius: 50%; }
.modal-header button:hover { background: var(--parchment-dark); color: var(--ink); }
.modal-body { padding: 28px; overflow-y: auto; flex: 1; }

/* 表单 */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 6px; color: var(--ink-mid); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--parchment-border); border-radius: var(--radius);
  background: var(--white); font-size: 0.95rem; color: var(--ink);
  transition: var(--transition); resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--seal);
  box-shadow: 0 0 0 3px rgba(196,58,49,0.1);
}
.btn-primary {
  padding: 12px 28px; border-radius: var(--radius);
  background: var(--seal); color: #fff; font-size: 1rem;
  transition: var(--transition);
}
.btn-primary:hover { background: var(--seal-dark); }
.btn-full { width: 100%; }

/* 认证弹窗 */
.auth-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--parchment-border); margin-bottom: 24px; }
.auth-tab { flex: 1; padding: 10px; font-size: 1rem; color: var(--ink-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: var(--transition); }
.auth-tab.active { color: var(--seal); border-bottom-color: var(--seal); font-weight: 500; }
.auth-tip { margin-top: 14px; text-align: center; font-size: 0.85rem; color: var(--ink-muted); }
.auth-tip a { color: var(--seal); }
.auth-msg { margin-top: 12px; font-size: 0.85rem; text-align: center; min-height: 20px; }
.auth-msg.error { color: var(--seal); }
.auth-msg.success { color: #4caf50; }

/* 用户菜单 */
.user-menu {
  position: fixed; top: 68px; right: 24px;
  width: 220px; background: var(--white);
  border: 1px solid var(--parchment-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  z-index: 2001; opacity: 0; pointer-events: none;
  transform: translateY(-8px); transition: var(--transition);
}
.user-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.user-menu-header { display: flex; align-items: center; gap: 12px; padding: 16px; }
.user-avatar-big {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--seal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: bold; flex-shrink: 0;
}
.user-menu-name { font-weight: 500; font-size: 0.95rem; }
.user-menu-role { font-size: 0.75rem; color: var(--ink-muted); }
.user-menu hr { border: none; border-top: 1px solid var(--parchment-border); }
.user-menu-item { display: block; width: 100%; text-align: left; padding: 12px 16px; font-size: 0.9rem; color: var(--ink-mid); transition: var(--transition); }
.user-menu-item:hover { background: var(--parchment-dark); color: var(--ink); }
.user-menu-item.danger { color: var(--seal); }
.user-menu-item.danger:hover { background: rgba(196,58,49,0.08); }

/* ============================================================
   通用工具
   ============================================================ */
.empty-tip { text-align: center; color: var(--ink-muted); padding: 40px; width: 100%; grid-column: 1/-1; }
.empty-tip code { background: var(--parchment-dark); padding: 2px 6px; border-radius: 3px; font-family: monospace; }

/* Loading 动画 */
.loading-dots {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 60px; width: 100%; grid-column: 1/-1;
}
.loading-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--seal); animation: ldot 1.2s ease infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ldot { 0%,80%,100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* Toast */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: #fff;
  padding: 12px 24px; border-radius: 24px;
  font-size: 0.9rem; opacity: 0; pointer-events: none;
  transition: all 0.3s; z-index: 9999;
  white-space: nowrap; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 子级加载中占位 */
.area-loading-children {
  text-align: center;
  padding: 40px 24px;
  background: var(--white);
  border: 1px dashed var(--parchment-border);
  border-radius: var(--radius);
  margin: 24px 0;
  color: var(--ink-mid);
}
.area-loading-children p { margin: 0 0 8px; }
.area-loading-children code {
  background: var(--parchment); padding: 2px 6px;
  border-radius: 4px; font-size: 0.85em;
}

/* ============================================================
   浮动投稿按钮 (FAB)
   ============================================================ */
.fab-container {
  position: fixed; bottom: 32px; right: 32px; z-index: 1500;
  display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px;
}
.fab-main {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--seal); color: #fff; font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(196,58,49,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.fab-main:hover {
  background: var(--seal-dark);
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(196,58,49,0.5);
}
.fab-main.open {
  transform: rotate(45deg);
  background: var(--ink);
}
.fab-main.open:hover {
  transform: rotate(45deg) scale(1.08);
}
.fab-menu {
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s ease;
}
.fab-menu.open {
  opacity: 1; pointer-events: auto;
  transform: translateY(0);
}
.fab-item {
  padding: 10px 20px; border-radius: 24px;
  background: var(--white); color: var(--ink-mid);
  border: 1px solid var(--parchment-border);
  box-shadow: var(--shadow);
  font-size: 0.9rem; white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
}
.fab-item:hover {
  background: var(--seal); color: #fff; border-color: var(--seal);
  transform: translateX(-4px);
}
@media (max-width: 600px) {
  .fab-container { bottom: 20px; right: 20px; }
  .fab-main { width: 48px; height: 48px; font-size: 1.2rem; }
}

/* ---------- 后端未启动警告条 ---------- */
.backend-warning {
  position: sticky; top: 0; z-index: 999;
  background: #FFF3E0; border-bottom: 2px solid #E65100;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%) } to { transform: translateY(0) } }
.bw-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 10px 24px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 0.88rem; color: #BF360C; flex-wrap: wrap;
}
.bw-inner code {
  background: rgba(0,0,0,0.06); padding: 2px 8px; border-radius: 4px;
  font-size: 0.82rem; user-select: all;
}
.bw-dismiss {
  background: none; border: none; font-size: 1.1rem; cursor: pointer;
  color: #BF360C; padding: 4px 8px; border-radius: 4px;
}
.bw-dismiss:hover { background: rgba(0,0,0,0.06); }

/* ---------- 离线模式提示 ---------- */
.offline-tip {
  text-align: center; padding: 16px 24px; margin: 12px 0;
  background: rgba(184,146,74,0.1); border: 1px dashed var(--gold);
  border-radius: var(--radius); color: var(--ink-mid); font-size: 0.85rem;
  line-height: 1.8;
}

/* 页面切换过渡 */
#mainContent > * { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 响应式 */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 4rem; }
  .province-grid { grid-template-columns: repeat(2, 1fr); }
  .children-grid { grid-template-columns: repeat(2, 1fr); }
}
