:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #0f766e;
  --danger: #b91c1c;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; }
.logo img { display: block; height: 36px; width: auto; }
.logo span { color: var(--primary); }
.main-nav { display: flex; gap: 18px; font-size: 15px; }
.main-nav a { color: #374151; }
.main-nav a:hover { color: var(--primary); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-switch { font-size: 14px; color: #374151; white-space: nowrap; }
.lang-switch:hover { color: var(--primary); }
.header-search { margin-left: auto; display: flex; gap: 8px; }
.header-search input {
  width: 220px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
.header-search input:focus { border-color: var(--primary); }
.header-search button { padding: 8px 14px; }

/* generic */
.btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.2;
}
.btn:hover { border-color: #cbd5e1; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

main.site-main { padding: 28px 0 60px; min-height: 60vh; }

.section { margin-bottom: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 20px; }
.section-head a { font-size: 14px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.text-center { text-align: center; }

/* hero */
.hero { padding: 34px 0 10px; text-align: center; }
.hero h1 { font-size: 30px; margin: 0 0 10px; }
.hero p { color: var(--muted); margin: 0 0 22px; }
.hero-search { display: flex; max-width: 620px; margin: 0 auto; gap: 8px; }
.hero-search input {
  flex: 1;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
}
.hero-search button { padding: 13px 26px; border-radius: 10px; }

/* category grid */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.category-card { padding: 16px; }
.category-card h3 { margin: 0 0 6px; font-size: 16px; }
.category-card p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.category-card .children { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}
.chip:hover { background: #e2e8f0; color: #334155; }

/* tool cards */
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tool-card-top { display: flex; gap: 12px; align-items: flex-start; }
.logo-box {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #e0e7ff; color: #3730a3; font-weight: 700; font-size: 15px;
  flex: 0 0 44px; overflow: hidden;
}
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.logo-box.lg { width: 72px; height: 72px; flex-basis: 72px; font-size: 24px; border-radius: 16px; }
.tool-card h3 { margin: 0 0 2px; font-size: 16px; }
.tool-card .tagline { color: var(--muted); font-size: 13px; margin: 0; }
.tool-card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  font-size: 12px; background: #eef2ff; color: #4338ca;
}
.badge.gray { background: #f3f4f6; color: #4b5563; }
.badge.green { background: #ecfdf5; color: #047857; }
.badge.orange { background: #fff7ed; color: #c2410c; }

/* lists */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-no { width: 26px; text-align: center; font-weight: 700; color: var(--muted); }
.rank-no.top { color: var(--primary); }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }

/* detail */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.tool-hero { padding: 24px; display: flex; gap: 18px; flex-wrap: wrap; }
.tool-hero-main { flex: 1; min-width: 240px; }
.tool-hero h1 { margin: 0 0 6px; font-size: 26px; }
.tool-hero .tagline { color: var(--muted); margin: 0 0 12px; }
.tool-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.content-block { padding: 22px 24px; margin-top: 18px; }
.content-block h2 { font-size: 19px; margin: 0 0 12px; }
.content-block h3 { font-size: 16px; margin: 20px 0 8px; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pros-cons ul { margin: 0; padding-left: 18px; }
.pros-cons li { margin-bottom: 6px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { color: #374151; margin: 8px 0 0; }

/* forms / filter */
.filter-bar { padding: 14px 16px; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-bar select, .filter-bar input {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 36px; text-align: center; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #374151; font-size: 14px;
}
.pager .active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .disabled { color: #cbd5e1; }

/* article */
.article-card { overflow: hidden; display: flex; flex-direction: column; }
.article-cover { height: 150px; background: #eef2ff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-cover-fallback { color: #94a3b8; font-size: 13px; letter-spacing: 2px; }
.article-card-body { padding: 16px; }
.article-card h3 { margin: 0 0 8px; font-size: 16px; }
.article-card p { margin: 0; color: var(--muted); font-size: 13px; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.article-detail { padding: 30px; }
.article-detail h1 { margin: 0 0 12px; font-size: 28px; line-height: 1.4; }
.article-meta { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.article-cover-img { width: 100%; height: auto; border-radius: 10px; margin-bottom: 20px; display: block; }
.article-body { font-size: 16px; line-height: 1.9; color: #1f2937; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 20px auto; border-radius: 10px; }
.article-body h2, .article-body h3 { margin: 26px 0 10px; }
.article-body blockquote { border-left: 3px solid var(--primary); margin: 18px 0; padding: 6px 16px; color: #4b5563; background: #f8fafc; }
.article-body pre { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 8px; overflow: auto; }
.article-body code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 14px; }

/* article timeline */
.timeline { position: relative; padding-left: 24px; margin: 6px 0 8px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 10px; bottom: 8px;
  border-left: 1px dashed #cbd5e1;
}
.tl-day { position: relative; }
.tl-day-head { position: relative; display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; }
.tl-day-head::before {
  content: ""; position: absolute; left: -21px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px; border-radius: 3px; background: var(--primary);
}
.tl-day-label { font-size: 18px; font-weight: 700; color: var(--primary); line-height: 1.3; }
.tl-day-count {
  font-size: 12px; color: var(--muted); background: #eef2ff;
  padding: 1px 9px; border-radius: 999px;
}
.tl-items { display: flex; flex-direction: column; gap: 10px; }
.tl-item {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; transition: border-color .15s ease, box-shadow .15s ease;
}
.tl-item::before {
  content: ""; position: absolute; left: -22px; top: 22px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary);
}
.tl-item:hover { border-color: #c7d2fe; box-shadow: var(--shadow); }
.tl-item-main { flex: 1; min-width: 0; }
.tl-title { margin: 0 0 6px; font-size: 17px; line-height: 1.45; }
.tl-title a { color: var(--text); }
.tl-title a:hover { color: var(--primary); }
.tl-summary {
  margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tl-meta { display: flex; align-items: center; gap: 12px; margin-top: 9px; font-size: 12px; color: #9ca3af; }
.tl-tag { background: #eff6ff; color: var(--primary); padding: 1px 8px; border-radius: 999px; }
.tl-thumb {
  flex: 0 0 136px; width: 136px; height: 86px; border-radius: 8px; overflow: hidden;
  background: #eef2ff; display: block;
}
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 720px) {
  .timeline { padding-left: 18px; }
  .timeline::before { left: 5px; }
  .tl-day-head::before { left: -18px; }
  .tl-item::before { left: -18px; }
  .tl-thumb { flex: 0 0 96px; width: 96px; height: 68px; }
  .tl-title { font-size: 16px; }
}
@media (max-width: 480px) {
  .tl-thumb { display: none; }
}
.article-body pre code { background: none; padding: 0; }
.article-body table { width: 100%; border-collapse: collapse; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 8px 10px; }

/* tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #4b5563; font-size: 14px; }
.tabs a.active { background: var(--text); border-color: var(--text); color: #fff; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 26px 0; color: var(--muted); font-size: 13px; }
.site-footer .footer-inner { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--primary); }

/* admin */
.admin-body { background: #f3f4f6; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side { width: 210px; background: #111827; color: #d1d5db; padding: 18px 0; flex: 0 0 210px; }
.admin-side .brand { color: #fff; font-weight: 700; font-size: 17px; padding: 0 20px 16px; display: block; }
.admin-side a { display: block; color: #cbd5e1; padding: 9px 20px; font-size: 14px; }
.admin-side a:hover, .admin-side a.active { background: #1f2937; color: #fff; }
.admin-main { flex: 1; padding: 24px; min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.admin-top h1 { margin: 0; font-size: 22px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.panel + .panel { margin-top: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; background: #fafafa; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=url],
.form-row input[type=number], .form-row select, .form-row textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff;
  font-family: inherit;
}
.form-row textarea { min-height: 90px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.flash.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat { padding: 14px; }
.stat .num { font-size: 24px; font-weight: 700; }
.stat .label { color: var(--muted); font-size: 13px; }
.inline-form { display: inline; }
.checkbox-list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checkbox-list label { font-weight: 400; }

/* 审核风险提示 */
.risk-legend { margin: 0 0 12px; line-height: 2; }
.risk-list { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.risk-badge {
  display: inline-block; font-size: 11px; line-height: 18px; padding: 0 6px;
  border-radius: 4px; border: 1px solid transparent; cursor: help; white-space: nowrap;
}
.risk-high { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.risk-medium { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.risk-low { color: #4b5563; background: #f3f4f6; border-color: #e5e7eb; }
tr.risk-row td { background: #fffafa; }

/* 后台数据看板（只读） */
.panel-title { font-size: 17px; margin: 0 0 10px; }
.dash-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.dash-cards .stat .num { font-size: 22px; }
.dash-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.dash-split .panel { margin: 0; }
.funnel-row {
  display: grid; grid-template-columns: 160px 1fr 90px 220px;
  align-items: center; gap: 12px; padding: 7px 0;
}
.funnel-row + .funnel-row { border-top: 1px dashed var(--line); }
.funnel-label { font-size: 14px; display: flex; align-items: center; gap: 7px; }
.funnel-index {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; font-size: 11px;
  background: #eef2ff; color: var(--primary); flex: none;
}
.funnel-track { background: #f3f4f6; border-radius: 4px; height: 14px; overflow: hidden; }
.funnel-bar { height: 100%; background: var(--primary); border-radius: 4px; opacity: .85; }
.funnel-value { text-align: right; font-size: 14px; }
.funnel-value span { margin-left: 6px; }
.funnel-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark { background: #f3f4f6; border-radius: 3px; height: 9px; min-width: 40px; }
.spark-bar { height: 100%; background: var(--primary); border-radius: 3px; opacity: .7; }
.trend-table td { padding-top: 6px; padding-bottom: 6px; }

/* 后台只读详情页 */
.detail-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 18px;
  border-top: 1px solid var(--line); padding-top: 14px;
}
.detail-label { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.detail-item > div:last-child { font-size: 14px; overflow-wrap: anywhere; }

@media (max-width: 960px) {
  .category-grid, .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-cards { grid-template-columns: repeat(3, 1fr); }
  .dash-split { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 130px 1fr 80px; }
  .funnel-note { display: none; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-side { width: 170px; flex-basis: 170px; }
}

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 20px; gap: 10px; }
  .header-search { width: 100%; margin-left: 0; }
  .header-search input { flex: 1; width: auto; }
  .category-grid, .tool-grid, .article-grid, .form-grid, .pros-cons { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .admin-shell { display: block; }
  .admin-side { width: 100%; display: flex; overflow-x: auto; padding: 8px; }
  .admin-side .brand { display: none; }
  .admin-side a { white-space: nowrap; }
}

/* ===== 首页工具目录（参考 ai-bot 排版） ===== */
html { scroll-behavior: smooth; }

.home-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
  padding-top: 6px;
}

/* 左侧粘性分类导航 */
.home-side { position: sticky; top: 80px; }
.home-side-inner {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 10px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.side-title {
  font-size: 15px; font-weight: 700;
  margin: -14px -10px 10px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
}
.side-title-img { display: block; height: 36px; width: auto; }
.side-nav { display: flex; flex-direction: column; }
.side-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; color: #374151; font-size: 14px;
  transition: background .15s ease, color .15s ease;
}
.side-link:hover { background: #f1f5f9; color: var(--primary); }
.side-link.active { background: #eef2ff; color: var(--primary); font-weight: 600; }
.side-count {
  margin-left: auto;
  font-size: 11px; color: var(--muted); background: #f3f4f6;
  padding: 0 7px; border-radius: 999px; line-height: 18px;
}
.side-link.active .side-count { background: #fff; color: var(--primary); }

/* 右侧主区 */
.home-main { min-width: 0; }
.home-hero {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 28px; text-align: center; margin-bottom: 22px;
}
.home-hero h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.01em; }
.home-hero p { color: var(--muted); margin: 0 0 20px; }
.home-search { display: flex; max-width: 560px; margin: 0 auto; gap: 8px; }
.home-search input {
  flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; outline: none;
}
.home-search input:focus { border-color: var(--primary); }
.home-search button { padding: 12px 24px; border-radius: 10px; }

.home-section { margin-bottom: 22px; scroll-margin-top: 84px; }
.cat-section {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px;
}
.cat-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.cat-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.cat-head a { font-size: 13px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

/* ai-bot 风格工具行：圆形 logo + 名称 + 简介，多列网格 */
.tool-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 4px 14px;
}
.tool-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; color: inherit;
  transition: background .15s ease;
}
.tool-row:hover { background: #f8fafc; }
.tool-row-logo {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px;
  background: #e0e7ff; color: #3730a3; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tool-row-logo img { width: 100%; height: 100%; object-fit: cover; }
.tool-row-body { min-width: 0; display: flex; flex-direction: column; }
.tool-row-name {
  font-weight: 600; font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s ease;
}
.tool-row:hover .tool-row-name { color: var(--primary); }
.tool-row-tag {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.empty-note { color: var(--muted); font-size: 13px; margin: 0; padding: 10px 6px; }

@media (max-width: 960px) {
  .home-wrap { grid-template-columns: 1fr; }
  .home-side { position: static; }
  .home-side-inner { max-height: none; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-link { flex: 0 0 auto; }
}
@media (max-width: 640px) {
  .home-hero { padding: 22px 16px; }
  .home-hero h1 { font-size: 22px; }
  .cat-section { padding: 16px; }
  .tool-rows { grid-template-columns: 1fr; }
}

/* ===== 首页全屏 + 左侧固定贴边栏（参考 ai-bot） ===== */
body.home-fullscreen .home-wrap {
  display: block;
  max-width: none;
  padding-left: 220px;
  padding-top: 0;
}
body.home-fullscreen .home-side {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 220px;
  z-index: 35;
  border-radius: 0;
  box-shadow: none;
}
body.home-fullscreen .home-side-inner {
  height: 100%;
  max-height: none;
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 0 12px 24px;
}
body.home-fullscreen .side-brand {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.home-fullscreen .side-title {
  margin: 0;
  padding: 0;
  border-bottom: none;
}
body.home-fullscreen .side-brand-mini { padding: 0; }
body.home-fullscreen .home-main { padding: 0 28px; }
body.home-fullscreen .side-nav { flex-direction: column; }
body.home-fullscreen .header-inner,
body.home-fullscreen .footer-inner {
  max-width: none;
  padding-left: 236px;
  padding-right: 24px;
}

@media (max-width: 719px) {
  body.home-fullscreen .home-wrap { padding-left: 0; }
  body.home-fullscreen .home-side {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px; max-width: 82vw;
    z-index: 41;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 2px 0 16px rgba(0,0,0,.18);
  }
  body.home-fullscreen.sidebar-collapsed .home-side { transform: translateX(0); }
  body.home-fullscreen.sidebar-collapsed { overflow: hidden; }
  body.home-fullscreen .home-side-inner {
    height: 100%;
    border-right: none;
    padding: 12px 12px 24px;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 40;
  }
  body.home-fullscreen.sidebar-collapsed .sidebar-backdrop { display: block; }
  body.home-fullscreen .header-inner,
  body.home-fullscreen .footer-inner { padding-left: 20px; padding-right: 20px; }
  body.home-fullscreen .home-main { padding: 0 16px; }
}

/* ===== 首页侧栏折叠：三横杠切换窄条图标栏（桌面端） ===== */
.sidebar-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; cursor: pointer; flex: 0 0 36px;
}
.sidebar-toggle span {
  display: block; width: 18px; height: 2px; margin: 0 auto; background: #374151; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.sidebar-toggle:hover { border-color: var(--primary); }
.sidebar-toggle:hover span { background: var(--primary); }
.sidebar-toggle[aria-expanded="false"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sidebar-toggle[aria-expanded="false"] span:nth-child(2) { opacity: 0; }
.sidebar-toggle[aria-expanded="false"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.side-icon { display: block; font-size: 20px; line-height: 1; flex: 0 0 auto; }
.side-brand-mini { display: none; align-items: center; justify-content: center; padding: 0 0 10px; }
.side-brand-mini img { width: 28px; height: 28px; display: block; }

body.home-fullscreen .logo { display: none; }

@media (min-width: 720px) {
  body.home-fullscreen.sidebar-collapsed .home-wrap { padding-left: 60px; }
  body.home-fullscreen.sidebar-collapsed .home-side { width: 60px; }
  body.home-fullscreen.sidebar-collapsed .home-side-inner { padding: 0 4px 20px; }
  body.home-fullscreen.sidebar-collapsed .header-inner,
  body.home-fullscreen.sidebar-collapsed .footer-inner { padding-left: 76px; padding-right: 24px; }
  body.home-fullscreen.sidebar-collapsed .side-title { display: none; }
  body.home-fullscreen.sidebar-collapsed .side-brand-mini { display: flex; }
  body.home-fullscreen.sidebar-collapsed .side-link {
    flex-direction: column; justify-content: center; align-items: center;
    padding: 10px 0; gap: 4px;
  }
  body.home-fullscreen.sidebar-collapsed .side-icon { display: block; }
  body.home-fullscreen.sidebar-collapsed .side-text,
  body.home-fullscreen.sidebar-collapsed .side-count { display: none; }
}
