/* ============================================================
   JQ Cognition3 主题样式
   学术深邃风：午夜蓝 + 青瓷绿 + 暖琥珀
   ============================================================ */

:root {
  /* 配色 */
  --c-bg: #0B1E3F;            /* 主背景 午夜蓝 */
  --c-bg-deep: #081730;       /* 更深背景 */
  --c-surface: #0F2747;       /* 卡片表面 */
  --c-surface-2: #14315A;     /* 次级表面 */
  --c-border: #1E3A5F;        /* 边框 */
  --c-primary: #5BA89F;       /* 青瓷绿 主色 */
  --c-primary-soft: #3E7A73;  /* 主色暗调 */
  --c-accent: #E8A87C;        /* 暖琥珀 点缀 */
  --c-accent-soft: #C68A5E;
  --c-text: #F4F1EA;          /* 正文 米白 */
  --c-text-muted: #A8B4CC;    /* 次要文字 */
  --c-text-dim: #6B7A99;      /* 暗淡文字 */
  --c-danger: #E07A6E;        /* 警示红 */
  --c-success: #6FB89C;       /* 成功绿 */

  /* 字体 */
  --font-serif: "Playfair Display", Georgia, "Songti SC", "Noto Serif SC", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 圆角 / 阴影 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.28);
  --shadow-glow: 0 0 24px rgba(91, 168, 159, 0.25);

  /* 过渡 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* 背景纹理：微妙的径向渐变营造深邃学术氛围 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(91, 168, 159, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(232, 168, 124, 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg-deep); }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-primary-soft); }

/* 选区 */
::selection { background: rgba(91, 168, 159, 0.3); color: var(--c-text); }

/* 链接 */
a { color: var(--c-primary); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--c-accent); }

/* 表单元素重置（preflight:false 兜底：按钮/输入继承主题色与字体，不使用浏览器默认黑字系统字体） */
button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

/* 通用容器 */
.container-x { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 衬线标题渐变文字 */
.serif-gradient {
  background: linear-gradient(120deg, var(--c-text) 0%, var(--c-primary) 60%, var(--c-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 卡片 */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* 所有卡片：悬停仅微亮边框，不位移不发光 */
.card:hover {
  border-color: rgba(91, 168, 159, 0.35);
}
/* 可交互卡片（可点击的入口/历史卡）：悬停轻微上浮 + 柔光 */
.card-hover {
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card-hover:hover {
  transform: translateY(-3px);
  border-color: var(--c-primary-soft);
  box-shadow: var(--shadow-card), 0 0 20px rgba(91, 168, 159, 0.12);
}

/* ---------- 导航链接（替代内联 @mouseenter/@mouseleave） ---------- */
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--c-text-muted);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-link:hover { color: var(--c-text); background: rgba(91, 168, 159, 0.08); }
.nav-link.active { color: var(--c-primary); background: rgba(91, 168, 159, 0.12); }
.nav-link.active:hover { color: var(--c-primary); background: rgba(91, 168, 159, 0.16); }

/* ---------- 语言切换器 ---------- */
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--c-text-muted); border: 1px solid var(--c-border);
  background: transparent; cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.lang-btn:hover { color: var(--c-text); border-color: rgba(91, 168, 159, 0.4); background: rgba(91, 168, 159, 0.06); }

/* 语言下拉项：平滑背景过渡 */
.lang-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; text-align: left; font-size: 0.875rem;
  color: var(--c-text-muted); background: transparent;
  border: none; cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang-item:hover { color: var(--c-text); background: rgba(91, 168, 159, 0.1); }
.lang-item.active { color: var(--c-primary); background: rgba(91, 168, 159, 0.1); }
.lang-item.active:hover { background: rgba(91, 168, 159, 0.16); }

/* ---------- 选项按钮（测评选项 / Stroop 色键 / 注意力网格） ---------- */
.opt-btn {
  background: var(--c-bg-deep); border: 1px solid var(--c-border);
  color: var(--c-text-muted); cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.opt-btn:hover {
  border-color: rgba(91, 168, 159, 0.5);
  background: rgba(91, 168, 159, 0.08);
  color: var(--c-text);
}
.opt-btn.active {
  border-color: var(--c-primary);
  background: rgba(91, 168, 159, 0.12);
  color: var(--c-text);
}
.opt-btn:active { transform: scale(0.98); }

/* ---------- 快捷入口小卡（空状态链接 / 对话入口 / 情绪按钮） ---------- */
.quick-card {
  display: block; text-align: center;
  padding: 16px; border-radius: var(--radius-sm);
  background: var(--c-bg-deep); border: 1px solid var(--c-border);
  color: var(--c-text); cursor: pointer; text-decoration: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.2s var(--ease);
}
.quick-card:hover {
  border-color: rgba(91, 168, 159, 0.45);
  background: rgba(91, 168, 159, 0.06);
  transform: translateY(-2px);
}
.quick-card.active {
  border-color: var(--c-primary);
  background: rgba(91, 168, 159, 0.12);
  color: var(--c-primary);
}

/* ---------- 会话列表项（companion 侧栏） ---------- */
.session-item {
  padding: 12px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--c-bg-deep); border: 1px solid var(--c-border);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.session-item:hover { border-color: rgba(91, 168, 159, 0.45); }
.session-item.active { background: rgba(91, 168, 159, 0.12); border-color: rgba(91, 168, 159, 0.35); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-weight: 500; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.25s var(--ease);
}
.btn-primary { background: var(--c-primary); color: #081730; }
.btn-primary:hover { background: #6FBFB4; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(91, 168, 159, 0.35); }
.btn-ghost { background: transparent; color: var(--c-text); border-color: var(--c-border); }
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 输入 */
.input, .textarea {
  width: 100%; padding: 12px 16px;
  background: var(--c-bg-deep); color: var(--c-text);
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 15px;
  transition: border-color 0.2s var(--ease);
}
.input:focus, .textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(91, 168, 159, 0.15); }
.textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

/* 标签徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  background: rgba(91, 168, 159, 0.12); color: var(--c-primary);
  border: 1px solid rgba(91, 168, 159, 0.25);
}
.badge-accent { background: rgba(232, 168, 124, 0.12); color: var(--c-accent); border-color: rgba(232, 168, 124, 0.25); }

/* 动画关键帧 */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.animate-fade-up { animation: fadeUp 0.6s var(--ease) both; }
.animate-fade-in { animation: fadeIn 0.5s var(--ease) both; }

/* AI 思考加载点 */
.ai-dots { display: inline-flex; gap: 4px; }
.ai-dots span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--c-primary);
  animation: pulse 1.4s infinite ease-in-out both;
}
.ai-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-dots span:nth-child(3) { animation-delay: 0.4s; }

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, var(--c-surface) 25%, var(--c-surface-2) 50%, var(--c-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-sm);
}

/* 报告正文排版（AI 输出） */
/* 容器：防止长串/表格/代码块溢出卡片边缘 */
.prose-ai {
  line-height: 1.85;
  max-width: 100%;
  overflow-wrap: break-word;       /* 长单词/URL 自动换行 */
  word-break: break-word;
  overflow-x: auto;                /* 超宽内容横向滚动而非撑破卡片 */
  animation: aiFadeIn 0.5s var(--ease) both;
}
.prose-ai h1, .prose-ai h2, .prose-ai h3 { margin: 1.4em 0 0.6em; color: var(--c-text); }
.prose-ai h1 { font-size: 1.4rem; }
.prose-ai h2 { font-size: 1.2rem; padding-bottom: 0.3em; border-bottom: 1px solid var(--c-border); }
.prose-ai h3 { font-size: 1.05rem; }
.prose-ai p { margin: 0.8em 0; color: var(--c-text); }
.prose-ai ul, .prose-ai ol { margin: 0.8em 0; padding-left: 1.5em; }
.prose-ai li { margin: 0.4em 0; }
.prose-ai strong { color: var(--c-primary); font-weight: 600; }
.prose-ai em { color: var(--c-accent); font-style: italic; }
.prose-ai blockquote {
  margin: 1em 0; padding: 0.6em 1em; border-left: 3px solid var(--c-accent);
  background: rgba(232, 168, 124, 0.06); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--c-text-muted);
}
.prose-ai code {
  background: var(--c-bg-deep); padding: 2px 6px; border-radius: 4px;
  font-size: 0.9em; color: var(--c-accent); font-family: "JetBrains Mono", Consolas, monospace;
}
.prose-ai pre {
  background: var(--c-bg-deep); padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--c-border); overflow-x: auto; margin: 1em 0;
}
.prose-ai pre code { background: none; padding: 0; color: var(--c-text); }
.prose-ai table { border-collapse: collapse; width: 100%; margin: 1em 0; display: block; overflow-x: auto; }
.prose-ai th, .prose-ai td { border: 1px solid var(--c-border); padding: 8px 12px; text-align: left; }
.prose-ai th { background: var(--c-bg-deep); color: var(--c-text-muted); font-weight: 600; }
.prose-ai hr { border: none; border-top: 1px solid var(--c-border); margin: 1.5em 0; }
/* 流式输出时的光标尾迹 */
.prose-ai.is-streaming::after {
  content: "▋"; color: var(--c-primary); animation: pulse 1s infinite;
  margin-left: 2px; font-weight: 400;
}

/* AI 分析卡片：加载/就绪状态平滑过渡 */
.ai-result-card {
  position: relative;
  transition: background 0.5s var(--ease);
}
.ai-result-card.is-loading {
  background: linear-gradient(135deg, var(--c-surface) 0%, rgba(91,168,159,0.04) 50%, var(--c-surface) 100%);
}
.ai-result-card.is-loading::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(90deg, transparent, rgba(91,168,159,0.06), transparent);
  background-size: 200% 100%; animation: shimmer 2.5s infinite;
  pointer-events: none;
}

/* AI 思考提示条：替代孤立的三个点 */
.ai-thinking {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: var(--radius-sm);
  background: rgba(91, 168, 159, 0.06); border: 1px solid rgba(91, 168, 159, 0.18);
  color: var(--c-text-muted); font-size: 0.9rem;
  animation: aiFadeIn 0.4s var(--ease) both;
}
.ai-thinking .ai-dots { flex-shrink: 0; }

@keyframes aiFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 对话气泡（模块③ CBT 伴侣） ---------- */
/* 气泡行：控制左右对齐 */
.bubble-row {
  display: flex;
  width: 100%;
}
.bubble-row.is-user { justify-content: flex-end; }
.bubble-row.is-ai { justify-content: flex-start; }

/* 气泡本体 */
.bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.65;
  font-size: 0.93rem;
  word-break: break-word;
  overflow-wrap: break-word;
  animation: bubbleIn 0.3s var(--ease) both;
}
.bubble-user {
  background: var(--c-primary);
  color: #081730;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.bubble-ai {
  background: var(--c-surface-2);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-bottom-left-radius: 4px;
}
.bubble p { margin: 0.4em 0; }
.bubble p:first-child { margin-top: 0; }
.bubble p:last-child { margin-bottom: 0; }

/* 气泡底部元信息（时间/情绪标签） */
.bubble-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 0.72rem;
  color: var(--c-text-dim);
}
.bubble-row.is-user .bubble-meta { justify-content: flex-end; }

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 对话区布局（不依赖 Tailwind，确保滚动正确） ---------- */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 500px;
  max-height: 780px;
  overflow: hidden;
}
.chat-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 20px;
}
.chat-body > * + * { margin-top: 18px; }
.chat-input-bar {
  flex-shrink: 0;
  padding: 14px 16px;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
}

/* 欢迎屏（无消息时居中引导） */
.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 20px;
}
.chat-welcome-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(91, 168, 159, 0.12);
  border: 1px solid rgba(91, 168, 159, 0.25);
  margin-bottom: 16px;
}
.chat-welcome-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--c-text);
  margin-bottom: 8px;
}
.chat-welcome-desc {
  color: var(--c-text-muted);
  font-size: 0.9rem;
  max-width: 360px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.chat-welcome-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 420px;
}
@media (min-width: 640px) {
  .chat-welcome-cards { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 会话侧栏 ---------- */
.session-aside {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
  overflow: hidden;
}
.session-list {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.session-list > * + * { margin-top: 8px; }

/* ---------- 模块入口卡片网格（评估 / 认知实验室 / 历史） ----------
   不依赖 Tailwind 的 gap-/p-/w-/h-/mt- 类（多数未编译进 tailwind.css），
   用自定义类确保间距与尺寸稳定、呼吸感充足。
*/
.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .module-grid { grid-template-columns: repeat(3, 1fr); }
}
/* 两列变体（认知实验室 4 项，保持 2 列更舒展） */
.module-grid--2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .module-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

/* 单张入口卡片：充裕内边距 + 纵向弹性布局 */
.module-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  min-height: 230px;
}
.module-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.module-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.module-card-badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--c-bg-deep);
  color: var(--c-text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.module-card-title {
  font-size: 1.15rem;
  margin: 0 0 8px 0;
}
.module-card-desc {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  flex: 1;
}
.module-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  font-size: 0.78rem;
  color: var(--c-text-dim);
}
.module-card-footer .cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--c-primary);
}

/* 历史记录小卡（比入口卡更紧凑） */
.history-card { padding: 18px; }
.history-card .rec-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.history-card .rec-tags {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.history-card .rec-tag {
  font-size: 0.72rem; padding: 2px 8px; border-radius: 5px;
  background: var(--c-bg-deep);
}
.history-card .rec-date { font-size: 0.72rem; color: var(--c-text-dim); }

/* ============================================================
   Tailwind 兜底工具类
   tailwind.css (preflight:false) 缺失大量 spacing/sizing 类，
   此处补齐模板中实际使用的类，确保全站卡片间距正常。
   ============================================================ */

/* padding */
.p-0 { padding: 0; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-7 { padding: 28px; }
.p-8 { padding: 32px; }
.p-9 { padding: 36px; }
.p-10 { padding: 40px; }
@media (min-width: 1024px) {
  .lg\:p-7 { padding: 28px; }
  .lg\:p-8 { padding: 32px; }
  .lg\:p-9 { padding: 36px; }
  .lg\:p-10 { padding: 40px; }
}

/* gap */
.gap-3 { gap: 12px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* margin */
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-12 { margin-top: 48px; }
.mb-2 { margin-bottom: 8px; }
.mb-8 { margin-bottom: 32px; }
.mb-1\.5 { margin-bottom: 6px; }
.ml-auto { margin-left: auto; }
@media (min-width: 1024px) {
  .lg\:mb-0 { margin-bottom: 0; }
}

/* padding-top */
.pt-4 { padding-top: 16px; }

/* width / height */
.w-11 { width: 44px; }
.h-11 { height: 44px; }

/* max-width */
.max-w-sm { max-width: 24rem; }
.max-w-lg { max-width: 32rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-md { max-width: 28rem; }

/* align-items / justify-content */
.items-start { align-items: flex-start; }
.justify-end { justify-content: flex-end; }

/* font-weight */
.font-semibold { font-weight: 600; }

/* text-transform / letter-spacing */
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }

/* width/height 小尺寸 */
.w-5 { width: 20px; }
.h-5 { height: 20px; }

/* padding x */
.px-4 { padding-left: 16px; padding-right: 16px; }

/* aspect-ratio */
.aspect-square { aspect-ratio: 1 / 1; }

/* grid-cols（实验/结果网格） */
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* space-y（纵向间距：父子选择器） */
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* transition */
.transition-all { transition: all 0.25s var(--ease); }

/* 工具类 */
.text-muted { color: var(--c-text-muted); }
.text-dim { color: var(--c-text-dim); }
.text-primary { color: var(--c-primary); }
.text-accent { color: var(--c-accent); }
.bg-surface { background: var(--c-surface); }
.bg-surface-2 { background: var(--c-surface-2); }
.bg-deep { background: var(--c-bg-deep); }
.border-soft { border-color: var(--c-border) !important; }

/* 页面切换过渡容器 */
#page-view { position: relative; z-index: 1; }

/* 响应式 */
@media (max-width: 768px) {
  .container-x { padding: 0 16px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
}
