body { background: linear-gradient(180deg, var(--bg) 0%, #f7f9fc 100%); }
@media (prefers-color-scheme: dark) {
  body { background: linear-gradient(180deg, var(--bg) 0%, #0a1020 100%); }
}
html[data-theme="dark"] body { background: linear-gradient(180deg, var(--bg) 0%, #0a1020 100%); }
html[data-theme="light"] body { background: linear-gradient(180deg, var(--bg) 0%, #f7f9fc 100%); }
html[data-theme="black"] body,
html[data-theme="forest"] body,
html[data-theme="slate"] body,
html[data-theme="purple"] body { background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%); }
html[data-theme="sepia"] body { background: linear-gradient(180deg, var(--bg) 0%, #f4eee1 100%); }
main { max-width: 1120px; margin: 0 auto; padding: 32px 20px 60px; }
header { margin-bottom: 24px; padding: 28px; border: 1px solid var(--header-border); border-radius: 18px; background: var(--header-bg); box-shadow: var(--header-shadow); }
nav { margin: 16px 0 24px; display: flex; flex-wrap: wrap; gap: 12px; }
nav a { display: inline-block; padding: 8px 14px; border: 1px solid var(--nav-border); border-radius: 999px; text-decoration: none; color: var(--link); background: var(--nav-bg); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); height: 100%; box-sizing: border-box; }
.card h2 { margin-top: 0; line-height: 1.35; font-size: 1.45rem; }
.card p { font-size: 1rem; }
.card a { text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions a { display: inline-block; padding: 8px 12px; border-radius: 10px; background: var(--pill-bg); color: var(--pill-text); text-decoration: none; }

/* 顶部四把尺子总览图 */
.hero-figure {
  margin: 0 0 24px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}
.hero-figure object {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* 卡片化 SVG 配图 */
.card-figure {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-figure object {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  border-radius: 10px;
}

/* 内联图标统一风格：currentColor 继承文字色 */
.icon {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.18em;
  flex-shrink: 0;
}
.icon-lg { width: 1.6em; height: 1.6em; vertical-align: -0.3em; }

/* 分组标题：左侧色条 + 标题 + 副标题 */
.group { margin: 28px 0 8px; }
.group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 0 4px;
}
.group-bar { width: 6px; height: 22px; border-radius: 3px; }
.group-title { margin: 0; font-size: 1.2rem; font-weight: 700; }
.group-hint { color: var(--muted); font-size: 0.92rem; }

/* 四个分组主题色 */
.group.theme-1 .group-bar { background: linear-gradient(180deg, #2563eb, #06b6d4); }
.group.theme-2 .group-bar { background: linear-gradient(180deg, #7c3aed, #a855f7); }
.group.theme-3 .group-bar { background: linear-gradient(180deg, #ea580c, #f59e0b); }
.group.theme-4 .group-bar { background: linear-gradient(180deg, #059669, #10b981); }

/* 卡片：图标头 + 标题 + 描述 + 动作 */
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.card-icon svg { width: 22px; height: 22px; }
.card .small { color: var(--muted); font-size: 0.82rem; margin: 0; }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; line-height: 1.35; }
.card p { font-size: 0.95rem; margin: 0 0 4px; }

/* 主题色对应的卡片图标底色 */
.theme-1 .card-icon { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.theme-2 .card-icon { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.theme-3 .card-icon { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.theme-4 .card-icon { background: linear-gradient(135deg, #059669, #10b981); }

/* 动作按钮：图标 + 文字 */
.actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-text);
  text-decoration: none;
  font-size: 0.92rem;
}
.actions a:hover { filter: brightness(0.97); }

/* 快速入口：6 个图标大按钮（替代顶部 nav） */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--panel-bg);
  color: var(--link);
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: var(--shadow);
}
.quick-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.10); }
.quick-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}
.quick-icon svg { width: 28px; height: 28px; }
.quick-card .quick-title { font-weight: 700; font-size: 1rem; }
.quick-card .quick-desc { color: var(--muted); font-size: 0.82rem; line-height: 1.4; }

/* 快速入口 7 张卡的图标配色 */
.quick-card.q1 .quick-icon { background: linear-gradient(135deg, #f59e0b, #ef4444); } /* 转发 */
.quick-card.q2 .quick-icon { background: linear-gradient(135deg, #06b6d4, #0ea5e9); } /* 超短 */
.quick-card.q3 .quick-icon { background: linear-gradient(135deg, #10b981, #34d399); } /* 通俗 */
.quick-card.q4 .quick-icon { background: linear-gradient(135deg, #2563eb, #6366f1); } /* 母本 */
.quick-card.q5 .quick-icon { background: linear-gradient(135deg, #7c3aed, #a855f7); } /* 技术 */
.quick-card.q6 .quick-icon { background: linear-gradient(135deg, #db2777, #f43f5e); } /* 导航 */
.quick-card.q7 .quick-icon { background: linear-gradient(135deg, #0d9488, #14b8a6); } /* 故事 */

/* 链接颜色：变量缺失时使用主题蓝 */
:root { --link: #1d4ed8; }
html[data-theme="dark"] :root, html[data-theme="black"] :root, html[data-theme="forest"] :root,
html[data-theme="slate"] :root, html[data-theme="purple"] :root { --link: #93c5fd; }
html[data-theme="sepia"] :root { --link: #b45309; }
