
/* ==========================================================================
   ZanCMS UI v1.0.0  |  轻量、零依赖的 CMS 前端框架
   Copyright (c) 2026 ZanCMS UI · MIT License
   https://ui.zancms.cn
   --------------------------------------------------------------------------
   01 · 设计令牌（Design Tokens）
   所有视觉决策集中在此，组件只引用语义变量，方便整体换肤与暗色模式。
   ========================================================================== */

:root {
  /* ---- 品牌色（赞蓝） ---------------------------------------------------- */
  --zan-brand-50:  #f2f2ff;
  --zan-brand-100: #e6e6fe;
  --zan-brand-200: #d0d0fd;
  --zan-brand-300: #b0b0fb;
  --zan-brand-400: #8b8bf9;
  --zan-brand-500: #5b5bf7;
  --zan-brand-600: #4949e8;
  --zan-brand-700: #3939c9;
  --zan-brand-800: #2d2da2;
  --zan-brand-900: #26267d;

  /* ---- 中性色 ------------------------------------------------------------ */
  --zan-gray-0:   #ffffff;
  --zan-gray-50:  #f7f8fb;
  --zan-gray-100: #f0f2f7;
  --zan-gray-200: #e4e8f0;
  --zan-gray-300: #d3d9e5;
  --zan-gray-400: #a7b0c0;
  --zan-gray-500: #788396;
  --zan-gray-600: #576172;
  --zan-gray-700: #3b4557;
  --zan-gray-800: #262f41;
  --zan-gray-900: #171e2b;
  --zan-gray-950: #0d121d;

  /* ---- 语义色 ------------------------------------------------------------ */
  --zan-success-50:  #e9f9f1;
  --zan-success-100: #cdf2e1;
  --zan-success-500: #12b76a;
  --zan-success-600: #0e9457;
  --zan-warning-50:  #fff8e6;
  --zan-warning-100: #ffedc2;
  --zan-warning-500: #f5a524;
  --zan-warning-600: #d98613;
  --zan-danger-50:   #fff0f0;
  --zan-danger-100:  #ffdadb;
  --zan-danger-500:  #e5484d;
  --zan-danger-600:  #c93338;
  --zan-info-50:     #eaf7fe;
  --zan-info-100:    #cdeefd;
  --zan-info-500:    #0ea5e9;
  --zan-info-600:    #0b84ba;

  /* ---- 语义化角色 -------------------------------------------------------- */
  --zan-primary:       var(--zan-brand-500);
  --zan-primary-hover: var(--zan-brand-600);
  --zan-primary-active:var(--zan-brand-700);
  --zan-primary-soft:  var(--zan-brand-50);
  --zan-primary-line:  var(--zan-brand-200);
  --zan-on-primary:    #ffffff;

  --zan-success: var(--zan-success-500);
  --zan-success-soft: var(--zan-success-50);
  --zan-success-line: var(--zan-success-100);
  --zan-warning: var(--zan-warning-500);
  --zan-warning-soft: var(--zan-warning-50);
  --zan-warning-line: var(--zan-warning-100);
  --zan-danger: var(--zan-danger-500);
  --zan-danger-soft: var(--zan-danger-50);
  --zan-danger-line: var(--zan-danger-100);
  --zan-info: var(--zan-info-500);
  --zan-info-soft: var(--zan-info-50);
  --zan-info-line: var(--zan-info-100);

  --zan-bg:             #f5f7fb;
  --zan-bg-body:        #f5f7fb;
  --zan-surface:        #ffffff;
  --zan-surface-2:      #f9fafd;
  --zan-surface-3:      #f1f4f9;
  --zan-border:         #e4e8f0;
  --zan-border-strong:  #d3d9e5;
  --zan-border-soft:    #edf0f6;
  --zan-text:           #1b2333;
  --zan-text-secondary: #4c5669;
  --zan-text-muted:     #788396;
  --zan-text-faint:     #a7b0c0;
  --zan-text-inverse:   #ffffff;
  --zan-overlay:        rgba(10, 16, 28, 0.55);
  --zan-mask-soft:      rgba(10, 16, 28, 0.32);

  /* ---- 字体 -------------------------------------------------------------- */
  --zan-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --zan-font-mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Consolas,
    "Liberation Mono", Menlo, monospace;
  --zan-font-size: 14px;
  --zan-line-height: 1.65;
  --zan-line-height-tight: 1.28;

  /* ---- 间距（4px 基准） -------------------------------------------------- */
  --zan-space-1: 4px;
  --zan-space-2: 8px;
  --zan-space-3: 12px;
  --zan-space-4: 16px;
  --zan-space-5: 20px;
  --zan-space-6: 24px;
  --zan-space-7: 32px;
  --zan-space-8: 40px;
  --zan-space-9: 48px;
  --zan-space-10: 64px;
  --zan-space-11: 80px;
  --zan-space-12: 96px;

  /* ---- 圆角 -------------------------------------------------------------- */
  --zan-radius-xs: 4px;
  --zan-radius-sm: 6px;
  --zan-radius-md: 8px;
  --zan-radius-lg: 12px;
  --zan-radius-xl: 16px;
  --zan-radius-2xl: 24px;
  --zan-radius-pill: 999px;
  --zan-radius-circle: 50%;

  /* ---- 阴影 -------------------------------------------------------------- */
  --zan-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --zan-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 6px rgba(16, 24, 40, 0.05);
  --zan-shadow-md: 0 2px 4px rgba(16, 24, 40, 0.04), 0 8px 20px rgba(16, 24, 40, 0.08);
  --zan-shadow-lg: 0 8px 16px rgba(16, 24, 40, 0.06), 0 22px 48px rgba(16, 24, 40, 0.12);
  --zan-shadow-xl: 0 24px 64px rgba(16, 24, 40, 0.18);
  --zan-focus-ring: 0 0 0 3px rgba(91, 91, 247, 0.22);

  /* ---- 动效 -------------------------------------------------------------- */
  --zan-ease: cubic-bezier(0.22, 0.78, 0.22, 1);
  --zan-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --zan-duration-fast: 120ms;
  --zan-duration: 200ms;
  --zan-duration-slow: 320ms;

  /* ---- 层级 -------------------------------------------------------------- */
  --zan-z-dropdown: 1000;
  --zan-z-sticky: 1020;
  --zan-z-drawer: 1040;
  --zan-z-modal: 1050;
  --zan-z-toast: 1080;
  --zan-z-lightbox: 1100;
  --zan-z-tooltip: 1120;

  /* ---- 组件尺寸 ---------------------------------------------------------- */
  --zan-control-height-sm: 30px;
  --zan-control-height: 36px;
  --zan-control-height-lg: 44px;
  --zan-control-radius: var(--zan-radius-md);
  --zan-sider-width: 232px;
  --zan-header-height: 60px;
  --zan-container: 1200px;
  --zan-gutter: 24px;
}

/* ---- 暗色主题 ------------------------------------------------------------ */
[data-theme="dark"] {
  --zan-brand-50:  #23234a;
  --zan-brand-100: #2c2c63;
  --zan-brand-200: #3a3a86;
  --zan-brand-300: #5555c9;
  --zan-brand-400: #7777ec;
  --zan-brand-500: #8a8aff;
  --zan-brand-600: #a0a0ff;
  --zan-brand-700: #b8b8ff;
  --zan-brand-800: #d2d2ff;
  --zan-brand-900: #ededff;

  --zan-primary:       var(--zan-brand-500);
  --zan-primary-hover: var(--zan-brand-600);
  --zan-primary-active:var(--zan-brand-400);
  --zan-primary-soft:  rgba(138, 138, 255, 0.12);
  --zan-primary-line:  rgba(138, 138, 255, 0.28);
  --zan-on-primary:    #101326;

  --zan-success: #3dd68c;
  --zan-success-soft: rgba(61, 214, 140, 0.12);
  --zan-success-line: rgba(61, 214, 140, 0.26);
  --zan-warning: #ffbf47;
  --zan-warning-soft: rgba(255, 191, 71, 0.12);
  --zan-warning-line: rgba(255, 191, 71, 0.26);
  --zan-danger: #ff6b70;
  --zan-danger-soft: rgba(255, 107, 112, 0.12);
  --zan-danger-line: rgba(255, 107, 112, 0.26);
  --zan-info: #45c2f5;
  --zan-info-soft: rgba(69, 194, 245, 0.12);
  --zan-info-line: rgba(69, 194, 245, 0.26);

  --zan-bg:             #0c1120;
  --zan-bg-body:        #0c1120;
  --zan-surface:        #131a2b;
  --zan-surface-2:      #172034;
  --zan-surface-3:      #1d2840;
  --zan-border:         #26314a;
  --zan-border-strong:  #33405e;
  --zan-border-soft:    #1e2840;
  --zan-text:           #e9edf7;
  --zan-text-secondary: #b3bdd2;
  --zan-text-muted:     #8b96ad;
  --zan-text-faint:     #626d84;
  --zan-text-inverse:   #0c1120;
  --zan-overlay:        rgba(3, 6, 14, 0.72);
  --zan-mask-soft:      rgba(3, 6, 14, 0.5);

  --zan-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --zan-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.24);
  --zan-shadow-md: 0 2px 6px rgba(0, 0, 0, 0.32), 0 10px 24px rgba(0, 0, 0, 0.34);
  --zan-shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.4), 0 28px 60px rgba(0, 0, 0, 0.45);
  --zan-shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.6);
  --zan-focus-ring: 0 0 0 3px rgba(138, 138, 255, 0.3);
}

/* 跟随系统：当根节点标记为 auto 时生效 */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --zan-brand-50:  #23234a;
    --zan-brand-100: #2c2c63;
    --zan-brand-200: #3a3a86;
    --zan-brand-300: #5555c9;
    --zan-brand-400: #7777ec;
    --zan-brand-500: #8a8aff;
    --zan-brand-600: #a0a0ff;
    --zan-brand-700: #b8b8ff;
    --zan-brand-800: #d2d2ff;
    --zan-brand-900: #ededff;
    --zan-primary: var(--zan-brand-500);
    --zan-primary-hover: var(--zan-brand-600);
    --zan-primary-active: var(--zan-brand-400);
    --zan-primary-soft: rgba(138, 138, 255, 0.12);
    --zan-primary-line: rgba(138, 138, 255, 0.28);
    --zan-on-primary: #101326;
    --zan-success: #3dd68c;
    --zan-success-soft: rgba(61, 214, 140, 0.12);
    --zan-success-line: rgba(61, 214, 140, 0.26);
    --zan-warning: #ffbf47;
    --zan-warning-soft: rgba(255, 191, 71, 0.12);
    --zan-warning-line: rgba(255, 191, 71, 0.26);
    --zan-danger: #ff6b70;
    --zan-danger-soft: rgba(255, 107, 112, 0.12);
    --zan-danger-line: rgba(255, 107, 112, 0.26);
    --zan-info: #45c2f5;
    --zan-info-soft: rgba(69, 194, 245, 0.12);
    --zan-info-line: rgba(69, 194, 245, 0.26);
    --zan-bg: #0c1120;
    --zan-bg-body: #0c1120;
    --zan-surface: #131a2b;
    --zan-surface-2: #172034;
    --zan-surface-3: #1d2840;
    --zan-border: #26314a;
    --zan-border-strong: #33405e;
    --zan-border-soft: #1e2840;
    --zan-text: #e9edf7;
    --zan-text-secondary: #b3bdd2;
    --zan-text-muted: #8b96ad;
    --zan-text-faint: #626d84;
    --zan-text-inverse: #0c1120;
    --zan-overlay: rgba(3, 6, 14, 0.72);
    --zan-mask-soft: rgba(3, 6, 14, 0.5);
    --zan-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --zan-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.24);
    --zan-shadow-md: 0 2px 6px rgba(0, 0, 0, 0.32), 0 10px 24px rgba(0, 0, 0, 0.34);
    --zan-shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.4), 0 28px 60px rgba(0, 0, 0, 0.45);
    --zan-shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.6);
    --zan-focus-ring: 0 0 0 3px rgba(138, 138, 255, 0.3);
  }
}

/* ==========================================================================
   02 · 基础重置与排版（Base & Typography）
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--zan-font-sans);
  font-size: var(--zan-font-size);
  line-height: var(--zan-line-height);
  color: var(--zan-text);
  background-color: var(--zan-bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: var(--zan-line-height-tight);
  color: var(--zan-text);
}

p {
  margin: 0;
}

a {
  color: var(--zan-primary);
  text-decoration: none;
  transition: color var(--zan-duration-fast) var(--zan-ease);
}

a:hover {
  color: var(--zan-primary-hover);
}

img,
svg {
  max-width: 100%;
}

img {
  display: block;
  border-style: none;
}

figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
}

button,
input,
select,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button {
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--zan-text-faint);
  opacity: 1;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

hr {
  height: 0;
  margin: 0;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* 主题切换按钮：浅色显示月亮（切到暗色），暗色显示太阳（切到浅色） */
.zan-icon.zan-theme-sun { display: none; }
html[data-theme="dark"] .zan-theme-sun { display: inline-flex; }
html[data-theme="dark"] .zan-theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .zan-theme-sun { display: inline-flex; }
  html[data-theme="auto"] .zan-theme-moon { display: none; }
}

/* 尊重系统“减少动态效果”设置 */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

code,
kbd,
samp,
pre {
  font-family: var(--zan-font-mono);
}

code {
  padding: 2px 6px;
  font-size: 0.875em;
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
  border-radius: var(--zan-radius-xs);
}

kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  font-size: 0.75em;
  line-height: 1.6;
  text-align: center;
  color: var(--zan-text-secondary);
  background: var(--zan-surface-2);
  border: 1px solid var(--zan-border);
  border-bottom-width: 2px;
  border-radius: var(--zan-radius-xs);
}

pre {
  margin: 0;
  overflow: auto;
}

::selection {
  color: var(--zan-on-primary);
  background: var(--zan-primary);
}

:focus-visible {
  outline: 2px solid var(--zan-primary);
  outline-offset: 2px;
}

/* 细腻滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--zan-border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: var(--zan-border-strong);
  border: 2px solid transparent;
  border-radius: var(--zan-radius-pill);
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--zan-text-faint);
  background-clip: content-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* ---- 排版工具 ------------------------------------------------------------ */
.zan-h1 { font-size: 2rem; }
.zan-h2 { font-size: 1.625rem; }
.zan-h3 { font-size: 1.375rem; }
.zan-h4 { font-size: 1.125rem; }
.zan-h5 { font-size: 1rem; }
.zan-h6 { font-size: 0.875rem; }

.zan-lead {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--zan-text-secondary);
}

.zan-text {
  font-size: var(--zan-font-size);
  color: var(--zan-text-secondary);
}

.zan-text-sm { font-size: 0.8125rem; }
.zan-text-xs { font-size: 0.75rem; }
.zan-text-lg { font-size: 1.0625rem; }
.zan-text-xl { font-size: 1.25rem; }

.zan-text-primary { color: var(--zan-primary); }
.zan-text-success { color: var(--zan-success); }
.zan-text-warning { color: var(--zan-warning); }
.zan-text-danger { color: var(--zan-danger); }
.zan-text-info { color: var(--zan-info); }
.zan-text-main { color: var(--zan-text); }
.zan-text-secondary { color: var(--zan-text-secondary); }
.zan-text-muted { color: var(--zan-text-muted); }
.zan-text-faint { color: var(--zan-text-faint); }
.zan-text-inverse { color: var(--zan-text-inverse); }

.zan-font-medium { font-weight: 500; }
.zan-font-semibold { font-weight: 600; }
.zan-font-bold { font-weight: 700; }

.zan-text-left { text-align: left; }
.zan-text-center { text-align: center; }
.zan-text-right { text-align: right; }
.zan-text-justify { text-align: justify; }

.zan-underline { text-decoration: underline; text-underline-offset: 3px; }
.zan-no-underline { text-decoration: none; }

.zan-nowrap { white-space: nowrap; }
.zan-pre-wrap { white-space: pre-wrap; }
.zan-break-all { word-break: break-all; }

/* 单行 / 多行省略 */
.zan-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zan-clamp-2,
.zan-clamp-3,
.zan-clamp-4 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.zan-clamp-2 { -webkit-line-clamp: 2; }
.zan-clamp-3 { -webkit-line-clamp: 3; }
.zan-clamp-4 { -webkit-line-clamp: 4; }

/* 富文本内容恢复默认排版（框架做了轻量重置，文章正文可用此类还原） */
.zan-prose {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--zan-text-secondary);
}

.zan-prose p {
  margin: 0 0 1em;
}

.zan-prose h2,
.zan-prose h3,
.zan-prose h4 {
  margin: 1.6em 0 0.6em;
  color: var(--zan-text);
}

.zan-prose ul,
.zan-prose ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.zan-prose ul { list-style: disc; }
.zan-prose ol { list-style: decimal; }
.zan-prose li + li { margin-top: 0.25em; }

.zan-prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.zan-prose img {
  margin: 1em 0;
  border-radius: var(--zan-radius-md);
}

.zan-prose blockquote {
  margin: 1em 0;
  padding: 0.75em 1em;
  color: var(--zan-text-secondary);
  background: var(--zan-surface-2);
  border-left: 3px solid var(--zan-primary-line);
  border-radius: 0 var(--zan-radius-sm) var(--zan-radius-sm) 0;
}

.zan-prose code {
  font-size: 0.875em;
}

.zan-prose table {
  width: 100%;
  margin: 1em 0;
}

/* ---- 无障碍与打印 -------------------------------------------------------- */
.zan-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[aria-busy="true"] {
  cursor: progress;
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .zan-no-print,
  .zan-sider,
  .zan-header {
    display: none !important;
  }
  a {
    color: #000 !important;
    text-decoration: underline;
  }
  .zan-card,
  .zan-modal-dialog {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* ==========================================================================
   03 · 布局系统（Layout & Grid）
   ========================================================================== */

/* ---- 容器 ---------------------------------------------------------------- */
.zan-container {
  width: 100%;
  max-width: var(--zan-container);
  padding-right: var(--zan-space-6);
  padding-left: var(--zan-space-6);
  margin-right: auto;
  margin-left: auto;
}

.zan-container-sm { max-width: 720px; }
.zan-container-md { max-width: 960px; }
.zan-container-lg { max-width: 1200px; }
.zan-container-xl { max-width: 1440px; }
.zan-container-fluid { max-width: none; }

@media (max-width: 640px) {
  .zan-container {
    padding-right: var(--zan-space-4);
    padding-left: var(--zan-space-4);
  }
}

/* ---- 12 栅格 ------------------------------------------------------------- */
.zan-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--zan-gutter) / -2);
  margin-left: calc(var(--zan-gutter) / -2);
}

.zan-row-tight { --zan-gutter: 12px; }
.zan-row-loose { --zan-gutter: 32px; }
.zan-row-no-gutter { --zan-gutter: 0px; }

.zan-col,
.zan-col-1, .zan-col-2, .zan-col-3, .zan-col-4, .zan-col-5, .zan-col-6,
.zan-col-7, .zan-col-8, .zan-col-9, .zan-col-10, .zan-col-11, .zan-col-12,
.zan-col-sm-1, .zan-col-sm-2, .zan-col-sm-3, .zan-col-sm-4, .zan-col-sm-5,
.zan-col-sm-6, .zan-col-sm-7, .zan-col-sm-8, .zan-col-sm-9, .zan-col-sm-10,
.zan-col-sm-11, .zan-col-sm-12,
.zan-col-md-1, .zan-col-md-2, .zan-col-md-3, .zan-col-md-4, .zan-col-md-5,
.zan-col-md-6, .zan-col-md-7, .zan-col-md-8, .zan-col-md-9, .zan-col-md-10,
.zan-col-md-11, .zan-col-md-12,
.zan-col-lg-1, .zan-col-lg-2, .zan-col-lg-3, .zan-col-lg-4, .zan-col-lg-5,
.zan-col-lg-6, .zan-col-lg-7, .zan-col-lg-8, .zan-col-lg-9, .zan-col-lg-10,
.zan-col-lg-11, .zan-col-lg-12 {
  position: relative;
  width: 100%;
  padding-right: calc(var(--zan-gutter) / 2);
  padding-left: calc(var(--zan-gutter) / 2);
}

.zan-col { flex: 1 1 0%; max-width: 100%; }
.zan-col-auto { flex: 0 0 auto; width: auto; max-width: none; }

/* ---- CSS Grid 快捷布局 --------------------------------------------------- */
.zan-grid {
  display: grid;
  grid-template-columns: repeat(var(--zan-cols, 12), minmax(0, 1fr));
  gap: var(--zan-gap, var(--zan-space-4));
}

.zan-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--zan-col-min, 240px), 1fr));
  gap: var(--zan-gap, var(--zan-space-4));
}

.zan-grid-fill {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--zan-col-min, 240px), 1fr));
  gap: var(--zan-gap, var(--zan-space-4));
}

/* ---- 纵向节奏 ------------------------------------------------------------ */
.zan-stack { display: flex; flex-direction: column; }
.zan-stack > * + * { margin-top: var(--zan-stack-gap, var(--zan-space-4)); }
.zan-stack-2 { --zan-stack-gap: var(--zan-space-2); }
.zan-stack-3 { --zan-stack-gap: var(--zan-space-3); }
.zan-stack-6 { --zan-stack-gap: var(--zan-space-6); }

.zan-section {
  padding-top: var(--zan-space-10);
  padding-bottom: var(--zan-space-10);
}

.zan-section-sm {
  padding-top: var(--zan-space-8);
  padding-bottom: var(--zan-space-8);
}

.zan-section-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zan-space-3);
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--zan-space-6);
}

.zan-section-head .zan-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.zan-section-head .zan-section-desc {
  margin-top: var(--zan-space-2);
  color: var(--zan-text-muted);
}

/* ---- 后台主框架 ---------------------------------------------------------- */
.zan-shell {
  display: flex;
  min-height: 100vh;
  background: var(--zan-bg);
}

.zan-sider {
  position: sticky;
  top: 0;
  z-index: var(--zan-z-sticky);
  display: flex;
  flex-direction: column;
  flex: 0 0 var(--zan-sider-width);
  width: var(--zan-sider-width);
  height: 100vh;
  overflow: hidden;
  background: var(--zan-surface);
  border-right: 1px solid var(--zan-border);
  transition: width var(--zan-duration) var(--zan-ease),
    flex-basis var(--zan-duration) var(--zan-ease);
}

.zan-sider.is-collapsed {
  flex-basis: 68px;
  width: 68px;
}

.zan-sider-brand {
  display: flex;
  gap: var(--zan-space-3);
  align-items: center;
  height: var(--zan-header-height);
  padding: 0 var(--zan-space-5);
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--zan-border-soft);
}

.zan-sider-brand img,
.zan-sider-brand svg {
  width: 28px;
  height: 28px;
  flex: none;
}

.zan-sider-brand-text {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.zan-sider-brand-text span {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--zan-text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zan-sider-body {
  flex: 1;
  padding: var(--zan-space-3);
  overflow-x: hidden;
  overflow-y: auto;
}

.zan-sider-foot {
  padding: var(--zan-space-3);
  border-top: 1px solid var(--zan-border-soft);
}

.zan-shell-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.zan-header {
  position: sticky;
  top: 0;
  z-index: var(--zan-z-sticky);
  display: flex;
  gap: var(--zan-space-4);
  align-items: center;
  height: var(--zan-header-height);
  padding: 0 var(--zan-space-6);
  background: var(--zan-surface);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--zan-border);
}

.zan-header-start,
.zan-header-end {
  display: flex;
  gap: var(--zan-space-3);
  align-items: center;
}

.zan-header-title {
  font-size: 1rem;
  font-weight: 600;
}

.zan-header-end { margin-left: auto; }

.zan-page {
  flex: 1;
  padding: var(--zan-space-6);
}

@media (max-width: 860px) {
  .zan-page { padding: var(--zan-space-4); }
  .zan-header { padding: 0 var(--zan-space-4); }
  .zan-shell { display: block; }
  .zan-sider {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--zan-sider-width);
    height: 100vh;
    transform: translateX(-100%);
    transition: transform var(--zan-duration) var(--zan-ease);
    box-shadow: var(--zan-shadow-lg);
    z-index: var(--zan-z-drawer);
  }
  .zan-sider.is-mobile-open { transform: translateX(0); }
  .zan-shell-main { width: 100%; min-width: 0; }
}

.zan-page-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zan-space-4);
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--zan-space-5);
}

.zan-page-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.zan-page-desc {
  margin-top: var(--zan-space-1);
  font-size: 0.8125rem;
  color: var(--zan-text-muted);
}

.zan-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zan-space-2);
  align-items: center;
}

.zan-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zan-space-3);
  align-items: center;
  padding: var(--zan-space-3) var(--zan-space-4);
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-lg);
  box-shadow: var(--zan-shadow-xs);
}

.zan-toolbar + .zan-card { margin-top: var(--zan-space-4); }

.zan-toolbar-title {
  display: flex;
  align-items: center;
  gap: var(--zan-space-2);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--zan-text);
}

.zan-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--zan-space-2);
  margin-left: auto;
}

/* ---- 通用留白与分割 ------------------------------------------------------ */
.zan-gap-2 { gap: var(--zan-space-2); }
.zan-gap-3 { gap: var(--zan-space-3); }
.zan-gap-4 { gap: var(--zan-space-4); }
.zan-gap-5 { gap: var(--zan-space-5); }
.zan-gap-6 { gap: var(--zan-space-6); }

.zan-p-0 { padding: 0 !important; }
.zan-p-3 { padding: var(--zan-space-3) !important; }
.zan-p-4 { padding: var(--zan-space-4) !important; }
.zan-p-5 { padding: var(--zan-space-5) !important; }
.zan-p-6 { padding: var(--zan-space-6) !important; }
.zan-p-8 { padding: var(--zan-space-8) !important; }

.zan-mt-0 { margin-top: 0 !important; }
.zan-mt-1 { margin-top: var(--zan-space-1) !important; }
.zan-mt-2 { margin-top: var(--zan-space-2) !important; }
.zan-mt-3 { margin-top: var(--zan-space-3) !important; }
.zan-mt-4 { margin-top: var(--zan-space-4) !important; }
.zan-mt-6 { margin-top: var(--zan-space-6) !important; }
.zan-mt-8 { margin-top: var(--zan-space-8) !important; }
.zan-mb-0 { margin-bottom: 0 !important; }
.zan-mb-2 { margin-bottom: var(--zan-space-2) !important; }
.zan-mb-3 { margin-bottom: var(--zan-space-3) !important; }
.zan-mb-4 { margin-bottom: var(--zan-space-4) !important; }
.zan-mb-6 { margin-bottom: var(--zan-space-6) !important; }
.zan-mb-8 { margin-bottom: var(--zan-space-8) !important; }
.zan-ml-2 { margin-left: var(--zan-space-2) !important; }
.zan-ml-3 { margin-left: var(--zan-space-3) !important; }
.zan-ml-4 { margin-left: var(--zan-space-4) !important; }
.zan-mr-2 { margin-right: var(--zan-space-2) !important; }
.zan-mr-3 { margin-right: var(--zan-space-3) !important; }
.zan-mr-4 { margin-right: var(--zan-space-4) !important; }

/* ---- 栅格列宽（由脚本生成的固定比例） ---------------------------------- */
.zan-col-1 { flex: 0 0 auto; width: 8.333333%; }
.zan-col-2 { flex: 0 0 auto; width: 16.666667%; }
.zan-col-3 { flex: 0 0 auto; width: 25%; }
.zan-col-4 { flex: 0 0 auto; width: 33.333333%; }
.zan-col-5 { flex: 0 0 auto; width: 41.666667%; }
.zan-col-6 { flex: 0 0 auto; width: 50%; }
.zan-col-7 { flex: 0 0 auto; width: 58.333333%; }
.zan-col-8 { flex: 0 0 auto; width: 66.666667%; }
.zan-col-9 { flex: 0 0 auto; width: 75%; }
.zan-col-10 { flex: 0 0 auto; width: 83.333333%; }
.zan-col-11 { flex: 0 0 auto; width: 91.666667%; }
.zan-col-12 { flex: 0 0 auto; width: 100%; }

.zan-col-xl-1, .zan-col-xl-2, .zan-col-xl-3, .zan-col-xl-4, .zan-col-xl-5, .zan-col-xl-6, .zan-col-xl-7, .zan-col-xl-8, .zan-col-xl-9, .zan-col-xl-10, .zan-col-xl-11, .zan-col-xl-12 { position: relative; width: 100%; padding-right: calc(var(--zan-gutter) / 2); padding-left: calc(var(--zan-gutter) / 2); }

@media (min-width: 576px) {
  .zan-col-sm-1 { flex: 0 0 auto; width: 8.333333%; }
  .zan-col-sm-2 { flex: 0 0 auto; width: 16.666667%; }
  .zan-col-sm-3 { flex: 0 0 auto; width: 25%; }
  .zan-col-sm-4 { flex: 0 0 auto; width: 33.333333%; }
  .zan-col-sm-5 { flex: 0 0 auto; width: 41.666667%; }
  .zan-col-sm-6 { flex: 0 0 auto; width: 50%; }
  .zan-col-sm-7 { flex: 0 0 auto; width: 58.333333%; }
  .zan-col-sm-8 { flex: 0 0 auto; width: 66.666667%; }
  .zan-col-sm-9 { flex: 0 0 auto; width: 75%; }
  .zan-col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
  .zan-col-sm-11 { flex: 0 0 auto; width: 91.666667%; }
  .zan-col-sm-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 768px) {
  .zan-col-md-1 { flex: 0 0 auto; width: 8.333333%; }
  .zan-col-md-2 { flex: 0 0 auto; width: 16.666667%; }
  .zan-col-md-3 { flex: 0 0 auto; width: 25%; }
  .zan-col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .zan-col-md-5 { flex: 0 0 auto; width: 41.666667%; }
  .zan-col-md-6 { flex: 0 0 auto; width: 50%; }
  .zan-col-md-7 { flex: 0 0 auto; width: 58.333333%; }
  .zan-col-md-8 { flex: 0 0 auto; width: 66.666667%; }
  .zan-col-md-9 { flex: 0 0 auto; width: 75%; }
  .zan-col-md-10 { flex: 0 0 auto; width: 83.333333%; }
  .zan-col-md-11 { flex: 0 0 auto; width: 91.666667%; }
  .zan-col-md-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 992px) {
  .zan-col-lg-1 { flex: 0 0 auto; width: 8.333333%; }
  .zan-col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
  .zan-col-lg-3 { flex: 0 0 auto; width: 25%; }
  .zan-col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  .zan-col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .zan-col-lg-6 { flex: 0 0 auto; width: 50%; }
  .zan-col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .zan-col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
  .zan-col-lg-9 { flex: 0 0 auto; width: 75%; }
  .zan-col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
  .zan-col-lg-11 { flex: 0 0 auto; width: 91.666667%; }
  .zan-col-lg-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 1200px) {
  .zan-col-xl-1 { flex: 0 0 auto; width: 8.333333%; }
  .zan-col-xl-2 { flex: 0 0 auto; width: 16.666667%; }
  .zan-col-xl-3 { flex: 0 0 auto; width: 25%; }
  .zan-col-xl-4 { flex: 0 0 auto; width: 33.333333%; }
  .zan-col-xl-5 { flex: 0 0 auto; width: 41.666667%; }
  .zan-col-xl-6 { flex: 0 0 auto; width: 50%; }
  .zan-col-xl-7 { flex: 0 0 auto; width: 58.333333%; }
  .zan-col-xl-8 { flex: 0 0 auto; width: 66.666667%; }
  .zan-col-xl-9 { flex: 0 0 auto; width: 75%; }
  .zan-col-xl-10 { flex: 0 0 auto; width: 83.333333%; }
  .zan-col-xl-11 { flex: 0 0 auto; width: 91.666667%; }
  .zan-col-xl-12 { flex: 0 0 auto; width: 100%; }
}

@media (max-width: 575.98px) { .zan-hide-sm { display: none !important; } }
@media (min-width: 576px) and (max-width: 767.98px) { .zan-hide-md { display: none !important; } }
@media (min-width: 768px) and (max-width: 991.98px) { .zan-hide-lg { display: none !important; } }
@media (min-width: 992px) { .zan-hide-xl { display: none !important; } }

/* ==========================================================================
   04 · 按钮（Button）
   ========================================================================== */

.zan-btn {
  position: relative;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  height: var(--zan-control-height);
  padding: 0 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  color: var(--zan-text);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-control-radius);
  box-shadow: var(--zan-shadow-xs);
  transition: color var(--zan-duration-fast) var(--zan-ease),
    background-color var(--zan-duration-fast) var(--zan-ease),
    border-color var(--zan-duration-fast) var(--zan-ease),
    box-shadow var(--zan-duration-fast) var(--zan-ease),
    transform var(--zan-duration-fast) var(--zan-ease);
}

.zan-btn:hover {
  color: var(--zan-text);
  background: var(--zan-surface-2);
  border-color: var(--zan-border-strong);
}

.zan-btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.zan-btn:focus-visible {
  outline: none;
  box-shadow: var(--zan-focus-ring);
}

.zan-btn .zan-icon {
  font-size: 1rem;
}
.zan-btn .zan-icon:only-child { font-size: 1.0625rem; }

/* ---- 主色按钮 ------------------------------------------------------------ */
.zan-btn-primary {
  color: var(--zan-on-primary);
  background: var(--zan-primary);
  border-color: var(--zan-primary);
  box-shadow: 0 1px 2px rgba(59, 59, 200, 0.24);
}

.zan-btn-primary:hover {
  color: var(--zan-on-primary);
  background: var(--zan-primary-hover);
  border-color: var(--zan-primary-hover);
}

.zan-btn-primary:active {
  background: var(--zan-primary-active);
  border-color: var(--zan-primary-active);
}

/* ---- 语义色按钮 ---------------------------------------------------------- */
.zan-btn-success,
.zan-btn-warning,
.zan-btn-danger,
.zan-btn-info,
.zan-btn-dark {
  color: #fff;
  border-color: transparent;
}

.zan-btn-success { background: var(--zan-success); }
.zan-btn-warning { background: var(--zan-warning); color: #3a2600; }
.zan-btn-danger  { background: var(--zan-danger); }
.zan-btn-info    { background: var(--zan-info); }
.zan-btn-dark    { background: var(--zan-gray-800); }

.zan-btn-success:hover { color: #fff; background: var(--zan-success-600); border-color: transparent; }
.zan-btn-warning:hover { color: #3a2600; background: var(--zan-warning-600); border-color: transparent; }
.zan-btn-danger:hover  { color: #fff; background: var(--zan-danger-600); border-color: transparent; }
.zan-btn-info:hover    { color: #fff; background: var(--zan-info-600); border-color: transparent; }
.zan-btn-dark:hover    { color: #fff; background: var(--zan-gray-700); border-color: transparent; }

/* 浅色底按钮（默认用于表格行内操作） */
.zan-btn-soft {
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
  border-color: transparent;
  box-shadow: none;
}

.zan-btn-soft:hover {
  color: var(--zan-primary-hover);
  background: var(--zan-primary-soft);
  border-color: var(--zan-primary-line);
}

.zan-btn-soft-success {
  color: var(--zan-success);
  background: var(--zan-success-soft);
  border-color: transparent;
  box-shadow: none;
}
.zan-btn-soft-success:hover {
  color: var(--zan-success);
  border-color: var(--zan-success-line);
  background: var(--zan-success-soft);
}

.zan-btn-soft-danger {
  color: var(--zan-danger);
  background: var(--zan-danger-soft);
  border-color: transparent;
  box-shadow: none;
}
.zan-btn-soft-danger:hover {
  color: var(--zan-danger);
  border-color: var(--zan-danger-line);
  background: var(--zan-danger-soft);
}

.zan-btn-soft-warning {
  color: var(--zan-warning-600);
  background: var(--zan-warning-soft);
  border-color: transparent;
  box-shadow: none;
}
.zan-btn-soft-warning:hover {
  color: var(--zan-warning-600);
  border-color: var(--zan-warning-line);
  background: var(--zan-warning-soft);
}

.zan-btn-soft-info {
  color: var(--zan-info);
  background: var(--zan-info-soft);
  border-color: transparent;
  box-shadow: none;
}
.zan-btn-soft-info:hover {
  color: var(--zan-info);
  border-color: var(--zan-info-line);
  background: var(--zan-info-soft);
}

/* ---- 描边按钮 ------------------------------------------------------------ */
.zan-btn-outline {
  color: var(--zan-primary);
  background: transparent;
  border-color: var(--zan-primary-line);
  box-shadow: none;
}
.zan-btn-outline:hover {
  color: var(--zan-primary-hover);
  background: var(--zan-primary-soft);
  border-color: var(--zan-primary);
}

/* ---- 幽灵 / 文字按钮 ------------------------------------------------------ */
.zan-btn-ghost {
  color: var(--zan-text-secondary);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.zan-btn-ghost:hover {
  color: var(--zan-text);
  background: var(--zan-surface-3);
  border-color: transparent;
}

.zan-btn-link {
  height: auto;
  padding: 0;
  color: var(--zan-primary);
  background: transparent;
  border: 0;
  box-shadow: none;
}
.zan-btn-link:hover {
  color: var(--zan-primary-hover);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.zan-btn-link:active { transform: none; }

/* ---- 尺寸 ---------------------------------------------------------------- */
.zan-btn-sm {
  height: var(--zan-control-height-sm);
  padding: 0 10px;
  font-size: 0.75rem;
  border-radius: var(--zan-radius-sm);
}
.zan-btn-sm .zan-icon { font-size: 0.875rem; }

.zan-btn-lg {
  height: var(--zan-control-height-lg);
  padding: 0 22px;
  font-size: 0.9375rem;
  border-radius: var(--zan-radius-lg);
}
.zan-btn-lg .zan-icon { font-size: 1.125rem; }

.zan-btn-block {
  display: flex;
  width: 100%;
}

.zan-btn-pill { border-radius: var(--zan-radius-pill); }

.zan-btn-icon {
  width: var(--zan-control-height);
  padding: 0;
}
.zan-btn-icon.zan-btn-sm { width: var(--zan-control-height-sm); }
.zan-btn-icon.zan-btn-lg { width: var(--zan-control-height-lg); }

.zan-btn-circle { border-radius: var(--zan-radius-circle); }

/* ---- 状态 ---------------------------------------------------------------- */
.zan-btn.is-loading,
.zan-btn[disabled],
.zan-btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none !important;
  box-shadow: none;
  pointer-events: none;
}

.zan-btn.is-loading .zan-spinner {
  width: 1em;
  height: 1em;
  margin-right: 2px;
}

.zan-btn.is-active {
  background: var(--zan-primary-soft);
  border-color: var(--zan-primary-line);
  color: var(--zan-primary);
}

/* ---- 按钮组 -------------------------------------------------------------- */
.zan-btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  vertical-align: middle;
}

.zan-btn-group > .zan-btn {
  border-radius: 0;
  box-shadow: none;
}

.zan-btn-group > .zan-btn + .zan-btn { margin-left: -1px; }

.zan-btn-group > .zan-btn:first-child {
  border-top-left-radius: var(--zan-control-radius);
  border-bottom-left-radius: var(--zan-control-radius);
}

.zan-btn-group > .zan-btn:last-child {
  border-top-right-radius: var(--zan-control-radius);
  border-bottom-right-radius: var(--zan-control-radius);
}

.zan-btn-group > .zan-btn:hover,
.zan-btn-group > .zan-btn:focus-visible,
.zan-btn-group > .zan-btn.is-active {
  position: relative;
  z-index: 2;
}

.zan-btn-group.zan-btn-group-pill > .zan-btn:first-child {
  border-top-left-radius: var(--zan-radius-pill);
  border-bottom-left-radius: var(--zan-radius-pill);
}
.zan-btn-group.zan-btn-group-pill > .zan-btn:last-child {
  border-top-right-radius: var(--zan-radius-pill);
  border-bottom-right-radius: var(--zan-radius-pill);
}

/* ---- 加载指示器 ---------------------------------------------------------- */
.zan-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: -2px;
  border: 2px solid var(--zan-border-strong);
  border-top-color: var(--zan-primary);
  border-radius: var(--zan-radius-circle);
  animation: zan-spin 0.7s linear infinite;
}

.zan-spinner-inverse {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

@keyframes zan-spin {
  to { transform: rotate(360deg); }
}

/* ---- 关闭按钮 ------------------------------------------------------------ */
.zan-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--zan-text-muted);
  background: transparent;
  border-radius: var(--zan-radius-sm);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-close:hover {
  color: var(--zan-text);
  background: var(--zan-surface-3);
}

.zan-close > .zan-icon { font-size: 1rem; }

/* ==========================================================================
   05 · 表单（Form）
   ========================================================================== */

.zan-form {
  display: flex;
  flex-direction: column;
  gap: var(--zan-space-5);
}

.zan-form-item {
  display: flex;
  flex-direction: column;
  gap: var(--zan-space-2);
  min-width: 0;
}

.zan-form-item + .zan-form-item { margin-top: 0; }

.zan-form-label {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--zan-text-secondary);
}

.zan-form-label .zan-required {
  color: var(--zan-danger);
  font-weight: 400;
}

.zan-form-help,
.zan-form-tip {
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--zan-text-faint);
}

.zan-form-error {
  display: none;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--zan-danger);
}

/* ---- 表单错误汇总 ------------------------------------------------------- */
.zan-form-errors {
  padding: 12px 14px;
  border: 1px solid var(--zan-danger-line);
  border-radius: var(--zan-radius-md);
  background: var(--zan-danger-soft);
  color: var(--zan-text-primary);
}
.zan-form-errors[hidden] { display: none; }
.zan-form-errors:focus-visible {
  outline: 2px solid var(--zan-primary);
  outline-offset: 2px;
}
.zan-form-errors-title {
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--zan-danger);
}
.zan-form-errors ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 0.75rem;
  line-height: 1.55;
}
.zan-form-errors a {
  color: var(--zan-danger);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.zan-form-errors span { margin-left: 6px; color: var(--zan-text-secondary); }
.zan-form.is-dirty .zan-form-actions::after {
  content: "有未保存的修改";
  align-self: center;
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--zan-warning);
}

.zan-form-item.is-error .zan-form-error { display: block; }
.zan-form-item.is-error .zan-form-tip { display: none; }

.zan-form-item.is-error .zan-input,
.zan-form-item.is-error .zan-select,
.zan-form-item.is-error .zan-textarea,
.zan-form-item.is-error .zan-input-wrap {
  border-color: var(--zan-danger);
  background-color: var(--zan-danger-soft);
}

.zan-form-item.is-error .zan-input:focus,
.zan-form-item.is-error .zan-select:focus,
.zan-form-item.is-error .zan-textarea:focus {
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.18);
}

.zan-form-item.is-success .zan-input,
.zan-form-item.is-success .zan-select {
  border-color: var(--zan-success);
}

/* ---- 输入框 -------------------------------------------------------------- */
.zan-input,
.zan-select,
.zan-textarea {
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--zan-control-height);
  padding: 0 11px;
  font-size: 0.8125rem;
  color: var(--zan-text);
  background-color: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-control-radius);
  outline: none;
  transition: border-color var(--zan-duration-fast) var(--zan-ease),
    box-shadow var(--zan-duration-fast) var(--zan-ease),
    background-color var(--zan-duration-fast) var(--zan-ease);
}

.zan-input:hover,
.zan-select:hover,
.zan-textarea:hover {
  border-color: var(--zan-border-strong);
}

.zan-input:focus,
.zan-select:focus,
.zan-textarea:focus {
  border-color: var(--zan-primary);
  box-shadow: var(--zan-focus-ring);
}

.zan-input:disabled,
.zan-select:disabled,
.zan-textarea:disabled {
  color: var(--zan-text-faint);
  cursor: not-allowed;
  background-color: var(--zan-surface-3);
  border-color: var(--zan-border);
}

.zan-input[readonly] {
  background-color: var(--zan-surface-2);
}

.zan-textarea {
  height: auto;
  min-height: 92px;
  padding: 9px 11px;
  line-height: 1.65;
}

/* 尺寸 */
.zan-input-sm,
.zan-select-sm {
  height: var(--zan-control-height-sm);
  padding: 0 9px;
  font-size: 0.75rem;
  border-radius: var(--zan-radius-sm);
}

.zan-input-lg,
.zan-select-lg {
  height: var(--zan-control-height-lg);
  padding: 0 14px;
  font-size: 0.9375rem;
}

/* 下拉框箭头 */
.zan-select {
  padding-right: 32px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23788396' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 12px;
}

.zan-select[multiple] {
  height: auto;
  min-height: 96px;
  padding: 6px;
  background-image: none;
}

.zan-select[multiple] option {
  padding: 5px 8px;
  border-radius: var(--zan-radius-xs);
}

/* ---- 输入框组合 / 前后缀 ------------------------------------------------- */
.zan-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-control-radius);
  transition: border-color var(--zan-duration-fast) var(--zan-ease),
    box-shadow var(--zan-duration-fast) var(--zan-ease);
}

.zan-input-group:focus-within {
  border-color: var(--zan-primary);
  box-shadow: var(--zan-focus-ring);
}

.zan-input-group > .zan-input {
  height: 100%;
  padding: 0 11px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.zan-input-addon {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 0 11px;
  font-size: 0.8125rem;
  white-space: nowrap;
  color: var(--zan-text-muted);
  background: var(--zan-surface-2);
  border-right: 1px solid var(--zan-border);
  border-radius: var(--zan-control-radius) 0 0 var(--zan-control-radius);
}

.zan-input-addon-end {
  border-right: 0;
  border-left: 1px solid var(--zan-border);
  border-radius: 0 var(--zan-control-radius) var(--zan-control-radius) 0;
}

/* ---- 搜索框 -------------------------------------------------------------- */
.zan-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.zan-search .zan-icon {
  position: absolute;
  left: 11px;
  z-index: 1;
  font-size: 0.9375rem;
  color: var(--zan-text-faint);
  pointer-events: none;
}

.zan-search .zan-input {
  padding-left: 33px;
}

.zan-search .zan-search-clear {
  position: absolute;
  right: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--zan-text-faint);
  border-radius: var(--zan-radius-circle);
}

.zan-search .zan-search-clear:hover { color: var(--zan-text); background: var(--zan-surface-3); }
.zan-search.is-filled .zan-search-clear { display: inline-flex; }
.zan-search .zan-input:focus { padding-right: 32px; }

/* ---- 复选 / 单选 --------------------------------------------------------- */
.zan-check,
.zan-radio {
  position: relative;
  display: inline-flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--zan-text-secondary);
  cursor: pointer;
  user-select: none;
}

.zan-check > input,
.zan-radio > input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.zan-check-box,
.zan-radio-dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border-strong);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-check-box {
  border-radius: var(--zan-radius-xs);
}

.zan-check-box::after {
  position: absolute;
  top: 1px;
  left: 5px;
  width: 4px;
  height: 8px;
  content: "";
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  opacity: 0;
  transform: rotate(45deg) scale(0.6);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-check:hover .zan-check-box,
.zan-radio:hover .zan-radio-dot {
  border-color: var(--zan-primary);
}

.zan-check input:checked + .zan-check-box,
.zan-check input:indeterminate + .zan-check-box {
  background: var(--zan-primary);
  border-color: var(--zan-primary);
}

.zan-check input:checked + .zan-check-box::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.zan-check input:indeterminate + .zan-check-box::after {
  top: 6px;
  left: 3px;
  width: 8px;
  height: 0;
  border-right: 0;
  border-bottom: 2px solid #fff;
  opacity: 1;
  transform: none;
}

.zan-check input:focus-visible + .zan-check-box,
.zan-radio input:focus-visible + .zan-radio-dot {
  box-shadow: var(--zan-focus-ring);
}

.zan-check input:disabled + .zan-check-box,
.zan-radio input:disabled + .zan-radio-dot {
  background: var(--zan-surface-3);
  border-color: var(--zan-border);
  opacity: 0.6;
}

.zan-radio-dot {
  border-radius: var(--zan-radius-circle);
}

.zan-radio-dot::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  content: "";
  background: #fff;
  border-radius: var(--zan-radius-circle);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-radio input:checked + .zan-radio-dot {
  background: var(--zan-primary);
  border-color: var(--zan-primary);
}

.zan-radio input:checked + .zan-radio-dot::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.zan-check-group,
.zan-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zan-space-3) var(--zan-space-5);
  padding-top: 2px;
}

.zan-radio-group-pill {
  gap: var(--zan-space-2);
}

.zan-radio-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 32px;
  padding: 0 14px;
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
  cursor: pointer;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-pill);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-radio-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.zan-radio-pill:has(input:checked) {
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
  border-color: var(--zan-primary-line);
}

/* ---- 开关 ---------------------------------------------------------------- */
.zan-switch {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
  cursor: pointer;
  user-select: none;
}

.zan-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.zan-switch-track {
  position: relative;
  display: inline-block;
  flex: none;
  width: 40px;
  height: 22px;
  background: var(--zan-border-strong);
  border-radius: var(--zan-radius-pill);
  transition: background-color var(--zan-duration) var(--zan-ease);
}

.zan-switch-track::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  content: "";
  background: #fff;
  border-radius: var(--zan-radius-circle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform var(--zan-duration) var(--zan-ease);
}

.zan-switch input:checked + .zan-switch-track {
  background: var(--zan-primary);
}

.zan-switch input:checked + .zan-switch-track::after {
  transform: translateX(18px);
}

.zan-switch input:focus-visible + .zan-switch-track {
  box-shadow: var(--zan-focus-ring);
}

.zan-switch input:disabled + .zan-switch-track {
  cursor: not-allowed;
  opacity: 0.55;
}

.zan-switch-sm .zan-switch-track { width: 32px; height: 18px; }
.zan-switch-sm .zan-switch-track::after { width: 14px; height: 14px; }
.zan-switch-sm input:checked + .zan-switch-track::after { transform: translateX(14px); }

/* ---- 滑块 ---------------------------------------------------------------- */
.zan-range {
  width: 100%;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.zan-range::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--zan-border);
  border-radius: var(--zan-radius-pill);
}

.zan-range::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--zan-primary);
  border: 2px solid var(--zan-surface);
  border-radius: var(--zan-radius-circle);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.2);
}

.zan-range::-moz-range-track {
  height: 4px;
  background: var(--zan-border);
  border-radius: var(--zan-radius-pill);
}

.zan-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--zan-primary);
  border: 2px solid var(--zan-surface);
  border-radius: var(--zan-radius-circle);
}

/* ---- 原生文件选择 -------------------------------------------------------- */
.zan-file {
  display: block;
  width: 100%;
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
}

.zan-file::file-selector-button {
  height: 32px;
  padding: 0 12px;
  margin-right: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--zan-text);
  cursor: pointer;
  background: var(--zan-surface-2);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-sm);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-file::file-selector-button:hover {
  background: var(--zan-surface-3);
  border-color: var(--zan-border-strong);
}

/* ---- 表单排版 ------------------------------------------------------------ */
.zan-form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zan-space-3);
  align-items: flex-end;
}

.zan-form-inline .zan-form-item {
  flex: 1 1 180px;
}

.zan-form-horizontal .zan-form-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: var(--zan-space-2) var(--zan-space-4);
  align-items: center;
}

.zan-form-horizontal .zan-form-label {
  justify-content: flex-end;
  text-align: right;
}

.zan-form-horizontal .zan-form-help,
.zan-form-horizontal .zan-form-error {
  grid-column: 2;
}

@media (max-width: 640px) {
  .zan-form-horizontal .zan-form-item {
    grid-template-columns: 1fr;
  }
  .zan-form-horizontal .zan-form-label {
    justify-content: flex-start;
    text-align: left;
  }
  .zan-form-horizontal .zan-form-help,
  .zan-form-horizontal .zan-form-error {
    grid-column: 1;
  }
}

.zan-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--zan-space-4);
}

.zan-form-section {
  padding-top: var(--zan-space-3);
  margin-top: var(--zan-space-2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--zan-text);
  border-top: 1px solid var(--zan-border-soft);
}

.zan-form-actions {
  display: flex;
  gap: var(--zan-space-2);
  align-items: center;
  padding-top: var(--zan-space-2);
}

/* 字数统计 */
.zan-input-count {
  align-self: flex-end;
  font-size: 0.6875rem;
  color: var(--zan-text-faint);
}

/* ==========================================================================
   06 · 数据展示（Table / Card / List / Badge）
   ========================================================================== */

/* ---- 徽标 ---------------------------------------------------------------- */
.zan-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  color: var(--zan-text-secondary);
  white-space: nowrap;
  vertical-align: 1px;
  background: var(--zan-surface-3);
  border-radius: var(--zan-radius-pill);
}

.zan-badge-primary { color: var(--zan-primary); background: var(--zan-primary-soft); }
.zan-badge-success { color: var(--zan-success); background: var(--zan-success-soft); }
.zan-badge-warning { color: var(--zan-warning); background: var(--zan-warning-soft); }
.zan-badge-danger  { color: var(--zan-danger);  background: var(--zan-danger-soft); }
.zan-badge-info    { color: var(--zan-info);    background: var(--zan-info-soft); }
.zan-badge-solid   { color: #fff; background: var(--zan-primary); }
.zan-badge-solid-success { color: #fff; background: var(--zan-success); }
.zan-badge-solid-warning { color: #3a2600; background: var(--zan-warning); }
.zan-badge-solid-danger  { color: #fff; background: var(--zan-danger); }
.zan-badge-solid-info    { color: #fff; background: var(--zan-info); }

.zan-badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: var(--zan-radius-circle);
  vertical-align: 1px;
}

.zan-badge-dot.zan-badge-success { color: var(--zan-success); background: var(--zan-success); }
.zan-badge-dot.zan-badge-danger { color: var(--zan-danger); background: var(--zan-danger); }
.zan-badge-dot.zan-badge-warning { color: var(--zan-warning); background: var(--zan-warning); }
.zan-badge-dot.zan-badge-info { color: var(--zan-info); background: var(--zan-info); }
.zan-badge-dot.zan-badge-primary { color: var(--zan-primary); background: var(--zan-primary); }

/* 数字角标（吸附在图标 / 头像右上角） */
.zan-count {
  position: absolute;
  top: -6px;
  right: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--zan-danger);
  border-radius: var(--zan-radius-pill);
  box-shadow: 0 0 0 2px var(--zan-surface);
}

/* ---- 标签 ---------------------------------------------------------------- */
.zan-tag {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  font-size: 0.75rem;
  color: var(--zan-text-secondary);
  white-space: nowrap;
  background: var(--zan-surface-3);
  border: 1px solid transparent;
  border-radius: var(--zan-radius-sm);
}

.zan-tag-primary { color: var(--zan-primary); background: var(--zan-primary-soft); border-color: var(--zan-primary-line); }
.zan-tag-success { color: var(--zan-success); background: var(--zan-success-soft); border-color: var(--zan-success-line); }
.zan-tag-warning { color: var(--zan-warning); background: var(--zan-warning-soft); border-color: var(--zan-warning-line); }
.zan-tag-danger  { color: var(--zan-danger);  background: var(--zan-danger-soft);  border-color: var(--zan-danger-line); }
.zan-tag-info    { color: var(--zan-info);    background: var(--zan-info-soft);    border-color: var(--zan-info-line); }

.zan-tag > .zan-tag-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: -4px;
  color: inherit;
  cursor: pointer;
  opacity: 0.65;
  border-radius: var(--zan-radius-circle);
}

.zan-tag > .zan-tag-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); }
.zan-tag > .zan-tag-close .zan-icon { font-size: 0.625rem; }

/* ---- 头像 ---------------------------------------------------------------- */
.zan-avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--zan-primary);
  vertical-align: middle;
  background: var(--zan-primary-soft);
  border-radius: var(--zan-radius-circle);
}

.zan-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zan-avatar-sm { width: 24px; height: 24px; font-size: 0.6875rem; }
.zan-avatar-lg { width: 40px; height: 40px; font-size: 0.9375rem; }
.zan-avatar-xl { width: 56px; height: 56px; font-size: 1.125rem; }
.zan-avatar-square { border-radius: var(--zan-radius-md); }

.zan-avatar-group {
  display: inline-flex;
  align-items: center;
}

.zan-avatar-group > .zan-avatar + .zan-avatar {
  margin-left: -8px;
  border: 2px solid var(--zan-surface);
}

/* ---- 表格 ---------------------------------------------------------------- */
.zan-table {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
  background: var(--zan-surface);
}

.zan-table th,
.zan-table td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--zan-border-soft);
}

.zan-table th {
  font-weight: 500;
  color: var(--zan-text);
  white-space: nowrap;
  background: var(--zan-surface-2);
}

.zan-table tbody tr {
  transition: background-color var(--zan-duration-fast) var(--zan-ease);
}

.zan-table tbody tr:hover {
  background: var(--zan-surface-2);
}

.zan-table tbody tr.is-selected {
  background: var(--zan-primary-soft);
}

.zan-table tbody tr.is-selected td { color: var(--zan-text); }
.zan-table tbody tr.is-selected:hover { background: var(--zan-primary-soft); }

.zan-table tbody tr:last-child td { border-bottom: 0; }

.zan-table tbody td { color: var(--zan-text-secondary); }
.zan-table tbody td.zan-table-strong {
  font-weight: 500;
  color: var(--zan-text);
}

.zan-table-border th,
.zan-table-border td {
  border-right: 1px solid var(--zan-border-soft);
}

.zan-table-border th:last-child,
.zan-table-border td:last-child { border-right: 0; }

.zan-table-striped tbody tr:nth-child(even) { background: var(--zan-surface-2); }
.zan-table-striped tbody tr:nth-child(even):hover { background: var(--zan-surface-3); }

.zan-table-compact th,
.zan-table-compact td { padding: 7px 10px; }

.zan-thead-dark th {
  color: #fff;
  background: var(--zan-gray-800);
  border-color: transparent;
}

.zan-thead-gray th {
  background: var(--zan-surface-3);
  border-bottom-color: var(--zan-border);
}

.zan-thead-primary th {
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
}

.zan-table-wrap {
  overflow-x: auto;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-lg);
  box-shadow: var(--zan-shadow-xs);
}

.zan-table-wrap .zan-table { min-width: 640px; }

.zan-table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 var(--zan-border);
}

.zan-th-sort { cursor: pointer; user-select: none; }

.zan-th-sort:hover { color: var(--zan-primary); }

.zan-th-sort .zan-sort-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  margin-left: 3px;
  vertical-align: -1px;
}

.zan-th-sort .zan-sort-icon .zan-icon {
  font-size: 8px;
  line-height: 1;
  opacity: .32;
  transition: opacity .15s var(--zan-ease), color .15s var(--zan-ease);
}

.zan-th-sort.is-asc .zan-sort-icon .zan-icon:first-child,
.zan-th-sort.is-desc .zan-sort-icon .zan-icon:last-child {
  opacity: 1;
  color: var(--zan-primary);
}

/* 排序状态（JS 添加） */
.zan-th-sort.is-asc,
.zan-th-sort.is-desc { color: var(--zan-primary); }

.zan-table-empty {
  padding: 44px 20px !important;
  text-align: center;
  color: var(--zan-text-faint);
}

.zan-table-check {
  width: 38px;
  text-align: center;
}

/* 表格工具栏 */
.zan-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zan-space-3);
  align-items: center;
  padding: var(--zan-space-3) var(--zan-space-4);
  border-bottom: 1px solid var(--zan-border-soft);
}

.zan-table-toolbar-end { margin-left: auto; }

.zan-table-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zan-space-3);
  align-items: center;
  justify-content: space-between;
  padding: var(--zan-space-3) var(--zan-space-4);
  border-top: 1px solid var(--zan-border-soft);
}

/* 行内操作按钮组 */
.zan-row-actions {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  white-space: nowrap;
}

.zan-row-actions .zan-btn-link {
  padding: 2px 6px;
  font-size: 0.75rem;
}

/* ---- 卡片 ---------------------------------------------------------------- */
.zan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-lg);
  box-shadow: var(--zan-shadow-xs);
}

.zan-card-hover {
  transition: transform var(--zan-duration) var(--zan-ease),
    box-shadow var(--zan-duration) var(--zan-ease),
    border-color var(--zan-duration) var(--zan-ease);
}

.zan-card-hover:hover {
  border-color: var(--zan-border-strong);
  box-shadow: var(--zan-shadow-md);
  transform: translateY(-2px);
}

.zan-card-clickable { cursor: pointer; }

.zan-card-header {
  display: flex;
  gap: var(--zan-space-3);
  align-items: center;
  justify-content: space-between;
  padding: var(--zan-space-4) var(--zan-space-5);
  border-bottom: 1px solid var(--zan-border-soft);
}

.zan-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--zan-text);
}

.zan-card-subtitle {
  margin-top: 3px;
  font-size: 0.75rem;
  color: var(--zan-text-muted);
}

.zan-card-extra {
  flex: none;
  font-size: 0.75rem;
}

.zan-card-body {
  flex: 1;
  padding: var(--zan-space-5);
}

.zan-card-body-flush { padding: 0; }

.zan-card-footer {
  display: flex;
  gap: var(--zan-space-3);
  align-items: center;
  justify-content: space-between;
  padding: var(--zan-space-3) var(--zan-space-5);
  background: var(--zan-surface-2);
  border-top: 1px solid var(--zan-border-soft);
}

.zan-card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--zan-surface-3);
}

.zan-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--zan-duration-slow) var(--zan-ease);
}

.zan-card-hover:hover .zan-card-cover img { transform: scale(1.04); }

.zan-card-cover-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
}

/* 统计卡片 */
.zan-stat {
  display: flex;
  flex-direction: column;
  gap: var(--zan-space-2);
}

.zan-stat-label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.75rem;
  color: var(--zan-text-muted);
}

.zan-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--zan-text);
  font-variant-numeric: tabular-nums;
}

.zan-stat-trend {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  font-size: 0.75rem;
}

.zan-stat-trend.is-up { color: var(--zan-success); }
.zan-stat-trend.is-down { color: var(--zan-danger); }

.zan-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 1.125rem;
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
  border-radius: var(--zan-radius-md);
}

/* ---- 文本列表 ------------------------------------------------------------ */
.zan-list {
  display: flex;
  flex-direction: column;
}

.zan-list-item {
  display: flex;
  gap: var(--zan-space-3);
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--zan-border-soft);
}

.zan-list-item:first-child { padding-top: 0; }
.zan-list-item:last-child { padding-bottom: 0; border-bottom: 0; }

.zan-list-item-hover {
  padding-right: 8px;
  padding-left: 8px;
  margin-right: -8px;
  margin-left: -8px;
  border-radius: var(--zan-radius-sm);
  transition: background var(--zan-duration-fast) var(--zan-ease);
}

.zan-list-item-hover:hover { background: var(--zan-surface-2); }

.zan-list-index {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--zan-text-muted);
  background: var(--zan-surface-3);
  border-radius: var(--zan-radius-xs);
}

.zan-list-index.is-top { color: #fff; background: var(--zan-primary); }
.zan-list-index.is-hot { color: #fff; background: var(--zan-danger); }
.zan-list-index.is-new { color: #fff; background: var(--zan-success); }

.zan-list-body {
  flex: 1;
  min-width: 0;
}

.zan-list-title {
  display: block;
  overflow: hidden;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--zan-text);
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--zan-duration-fast) var(--zan-ease);
}

.zan-list-item:hover .zan-list-title { color: var(--zan-primary); }

.zan-list-desc {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--zan-text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.zan-list-meta {
  flex: none;
  font-size: 0.6875rem;
  color: var(--zan-text-faint);
  white-space: nowrap;
}

.zan-list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

/* 列表容器 */
.zan-list-box {
  padding: var(--zan-space-3) var(--zan-space-4);
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-lg);
}

/* ---- 图文列表 ------------------------------------------------------------ */
.zan-media {
  display: flex;
  gap: var(--zan-space-4);
  align-items: flex-start;
}

.zan-media-thumb {
  position: relative;
  flex: none;
  width: 132px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--zan-surface-3);
  border-radius: var(--zan-radius-md);
}

.zan-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--zan-duration-slow) var(--zan-ease);
}

.zan-media:hover .zan-media-thumb img { transform: scale(1.05); }

.zan-media-body { flex: 1; min-width: 0; }

.zan-media-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--zan-text);
  transition: color var(--zan-duration-fast) var(--zan-ease);
}

.zan-media:hover .zan-media-title { color: var(--zan-primary); }

.zan-media-desc {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--zan-text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.zan-media-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  font-size: 0.6875rem;
  color: var(--zan-text-faint);
}

.zan-media-meta .zan-icon { font-size: 0.8125rem; }

.zan-media-list {
  display: flex;
  flex-direction: column;
  gap: var(--zan-space-4);
}

.zan-media-list > .zan-media {
  padding-bottom: var(--zan-space-4);
  border-bottom: 1px solid var(--zan-border-soft);
}

.zan-media-list > .zan-media:last-child { padding-bottom: 0; border-bottom: 0; }

/* ---- 图片列表 ------------------------------------------------------------ */
.zan-pic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--zan-pic-min, 160px), 1fr));
  gap: var(--zan-space-3);
}

.zan-pic-item {
  position: relative;
  overflow: hidden;
  background: var(--zan-surface-3);
  border-radius: var(--zan-radius-md);
  aspect-ratio: 1 / 1;
}

.zan-pic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--zan-duration-slow) var(--zan-ease);
}

.zan-pic-item:hover img { transform: scale(1.06); }

.zan-pic-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 20px 10px 8px;
  font-size: 0.75rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
}

.zan-pic-ratio-4-3 { aspect-ratio: 4 / 3; }
.zan-pic-ratio-16-9 { aspect-ratio: 16 / 9; }

/* ---- 面包屑 -------------------------------------------------------------- */
.zan-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  font-size: 0.75rem;
  color: var(--zan-text-muted);
  list-style: none;
}

.zan-breadcrumb-item {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--zan-text-muted);
}

.zan-breadcrumb-item > a { color: var(--zan-text-muted); }
.zan-breadcrumb-item > a:hover { color: var(--zan-primary); }

.zan-breadcrumb-sep {
  margin: 0 6px;
  color: var(--zan-text-faint);
  user-select: none;
}

.zan-breadcrumb-item.is-active {
  font-weight: 500;
  color: var(--zan-text);
}

/* ---- 空状态 -------------------------------------------------------------- */
.zan-empty {
  display: flex;
  flex-direction: column;
  gap: var(--zan-space-3);
  align-items: center;
  justify-content: center;
  padding: var(--zan-space-10) var(--zan-space-6);
  text-align: center;
}

.zan-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  font-size: 1.75rem;
  color: var(--zan-text-faint);
  background: var(--zan-surface-2);
  border: 1px dashed var(--zan-border-strong);
  border-radius: var(--zan-radius-lg);
}

.zan-empty-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--zan-text-secondary);
}

.zan-empty-desc {
  max-width: 360px;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--zan-text-faint);
}

/* ---- 描述列表 ------------------------------------------------------------ */
.zan-desc-list {
  display: grid;
  grid-template-columns: repeat(var(--zan-desc-cols, 1), minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--zan-border-soft);
  border: 1px solid var(--zan-border-soft);
  border-radius: var(--zan-radius-md);
}

.zan-desc-item {
  display: flex;
  gap: var(--zan-space-3);
  padding: 10px 14px;
  font-size: 0.8125rem;
  background: var(--zan-surface);
}

.zan-desc-label {
  flex: none;
  min-width: 76px;
  color: var(--zan-text-muted);
}

.zan-desc-value { flex: 1; color: var(--zan-text); word-break: break-all; }

@media (min-width: 768px) {
  .zan-desc-2 { --zan-desc-cols: 2; }
  .zan-desc-3 { --zan-desc-cols: 3; }
}

/* ==========================================================================
   07 · 反馈与导航辅助（Progress / Steps / Timeline / Pagination / Alert）
   ========================================================================== */

/* ---- 进度条 -------------------------------------------------------------- */
.zan-progress {
  position: relative;
  width: 100%;
  height: 8px;
  overflow: hidden;
  background: var(--zan-surface-3);
  border-radius: var(--zan-radius-pill);
}

.zan-progress-bar {
  position: relative;
  width: 0;
  height: 100%;
  background: var(--zan-primary);
  border-radius: inherit;
  transition: width var(--zan-duration-slow) var(--zan-ease);
}

.zan-progress-bar::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0;
  transition: opacity var(--zan-duration) var(--zan-ease);
}

.zan-progress.is-animated .zan-progress-bar::after {
  opacity: 1;
  animation: zan-progress-shine 1.6s ease-in-out infinite;
}

@keyframes zan-progress-shine {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

.zan-progress-sm { height: 4px; }
.zan-progress-lg { height: 12px; }

.zan-progress-success .zan-progress-bar { background: var(--zan-success); }
.zan-progress-warning .zan-progress-bar { background: var(--zan-warning); }
.zan-progress-danger .zan-progress-bar { background: var(--zan-danger); }
.zan-progress-info .zan-progress-bar { background: var(--zan-info); }

.zan-progress-striped .zan-progress-bar {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.18) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.18) 75%,
    transparent 75%,
    transparent
  );
  background-size: 12px 12px;
}

.zan-progress-with-text {
  display: flex;
  gap: var(--zan-space-3);
  align-items: center;
}

.zan-progress-with-text .zan-progress { flex: 1; }

.zan-progress-text {
  flex: none;
  width: 38px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--zan-text-muted);
  text-align: right;
}

/* 环形进度 */
.zan-progress-circle {
  --zan-value: 0;
  display: inline-grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: 7px;
  background: conic-gradient(
    var(--zan-primary) calc(var(--zan-value) * 1%),
    var(--zan-surface-3) 0
  );
  border-radius: var(--zan-radius-circle);
}

.zan-progress-circle-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--zan-surface);
  border-radius: var(--zan-radius-circle);
}

.zan-progress-circle-value {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.zan-progress-circle-label {
  font-size: 0.6875rem;
  color: var(--zan-text-faint);
}

/* ---- 步骤条 -------------------------------------------------------------- */
.zan-steps {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.zan-step {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.zan-step:not(:last-child)::after {
  position: absolute;
  top: 15px;
  left: calc(50% + 22px);
  width: calc(100% - 44px);
  height: 2px;
  content: "";
  background: var(--zan-border);
  transition: background var(--zan-duration) var(--zan-ease);
}

.zan-step.is-done:not(:last-child)::after { background: var(--zan-primary-line); }

.zan-step-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--zan-text-faint);
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-circle);
}

.zan-step.is-active .zan-step-icon {
  color: var(--zan-on-primary);
  background: var(--zan-primary);
  border-color: var(--zan-primary);
  box-shadow: 0 0 0 4px var(--zan-primary-soft);
}

.zan-step.is-done .zan-step-icon {
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
  border-color: var(--zan-primary-line);
}

.zan-step-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--zan-text-secondary);
}

.zan-step.is-active .zan-step-title { color: var(--zan-text); font-weight: 600; }

.zan-step-desc {
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--zan-text-faint);
}

/* 垂直步骤 */
.zan-steps-vertical {
  flex-direction: column;
  gap: var(--zan-space-5);
}

.zan-steps-vertical .zan-step {
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
}

.zan-steps-vertical .zan-step:not(:last-child)::after {
  top: 34px;
  left: 15px;
  width: 2px;
  height: calc(100% + 10px);
}

.zan-steps-vertical .zan-step-icon { flex: none; }

.zan-steps-vertical .zan-step-content { padding-top: 5px; }

/* ---- 时间线 -------------------------------------------------------------- */
.zan-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--zan-space-5);
  padding-left: 22px;
}

.zan-timeline::before {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 5px;
  width: 2px;
  content: "";
  background: var(--zan-border);
}

.zan-timeline-item {
  position: relative;
}

.zan-timeline-dot {
  position: absolute;
  top: 5px;
  left: -22px;
  width: 12px;
  height: 12px;
  background: var(--zan-surface);
  border: 2px solid var(--zan-border-strong);
  border-radius: var(--zan-radius-circle);
}

.zan-timeline-item.is-primary .zan-timeline-dot { border-color: var(--zan-primary); }
.zan-timeline-item.is-success .zan-timeline-dot { border-color: var(--zan-success); }
.zan-timeline-item.is-warning .zan-timeline-dot { border-color: var(--zan-warning); }
.zan-timeline-item.is-danger .zan-timeline-dot { border-color: var(--zan-danger); }

.zan-timeline-item.is-active .zan-timeline-dot {
  background: var(--zan-primary);
  border-color: var(--zan-primary);
  box-shadow: 0 0 0 4px var(--zan-primary-soft);
}

.zan-timeline-time {
  display: block;
  margin-bottom: 3px;
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--zan-text-faint);
}

.zan-timeline-title {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--zan-text);
}

.zan-timeline-desc {
  margin-top: 4px;
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--zan-text-muted);
}

.zan-timeline-card {
  padding: 10px 12px;
  margin-top: 8px;
  background: var(--zan-surface-2);
  border: 1px solid var(--zan-border-soft);
  border-radius: var(--zan-radius-md);
}

/* ---- 分页 ---------------------------------------------------------------- */
.zan-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 0;
  list-style: none;
}

.zan-pagination .zan-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--zan-text-secondary);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-sm);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-pagination .zan-page:hover {
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
  border-color: var(--zan-primary-line);
}

.zan-pagination .zan-page.is-active {
  font-weight: 600;
  color: var(--zan-on-primary);
  background: var(--zan-primary);
  border-color: var(--zan-primary);
}

.zan-pagination .zan-page.is-disabled {
  color: var(--zan-text-faint);
  cursor: not-allowed;
  background: var(--zan-surface-2);
  border-color: var(--zan-border-soft);
  pointer-events: none;
}

.zan-pagination .zan-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 32px;
  color: var(--zan-text-faint);
}

.zan-pagination .zan-page-icon { font-size: 0.9375rem; }

.zan-pagination-info {
  margin-right: auto;
  font-size: 0.75rem;
  color: var(--zan-text-muted);
}

.zan-pagination-simple {
  display: flex;
  gap: var(--zan-space-2);
  align-items: center;
  font-size: 0.75rem;
  color: var(--zan-text-muted);
}

.zan-pagination-simple .zan-page { min-width: 30px; height: 30px; }

.zan-pagination-simple .zan-input {
  width: 48px;
  height: 30px;
  padding: 0 6px;
  text-align: center;
}

/* ---- 警告条 -------------------------------------------------------------- */
.zan-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--zan-text-secondary);
  background: var(--zan-surface-2);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-md);
}

.zan-alert-icon {
  flex: none;
  margin-top: 1px;
  font-size: 1rem;
  color: var(--zan-text-muted);
}

.zan-alert-content { flex: 1; min-width: 0; }

.zan-alert-title {
  font-weight: 600;
  color: var(--zan-text);
}

.zan-alert-desc {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--zan-text-muted);
}

.zan-alert-close {
  flex: none;
  width: 22px;
  height: 22px;
  margin: -2px -4px 0 0;
  color: inherit;
  opacity: 0.55;
  border-radius: var(--zan-radius-xs);
}

.zan-alert-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.06); }
.zan-alert-close .zan-icon { font-size: 0.75rem; }

.zan-alert-success { color: var(--zan-text-secondary); background: var(--zan-success-soft); border-color: var(--zan-success-line); }
.zan-alert-success .zan-alert-icon,
.zan-alert-success .zan-alert-title { color: var(--zan-success); }

.zan-alert-warning { background: var(--zan-warning-soft); border-color: var(--zan-warning-line); }
.zan-alert-warning .zan-alert-icon,
.zan-alert-warning .zan-alert-title { color: var(--zan-warning); }

.zan-alert-danger { background: var(--zan-danger-soft); border-color: var(--zan-danger-line); }
.zan-alert-danger .zan-alert-icon,
.zan-alert-danger .zan-alert-title { color: var(--zan-danger); }

.zan-alert-info { background: var(--zan-info-soft); border-color: var(--zan-info-line); }
.zan-alert-info .zan-alert-icon,
.zan-alert-info .zan-alert-title { color: var(--zan-info); }

/* ---- 骨架屏 -------------------------------------------------------------- */
.zan-skeleton {
  position: relative;
  display: block;
  height: 16px;
  overflow: hidden;
  background: var(--zan-surface-3);
  border-radius: var(--zan-radius-sm);
}

.zan-skeleton::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  content: "";
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  transform: translateX(-100%);
  animation: zan-skeleton 1.6s ease-in-out infinite;
}

[data-theme="dark"] .zan-skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

@keyframes zan-skeleton {
  100% { transform: translateX(100%); }
}

.zan-skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: var(--zan-radius-circle);
}

.zan-skeleton-title { width: 40%; height: 20px; }
.zan-skeleton-text { width: 100%; }
.zan-skeleton-short { width: 60%; }

/* ---- 分割线 -------------------------------------------------------------- */
.zan-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: var(--zan-space-5) 0;
  font-size: 0.75rem;
  color: var(--zan-text-faint);
  text-align: center;
  white-space: nowrap;
}

.zan-divider::before,
.zan-divider::after {
  flex: 1;
  height: 1px;
  content: "";
  background: var(--zan-border);
}

.zan-divider::before { margin-right: 12px; }
.zan-divider::after { margin-left: 12px; }

.zan-divider-left::before { flex: 0 0 32px; }
.zan-divider-left::after { flex: 1; }
.zan-divider-left { text-align: left; }

.zan-divider-plain::before,
.zan-divider-plain::after { background: transparent; }

.zan-divider-vertical {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin: 0 10px;
  vertical-align: -2px;
  background: var(--zan-border);
}

/* ==========================================================================
   08 · 导航（Navbar / Menu / Dropdown / Tabs / Tabbar）
   ========================================================================== */

/* ---- 顶部导航 ------------------------------------------------------------ */
.zan-navbar {
  position: relative;
  z-index: var(--zan-z-sticky);
  background: var(--zan-surface);
  border-bottom: 1px solid var(--zan-border);
}

.zan-navbar-inner {
  display: flex;
  gap: var(--zan-space-5);
  align-items: center;
  height: 64px;
}

.zan-navbar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--zan-text);
  letter-spacing: -0.01em;
}

.zan-navbar-brand:hover { color: var(--zan-text); }

.zan-navbar-brand img,
.zan-navbar-brand svg {
  width: 30px;
  height: 30px;
}

.zan-navbar-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.zan-nav-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 11px;
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
  text-decoration: none;
  border-radius: var(--zan-radius-sm);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-nav-link:hover {
  color: var(--zan-text);
  background: var(--zan-surface-2);
}

.zan-nav-link.is-active {
  font-weight: 500;
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
}

.zan-navbar-actions {
  display: flex;
  gap: var(--zan-space-2);
  align-items: center;
  margin-left: auto;
}

.zan-navbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  font-size: 1.125rem;
  color: var(--zan-text-secondary);
  border-radius: var(--zan-radius-sm);
}

.zan-navbar-toggle:hover { background: var(--zan-surface-2); }

@media (max-width: 860px) {
  .zan-navbar-inner { height: 56px; }
  .zan-navbar-nav { display: none; }
  .zan-navbar-toggle { display: inline-flex; }
}

/* 展开的移动端菜单 */
.zan-navbar-mobile {
  display: none;
  padding: var(--zan-space-3) var(--zan-space-4) var(--zan-space-4);
  border-top: 1px solid var(--zan-border-soft);
}

.zan-navbar-mobile.is-open { display: block; }

.zan-navbar-mobile .zan-nav-link { display: flex; width: 100%; }

/* ---- 侧栏菜单 ------------------------------------------------------------ */
.zan-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.zan-menu-group {
  padding: 7px 10px 5px;
  margin-top: var(--zan-space-2);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--zan-text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.zan-menu-item {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  padding: 7px 10px;
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--zan-radius-md);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-menu-item:hover {
  color: var(--zan-text);
  background: var(--zan-surface-2);
}

.zan-menu-item.is-active {
  font-weight: 500;
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
}

.zan-menu-item > .zan-icon {
  flex: none;
  font-size: 1rem;
  opacity: 0.9;
}

.zan-menu-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zan-menu-item-extra {
  flex: none;
  font-size: 0.6875rem;
  color: var(--zan-text-faint);
}

.zan-menu-item.is-active .zan-menu-item-extra { color: var(--zan-primary); }

.zan-menu-sub {
  padding-left: 12px;
  margin-top: 2px;
  border-left: 1px solid var(--zan-border-soft);
}

.zan-menu-sub .zan-menu-item { min-height: 34px; }

/* 前台大菜单（横向） */
.zan-menu-horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2px;
}

.zan-menu-horizontal .zan-menu-item {
  padding: 8px 14px;
  border-radius: var(--zan-radius-sm);
}

/* ---- 下拉菜单 ------------------------------------------------------------ */
.zan-dropdown {
  position: relative;
  display: inline-flex;
}

.zan-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--zan-z-dropdown);
  display: none;
  min-width: 168px;
  padding: 5px;
  margin: 0;
  overflow: hidden;
  list-style: none;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-md);
  box-shadow: var(--zan-shadow-lg);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--zan-duration-fast) var(--zan-ease),
    transform var(--zan-duration-fast) var(--zan-ease);
}

.zan-dropdown-menu.zan-dropdown-right { right: 0; left: auto; }
.zan-dropdown-menu.zan-dropdown-center { left: 50%; transform: translate(-50%, -4px); }

.zan-dropdown.is-open .zan-dropdown-menu { display: block; }

.zan-dropdown.is-open .zan-dropdown-menu.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.zan-dropdown.is-open .zan-dropdown-menu.zan-dropdown-center.is-ready {
  transform: translate(-50%, 0);
}

.zan-dropdown-item {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px 10px;
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
  text-align: left;
  text-decoration: none;
  border-radius: var(--zan-radius-sm);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-dropdown-item:hover {
  color: var(--zan-text);
  background: var(--zan-surface-2);
}

.zan-dropdown-item:focus-visible {
  outline: none;
  color: var(--zan-text);
  background: var(--zan-surface-2);
  box-shadow: var(--zan-focus-ring);
}

.zan-dropdown-item.is-active { color: var(--zan-primary); background: var(--zan-primary-soft); }
.zan-dropdown-item.is-danger { color: var(--zan-danger); }
.zan-dropdown-item.is-danger:hover { background: var(--zan-danger-soft); }

.zan-dropdown-item .zan-icon { font-size: 0.9375rem; }

.zan-dropdown-item-extra {
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--zan-text-faint);
}

.zan-dropdown-divider {
  height: 1px;
  margin: 4px -5px;
  background: var(--zan-border-soft);
}

.zan-dropdown-header {
  padding: 6px 10px;
  font-size: 0.6875rem;
  color: var(--zan-text-faint);
}

/* ---- 选项卡 -------------------------------------------------------------- */
.zan-tabs {
  display: flex;
  flex-direction: column;
}

.zan-tabs-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  list-style: none;
  border-bottom: 1px solid var(--zan-border);
  scrollbar-width: none;
}

.zan-tabs-nav::-webkit-scrollbar { display: none; }

.zan-tab {
  position: relative;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex: none;
  padding: 10px 14px;
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: var(--zan-radius-sm) var(--zan-radius-sm) 0 0;
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-tab:hover { color: var(--zan-text); background: var(--zan-surface-2); }

.zan-tab.is-active {
  font-weight: 600;
  color: var(--zan-primary);
}

.zan-tab.is-active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  content: "";
  background: var(--zan-primary);
  border-radius: var(--zan-radius-pill);
}

.zan-tab:disabled { color: var(--zan-text-faint); cursor: not-allowed; }

.zan-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--zan-text-muted);
  background: var(--zan-surface-3);
  border-radius: var(--zan-radius-pill);
}

.zan-tab.is-active .zan-tab-badge {
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
}

.zan-tabs-body { flex: 1; }

.zan-tab-pane { display: none; padding-top: var(--zan-space-5); }
.zan-tab-pane.is-active { display: block; }

/* 卡片式选项卡 */
.zan-tabs-card .zan-tabs-nav { gap: 8px; border-bottom: 0; }

.zan-tabs-card .zan-tab {
  background: var(--zan-surface-2);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-md);
  padding: 8px 14px;
}

.zan-tabs-card .zan-tab.is-active {
  background: var(--zan-primary-soft);
  border-color: var(--zan-primary-line);
  box-shadow: none;
}

.zan-tabs-card .zan-tab.is-active::after { display: none; }

/* 胶囊式选项卡 */
.zan-tabs-pill .zan-tabs-nav {
  gap: 4px;
  padding: 4px;
  background: var(--zan-surface-2);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-pill);
}

.zan-tabs-pill .zan-tab {
  padding: 7px 16px;
  border-radius: var(--zan-radius-pill);
}

.zan-tabs-pill .zan-tab.is-active {
  color: var(--zan-primary);
  background: var(--zan-surface);
  box-shadow: var(--zan-shadow-xs);
}

.zan-tabs-pill .zan-tab.is-active::after { display: none; }

/* 白底 / 卡片容器 */
.zan-tabs-white {
  padding: var(--zan-space-5);
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-lg);
}

/* 带标题的选项卡头 */
.zan-tabs-header {
  display: flex;
  gap: var(--zan-space-4);
  align-items: center;
  padding-bottom: 0;
  border-bottom: 1px solid var(--zan-border);
}

.zan-tabs-header .zan-tabs-nav {
  flex: 1;
  border-bottom: 0;
}

.zan-tabs-header-title {
  flex: none;
  font-size: 0.9375rem;
  font-weight: 600;
  padding-right: 4px;
}

.zan-tabs-header-more { flex: none; font-size: 0.75rem; }

.zan-tabs-header-more a:hover { text-decoration: underline; }

/* 左右结构 */
.zan-tabs-vertical {
  flex-direction: row;
  gap: var(--zan-space-5);
}

.zan-tabs-vertical .zan-tabs-nav {
  flex-direction: column;
  flex: none;
  gap: 2px;
  width: 132px;
  border-right: 1px solid var(--zan-border);
  border-bottom: 0;
}

.zan-tabs-vertical .zan-tab {
  justify-content: flex-start;
  border-radius: var(--zan-radius-sm) 0 0 var(--zan-radius-sm);
}

.zan-tabs-vertical .zan-tab.is-active::after {
  top: 8px;
  right: -1px;
  bottom: 8px;
  left: auto;
  width: 2px;
  height: auto;
}

.zan-tabs-vertical .zan-tabs-body { flex: 1; min-width: 0; }
.zan-tabs-vertical .zan-tab-pane { padding-top: 0; }

/* 选项卡内容无内边距 */
.zan-tabs-flush .zan-tab-pane { padding-top: 0; }

/* ---- 移动端顶部 / 底部 --------------------------------------------------- */
.zan-topbar {
  display: flex;
  gap: var(--zan-space-3);
  align-items: center;
  height: 48px;
  padding: 0 var(--zan-space-4);
  background: var(--zan-surface);
  border-bottom: 1px solid var(--zan-border);
}

.zan-topbar-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zan-topbar-action {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--zan-text-secondary);
  border-radius: var(--zan-radius-sm);
}

.zan-topbar-action:hover { background: var(--zan-surface-2); }

.zan-tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--zan-z-sticky);
  display: flex;
  align-items: center;
  height: 54px;
  padding: 0 6px;
  background: var(--zan-surface);
  border-top: 1px solid var(--zan-border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.zan-tabbar-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.6875rem;
  color: var(--zan-text-muted);
  text-decoration: none;
}

.zan-tabbar-item .zan-icon { font-size: 1.25rem; }

.zan-tabbar-item.is-active { font-weight: 500; color: var(--zan-primary); }

/* 底部操作栏 */
.zan-actionbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--zan-z-sticky);
  display: flex;
  gap: var(--zan-space-3);
  align-items: center;
  padding: 10px var(--zan-space-4) calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--zan-surface);
  border-top: 1px solid var(--zan-border);
}

.zan-actionbar .zan-btn { flex: 1; }

/* ==========================================================================
   09 · 浮层（Modal / Drawer / Toast / Loading / Tooltip / Lightbox）
   ========================================================================== */

/* ---- 模态窗口 ------------------------------------------------------------ */
.zan-modal {
  position: fixed;
  inset: 0;
  z-index: var(--zan-z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--zan-space-6);
}

.zan-modal.is-open { display: flex; }

.zan-modal-mask {
  position: absolute;
  inset: 0;
  background: var(--zan-overlay);
  opacity: 0;
  transition: opacity var(--zan-duration) var(--zan-ease);
  backdrop-filter: blur(2px);
}

.zan-modal.is-open .zan-modal-mask { opacity: 1; }

.zan-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-xl);
  box-shadow: var(--zan-shadow-xl);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity var(--zan-duration) var(--zan-ease),
    transform var(--zan-duration) var(--zan-ease-out);
}

.zan-modal.is-open .zan-modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.zan-modal-sm .zan-modal-dialog,
.zan-modal-dialog.zan-modal-sm { max-width: 380px; }
.zan-modal-lg .zan-modal-dialog,
.zan-modal-dialog.zan-modal-lg { max-width: 720px; }
.zan-modal-xl .zan-modal-dialog,
.zan-modal-dialog.zan-modal-xl { max-width: 960px; }
.zan-modal-full .zan-modal-dialog,
.zan-modal-dialog.zan-modal-full {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 100%;
  border-radius: 0;
}

/* 动画变体 */
.zan-modal[data-animate="zoom"] .zan-modal-dialog {
  transform: scale(0.9);
}

.zan-modal[data-animate="fade"] .zan-modal-dialog {
  transform: none;
}

.zan-modal[data-animate="slide-up"] .zan-modal-dialog {
  transform: translateY(40px);
}

.zan-modal[data-animate="rotate"] .zan-modal-dialog {
  transform: perspective(900px) rotateX(-12deg) translateY(20px);
  transform-origin: center bottom;
}

.zan-modal-header {
  display: flex;
  gap: var(--zan-space-3);
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--zan-space-5) var(--zan-space-5) var(--zan-space-4);
}

.zan-modal-title {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--zan-text);
}

.zan-modal-desc {
  margin-top: 4px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--zan-text-muted);
}

.zan-modal-body {
  flex: 1;
  padding: 0 var(--zan-space-5) var(--zan-space-5);
  overflow-y: auto;
}

.zan-modal-body-flush { padding: 0; }

.zan-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zan-space-2);
  align-items: center;
  justify-content: flex-end;
  padding: var(--zan-space-4) var(--zan-space-5);
  background: var(--zan-surface-2);
  border-top: 1px solid var(--zan-border-soft);
}

.zan-modal-footer-left { margin-right: auto; }

/* ---- 对话框（confirm / alert / prompt） ----------------------------------- */
.zan-dialog-body {
  display: flex;
  gap: var(--zan-space-4);
  align-items: flex-start;
  padding: var(--zan-space-5);
}

.zan-dialog-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
  border-radius: var(--zan-radius-circle);
}

.zan-dialog-icon.is-warning { color: var(--zan-warning); background: var(--zan-warning-soft); }
.zan-dialog-icon.is-danger { color: var(--zan-danger); background: var(--zan-danger-soft); }
.zan-dialog-icon.is-success { color: var(--zan-success); background: var(--zan-success-soft); }
.zan-dialog-icon.is-info { color: var(--zan-info); background: var(--zan-info-soft); }

.zan-dialog-content { flex: 1; min-width: 0; }

.zan-dialog-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--zan-text);
}

.zan-dialog-text {
  margin-top: 5px;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--zan-text-muted);
}

.zan-dialog-content .zan-input { margin-top: 12px; }

/* ---- 抽屉 ---------------------------------------------------------------- */
.zan-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--zan-z-drawer);
  display: none;
}

.zan-drawer.is-open { display: block; }

.zan-drawer-mask {
  position: absolute;
  inset: 0;
  background: var(--zan-overlay);
  opacity: 0;
  transition: opacity var(--zan-duration) var(--zan-ease);
}

.zan-drawer.is-open .zan-drawer-mask { opacity: 1; }

.zan-drawer-panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: 92vw;
  height: 100%;
  background: var(--zan-surface);
  box-shadow: var(--zan-shadow-xl);
  transition: transform var(--zan-duration-slow) var(--zan-ease-out);
}

.zan-drawer-left .zan-drawer-panel {
  top: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
}

.zan-drawer-right .zan-drawer-panel {
  top: 0;
  right: 0;
  bottom: 0;
  transform: translateX(100%);
}

.zan-drawer-top .zan-drawer-panel {
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: 80vh;
  transform: translateY(-100%);
  border-radius: 0 0 var(--zan-radius-xl) var(--zan-radius-xl);
}

.zan-drawer-bottom .zan-drawer-panel {
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: 85vh;
  transform: translateY(100%);
  border-radius: var(--zan-radius-xl) var(--zan-radius-xl) 0 0;
}

.zan-drawer.is-open .zan-drawer-panel { transform: translate(0, 0); }

.zan-drawer-sm .zan-drawer-panel { width: 300px; }
.zan-drawer-lg .zan-drawer-panel { width: 520px; }

.zan-drawer-header {
  display: flex;
  gap: var(--zan-space-3);
  align-items: center;
  justify-content: space-between;
  padding: var(--zan-space-4) var(--zan-space-5);
  border-bottom: 1px solid var(--zan-border-soft);
}

.zan-drawer-title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.zan-drawer-body {
  flex: 1;
  padding: var(--zan-space-5);
  overflow-y: auto;
}

.zan-drawer-footer {
  display: flex;
  gap: var(--zan-space-2);
  justify-content: flex-end;
  padding: var(--zan-space-4) var(--zan-space-5);
  background: var(--zan-surface-2);
  border-top: 1px solid var(--zan-border-soft);
}

/* ---- 全局消息提示 -------------------------------------------------------- */
.zan-toast-container {
  position: fixed;
  z-index: var(--zan-z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.zan-toast-container.position-top-left { top: 20px; left: 20px; }
.zan-toast-container.position-top-center {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}
.zan-toast-container.position-top-right { top: 20px; right: 20px; }
.zan-toast-container.position-bottom-left { bottom: 20px; left: 20px; }
.zan-toast-container.position-bottom-center {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}
.zan-toast-container.position-bottom-right { right: 20px; bottom: 20px; }
.zan-toast-container.position-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.zan-toast {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  overflow: hidden;
  pointer-events: auto;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-lg);
  box-shadow: var(--zan-shadow-lg);
  animation: zan-toast-in var(--zan-duration-slow) var(--zan-ease-out) both;
}

.zan-toast.is-leaving {
  animation: zan-toast-out var(--zan-duration) var(--zan-ease) both;
}

@keyframes zan-toast-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes zan-toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-6px) scale(0.97); }
}

.zan-toast-container[class*="bottom"] .zan-toast {
  animation-name: zan-toast-in-bottom;
}

@keyframes zan-toast-in-bottom {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.zan-toast-icon {
  flex: none;
  margin-top: 1px;
  font-size: 1.0625rem;
  color: var(--zan-primary);
}

.zan-toast-content { flex: 1; min-width: 0; }

.zan-toast-title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--zan-text);
}

.zan-toast-text {
  margin-top: 2px;
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--zan-text-muted);
  word-break: break-word;
}

.zan-toast-text:first-child { margin-top: 0; }

.zan-toast-close {
  flex: none;
  width: 22px;
  height: 22px;
  margin: -2px -4px 0 0;
  color: var(--zan-text-faint);
  border-radius: var(--zan-radius-xs);
}

.zan-toast-close:hover { color: var(--zan-text); background: var(--zan-surface-3); }
.zan-toast-close .zan-icon { font-size: 0.75rem; }

.zan-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--zan-primary);
  transform-origin: left center;
  animation: zan-toast-progress linear forwards;
}

@keyframes zan-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.zan-toast-success .zan-toast-icon { color: var(--zan-success); }
.zan-toast-success .zan-toast-progress { background: var(--zan-success); }
.zan-toast-error .zan-toast-icon { color: var(--zan-danger); }
.zan-toast-error .zan-toast-progress { background: var(--zan-danger); }
.zan-toast-warning .zan-toast-icon { color: var(--zan-warning); }
.zan-toast-warning .zan-toast-progress { background: var(--zan-warning); }
.zan-toast-info .zan-toast-icon { color: var(--zan-info); }
.zan-toast-info .zan-toast-progress { background: var(--zan-info); }

/* ---- 全屏加载 ------------------------------------------------------------ */
.zan-loading-mask {
  position: fixed;
  inset: 0;
  z-index: var(--zan-z-toast);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--zan-mask-soft);
  backdrop-filter: blur(1px);
}

.zan-loading-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  min-width: 120px;
  padding: 18px 24px;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-lg);
  box-shadow: var(--zan-shadow-lg);
}

.zan-loading-box .zan-spinner { width: 24px; height: 24px; }

.zan-loading-text {
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
  white-space: nowrap;
}

/* 局部加载容器 */
.zan-loading-inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--zan-text-muted);
}

/* ---- 文字提示 ------------------------------------------------------------ */
.zan-tooltip {
  position: fixed;
  z-index: var(--zan-z-tooltip);
  max-width: 280px;
  padding: 6px 9px;
  font-size: 0.75rem;
  line-height: 1.55;
  color: #fff;
  white-space: normal;
  pointer-events: none;
  background: #1b2333;
  border-radius: var(--zan-radius-sm);
  box-shadow: var(--zan-shadow-md);
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.96);
  transition: opacity var(--zan-duration-fast) var(--zan-ease),
    transform var(--zan-duration-fast) var(--zan-ease);
}

.zan-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}

.zan-tooltip::after {
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  content: "";
  background: #1b2333;
  transform: rotate(45deg);
}

.zan-tooltip[data-placement="bottom"] {
  transform: translate(-50%, 0) scale(0.96);
}

.zan-tooltip[data-placement="bottom"].is-visible { transform: translate(-50%, 0) scale(1); }

.zan-tooltip[data-placement="bottom"]::after {
  top: -4px;
  bottom: auto;
}

.zan-tooltip[data-placement="left"] {
  transform: translate(-100%, -50%) scale(0.96);
}

.zan-tooltip[data-placement="left"].is-visible { transform: translate(-100%, -50%) scale(1); }

.zan-tooltip[data-placement="left"]::after {
  top: 50%;
  right: -4px;
  bottom: auto;
  left: auto;
  margin-top: -4px;
  margin-left: 0;
}

.zan-tooltip[data-placement="right"] {
  transform: translate(0, -50%) scale(0.96);
}

.zan-tooltip[data-placement="right"].is-visible { transform: translate(0, -50%) scale(1); }

.zan-tooltip[data-placement="right"]::after {
  top: 50%;
  bottom: auto;
  left: -4px;
  margin-top: -4px;
  margin-left: 0;
}

/* ---- 灯箱 ---------------------------------------------------------------- */
.zan-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--zan-z-lightbox);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: rgba(6, 10, 18, 0.94);
}

.zan-lightbox.is-open { display: flex; }

.zan-lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: var(--zan-radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: zan-lightbox-in var(--zan-duration) var(--zan-ease-out) both;
}

@keyframes zan-lightbox-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.zan-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--zan-radius-circle);
}

.zan-lightbox-close:hover { color: #fff; background: rgba(255, 255, 255, 0.16); }

.zan-lightbox-counter {
  position: absolute;
  top: 24px;
  left: 50%;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  transform: translateX(-50%);
}

.zan-lightbox-caption {
  position: absolute;
  right: 48px;
  bottom: 20px;
  left: 48px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.zan-lightbox-nav {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--zan-radius-circle);
  transform: translateY(-50%);
}

.zan-lightbox-nav:hover { color: #fff; background: rgba(255, 255, 255, 0.18); }
.zan-lightbox-nav.is-prev { left: 20px; }
.zan-lightbox-nav.is-next { right: 20px; }

/* ---- 滚动锁定 ------------------------------------------------------------ */
.zan-scroll-lock {
  overflow: hidden;
  padding-right: var(--zan-scrollbar-width, 0);
}

@media (max-width: 640px) {
  .zan-modal { padding: var(--zan-space-3); }
  .zan-modal-dialog { max-height: calc(100vh - 24px); border-radius: var(--zan-radius-lg); }
  .zan-modal-header { padding: var(--zan-space-4) var(--zan-space-4) var(--zan-space-3); }
  .zan-modal-body { padding: 0 var(--zan-space-4) var(--zan-space-4); }
  .zan-modal-footer { padding: var(--zan-space-3) var(--zan-space-4); }
  .zan-toast-container.position-top-left,
  .zan-toast-container.position-top-right { top: 12px; right: 12px; left: 12px; width: auto; }
  .zan-toast-container.position-bottom-left,
  .zan-toast-container.position-bottom-right { right: 12px; bottom: 12px; left: 12px; width: auto; }
  .zan-lightbox { padding: 16px; }
}

/* ==========================================================================
   10 · 交互组件（Carousel / Collapse / Rating / Upload / Stepper / Marquee）
   ========================================================================== */

/* ---- 轮播图 -------------------------------------------------------------- */
.zan-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--zan-gray-900);
  border-radius: var(--zan-radius-lg);
  aspect-ratio: 16 / 9;
  touch-action: pan-y;
  user-select: none;
}

.zan-carousel-track {
  display: flex;
  height: 100%;
  transition: transform var(--zan-duration-slow) var(--zan-ease-out);
  will-change: transform;
}

.zan-carousel-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}

.zan-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zan-carousel-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 44px 24px 20px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
}

.zan-carousel-caption h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}

.zan-carousel-caption p {
  margin-top: 4px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
}

/* 渐隐模式 */
.zan-carousel-fade .zan-carousel-track { display: block; }

.zan-carousel-fade .zan-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--zan-duration-slow) var(--zan-ease);
}

.zan-carousel-fade .zan-carousel-slide.is-active { opacity: 1; }

/* 箭头 */
.zan-carousel-arrow {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.32);
  border-radius: var(--zan-radius-circle);
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity var(--zan-duration) var(--zan-ease),
    background var(--zan-duration-fast) var(--zan-ease);
  backdrop-filter: blur(4px);
}

.zan-carousel:hover .zan-carousel-arrow,
.zan-carousel-arrow:focus-visible { opacity: 1; }

.zan-carousel-arrow:hover { background: rgba(0, 0, 0, 0.55); }

.zan-carousel-arrow.is-prev { left: 14px; }
.zan-carousel-arrow.is-next { right: 14px; }

/* 指示点 */
.zan-carousel-indicators {
  position: absolute;
  bottom: 14px;
  left: 50%;
  z-index: 2;
  display: flex;
  gap: 6px;
  align-items: center;
  transform: translateX(-50%);
}

.zan-carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--zan-radius-pill);
  transition: all var(--zan-duration) var(--zan-ease);
}

.zan-carousel-dot:hover { background: rgba(255, 255, 255, 0.75); }

.zan-carousel-dot.is-active {
  width: 18px;
  background: #fff;
}

/* 卡片式轮播（列表场景） */
.zan-carousel-cards .zan-carousel { background: transparent; aspect-ratio: auto; }

/* ---- 折叠面板 ------------------------------------------------------------ */
.zan-collapse {
  overflow: hidden;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-lg);
}

.zan-collapse-item + .zan-collapse-item { border-top: 1px solid var(--zan-border-soft); }

.zan-collapse-header {
  display: flex;
  gap: var(--zan-space-3);
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px var(--zan-space-4);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--zan-text);
  text-align: left;
  cursor: pointer;
  background: transparent;
  transition: background var(--zan-duration-fast) var(--zan-ease);
}

.zan-collapse-header:hover { background: var(--zan-surface-2); }

.zan-collapse-header .zan-icon {
  flex: none;
  font-size: 0.875rem;
  color: var(--zan-text-faint);
  transition: transform var(--zan-duration) var(--zan-ease);
}

.zan-collapse-item.is-open .zan-collapse-header .zan-icon { transform: rotate(180deg); }

.zan-collapse-body {
  height: 0;
  overflow: hidden;
  transition: height var(--zan-duration) var(--zan-ease-out);
}

.zan-collapse-inner {
  padding: 0 var(--zan-space-4) var(--zan-space-4);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--zan-text-secondary);
}

.zan-collapse-item.is-open .zan-collapse-body { height: auto; }

.zan-collapse-arrow-left .zan-collapse-header { flex-direction: row-reverse; justify-content: flex-end; }

.zan-collapse-ghost {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.zan-collapse-ghost .zan-collapse-item + .zan-collapse-item { border-top: 1px solid var(--zan-border-soft); }

/* ---- 评分 ---------------------------------------------------------------- */
.zan-rating {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  line-height: 1;
  vertical-align: middle;
}

.zan-rating-item {
  padding: 2px;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--zan-text-faint);
  cursor: pointer;
  background: transparent;
  opacity: 0.45;
  transition: color var(--zan-duration-fast) var(--zan-ease),
    opacity var(--zan-duration-fast) var(--zan-ease),
    transform var(--zan-duration-fast) var(--zan-ease);
}

.zan-rating-item:hover { transform: scale(1.1); }

.zan-rating-item.is-on {
  color: var(--zan-warning);
  opacity: 1;
}

.zan-rating.is-readonly .zan-rating-item { cursor: default; }
.zan-rating.is-readonly .zan-rating-item:hover { transform: none; }

.zan-rating-text {
  margin-left: 6px;
  font-size: 0.75rem;
  color: var(--zan-text-muted);
}

.zan-rating-lg .zan-rating-item { font-size: 1.375rem; }
.zan-rating-sm .zan-rating-item { font-size: 0.9375rem; }

/* ---- 上传 ---------------------------------------------------------------- */
.zan-upload {
  display: block;
  width: 100%;
}

.zan-upload-area {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--zan-surface-2);
  border: 1px dashed var(--zan-border-strong);
  border-radius: var(--zan-radius-md);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-upload-area:hover,
.zan-upload.is-dragover .zan-upload-area {
  background: var(--zan-primary-soft);
  border-color: var(--zan-primary);
}

.zan-upload-area .zan-icon {
  font-size: 1.5rem;
  color: var(--zan-text-muted);
}

.zan-upload-area:hover .zan-icon { color: var(--zan-primary); }

.zan-upload-text {
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
}

.zan-upload-hint {
  font-size: 0.6875rem;
  color: var(--zan-text-faint);
}

.zan-upload input[type="file"] { display: none; }

.zan-upload-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.zan-upload-item {
  position: relative;
  width: 88px;
  height: 88px;
  overflow: hidden;
  background: var(--zan-surface-3);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-md);
}

.zan-upload-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zan-upload-item-file {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 6px;
  font-size: 0.625rem;
  color: var(--zan-text-muted);
  text-align: center;
}

.zan-upload-item-file .zan-icon { font-size: 1.375rem; }

.zan-upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 0.625rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: var(--zan-radius-circle);
  opacity: 0;
  transition: opacity var(--zan-duration-fast) var(--zan-ease);
}

.zan-upload-item:hover .zan-upload-remove { opacity: 1; }

.zan-upload-item-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--zan-border);
}

.zan-upload-item-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--zan-primary);
  transition: width var(--zan-duration) linear;
}

/* 头像上传 */
.zan-upload-avatar .zan-upload-area {
  width: 96px;
  height: 96px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--zan-radius-circle);
}

.zan-upload-avatar .zan-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- 数字步进器 ---------------------------------------------------------- */
.zan-stepper {
  display: inline-flex;
  align-items: stretch;
  height: var(--zan-control-height);
  overflow: hidden;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-control-radius);
}

.zan-stepper:focus-within {
  border-color: var(--zan-primary);
  box-shadow: var(--zan-focus-ring);
}

.zan-stepper-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  font-size: 1rem;
  color: var(--zan-text-secondary);
  background: var(--zan-surface-2);
  cursor: pointer;
}

.zan-stepper-btn:hover { color: var(--zan-primary); background: var(--zan-primary-soft); }

.zan-stepper-btn:disabled { color: var(--zan-text-faint); cursor: not-allowed; background: var(--zan-surface-2); }

.zan-stepper-input {
  width: 52px;
  min-width: 40px;
  padding: 0 4px;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  background: var(--zan-surface);
  border: 0;
  border-right: 1px solid var(--zan-border-soft);
  border-left: 1px solid var(--zan-border-soft);
  outline: 0;
}

.zan-stepper-input::-webkit-outer-spin-button,
.zan-stepper-input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

.zan-stepper-sm { height: var(--zan-control-height-sm); }
.zan-stepper-sm .zan-stepper-btn { width: 26px; }
.zan-stepper-sm .zan-stepper-input { width: 42px; font-size: 0.75rem; }

/* ---- 倒计时 -------------------------------------------------------------- */
.zan-countdown {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.zan-countdown-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 6px 6px 4px;
  color: var(--zan-text);
  background: var(--zan-surface-2);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-sm);
}

.zan-countdown-num {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.1;
}

.zan-countdown-unit {
  font-size: 0.625rem;
  color: var(--zan-text-faint);
}

.zan-countdown-sep {
  font-size: 1rem;
  color: var(--zan-text-faint);
}

.zan-countdown-plain .zan-countdown-item {
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.zan-countdown-plain .zan-countdown-num { font-size: 0.875rem; }
.zan-countdown-plain .zan-countdown-unit {
  display: none;
}

/* ---- 循环滚动 ------------------------------------------------------------ */
.zan-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
}

.zan-marquee-track {
  display: inline-flex;
  gap: 0;
  animation: zan-marquee linear infinite;
  will-change: transform;
}

.zan-marquee:hover .zan-marquee-track { animation-play-state: paused; }

@keyframes zan-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.zan-marquee-item {
  padding-right: 32px;
  font-size: 0.8125rem;
  color: var(--zan-text-secondary);
}

/* ---- 吸顶 ---------------------------------------------------------------- */
.zan-sticky {
  position: sticky;
  top: 0;
  z-index: var(--zan-z-sticky);
}

.zan-sticky.is-stuck {
  box-shadow: var(--zan-shadow-md);
}

/* ---- 列表筛选 / 排序 ----------------------------------------------------- */
.zan-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zan-space-3);
  align-items: center;
  padding: var(--zan-space-3) var(--zan-space-4);
  font-size: 0.8125rem;
  background: var(--zan-surface);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-md);
}

.zan-filter-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  font-size: 0.75rem;
  color: var(--zan-text-secondary);
  cursor: pointer;
  background: var(--zan-surface-2);
  border: 1px solid var(--zan-border);
  border-radius: var(--zan-radius-pill);
  transition: all var(--zan-duration-fast) var(--zan-ease);
}

.zan-filter-chip:hover { color: var(--zan-primary); border-color: var(--zan-primary-line); }

.zan-filter-chip.is-active {
  color: var(--zan-primary);
  background: var(--zan-primary-soft);
  border-color: var(--zan-primary-line);
}

.zan-sort-bar {
  display: flex;
  gap: 2px;
  align-items: center;
  font-size: 0.75rem;
}

.zan-sort-item {
  padding: 6px 10px;
  color: var(--zan-text-muted);
  cursor: pointer;
  border-radius: var(--zan-radius-sm);
}

.zan-sort-item:hover { color: var(--zan-text); background: var(--zan-surface-2); }

.zan-sort-item.is-active { color: var(--zan-primary); background: var(--zan-primary-soft); }

.zan-sort-item.is-asc::after { content: " ↑"; }
.zan-sort-item.is-desc::after { content: " ↓"; }

/* ---- 滚动进入动画 -------------------------------------------------------- */
.zan-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--zan-duration-slow) var(--zan-ease-out),
    transform var(--zan-duration-slow) var(--zan-ease-out);
}

.zan-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.zan-reveal-left { transform: translateX(-16px); }
.zan-reveal-right { transform: translateX(16px); }
.zan-reveal-zoom { transform: scale(0.96); }

/* ---- 页面骨架（双侧栏 CMS 场景） ----------------------------------------- */
.zan-content-narrow { max-width: 860px; margin: 0 auto; }

.zan-overflow-fade {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
}

/* ==========================================================================
   11 · 工具类与动效（Utilities & Animations）
   ========================================================================== */

/* ---- 显示 ---------------------------------------------------------------- */
.zan-block { display: block; }
.zan-inline { display: inline; }
.zan-inline-block { display: inline-block; }
.zan-flex { display: flex; }
.zan-inline-flex { display: inline-flex; }
.zan-grid-el { display: grid; }
.zan-none { display: none; }

.zan-flex-row { flex-direction: row; }
.zan-flex-column { flex-direction: column; }
.zan-flex-wrap { flex-wrap: wrap; }
.zan-flex-nowrap { flex-wrap: nowrap; }

.zan-items-start { align-items: flex-start; }
.zan-items-center { align-items: center; }
.zan-items-end { align-items: flex-end; }
.zan-items-stretch { align-items: stretch; }

.zan-justify-start { justify-content: flex-start; }
.zan-justify-center { justify-content: center; }
.zan-justify-end { justify-content: flex-end; }
.zan-justify-between { justify-content: space-between; }
.zan-justify-around { justify-content: space-around; }

.zan-flex-1 { flex: 1 1 0%; min-width: 0; }
.zan-flex-none { flex: none; }
.zan-self-start { align-self: flex-start; }
.zan-self-center { align-self: center; }
.zan-self-end { align-self: flex-end; }

.zan-space-between { display: flex; align-items: center; justify-content: space-between; }
.zan-space-center { display: flex; align-items: center; justify-content: center; }

/* ---- 尺寸 ---------------------------------------------------------------- */
.zan-w-full { width: 100%; }
.zan-w-auto { width: auto; }
.zan-w-half { width: 50%; }
.zan-h-full { height: 100%; }
.zan-min-h-screen { min-height: 100vh; }

.zan-max-w-sm { max-width: 480px; }
.zan-max-w-md { max-width: 720px; }
.zan-max-w-lg { max-width: 960px; }
.zan-max-w-xl { max-width: 1200px; }

.zan-ratio-1-1 { aspect-ratio: 1 / 1; }
.zan-ratio-4-3 { aspect-ratio: 4 / 3; }
.zan-ratio-16-9 { aspect-ratio: 16 / 9; }
.zan-ratio-3-4 { aspect-ratio: 3 / 4; }
.zan-ratio-9-16 { aspect-ratio: 9 / 16; }

.zan-object-cover { object-fit: cover; }
.zan-object-contain { object-fit: contain; }
.zan-rounded { border-radius: var(--zan-radius-md); }
.zan-rounded-lg { border-radius: var(--zan-radius-lg); }
.zan-rounded-full { border-radius: var(--zan-radius-pill); }
.zan-circle { border-radius: var(--zan-radius-circle); }

/* ---- 定位 ---------------------------------------------------------------- */
.zan-relative { position: relative; }
.zan-absolute { position: absolute; }
.zan-fixed { position: fixed; }
.zan-sticky-top { position: sticky; top: 0; }

.zan-inset-0 { inset: 0; }
.zan-top-0 { top: 0; }
.zan-right-0 { right: 0; }
.zan-bottom-0 { bottom: 0; }
.zan-left-0 { left: 0; }

.zan-overflow-hidden { overflow: hidden; }
.zan-overflow-auto { overflow: auto; }
.zan-overflow-x-auto { overflow-x: auto; }

.zan-z-1 { z-index: 1; }
.zan-z-10 { z-index: 10; }
.zan-z-50 { z-index: 50; }

/* ---- 边框 / 背景 / 阴影 -------------------------------------------------- */
.zan-border { border: 1px solid var(--zan-border); }
.zan-border-0 { border: 0; }
.zan-border-top { border-top: 1px solid var(--zan-border); }
.zan-border-bottom { border-bottom: 1px solid var(--zan-border); }

.zan-bg-surface { background: var(--zan-surface); }
.zan-bg-soft { background: var(--zan-surface-2); }
.zan-bg-primary { background: var(--zan-primary); }
.zan-bg-primary-soft { background: var(--zan-primary-soft); }
.zan-bg-success-soft { background: var(--zan-success-soft); }
.zan-bg-warning-soft { background: var(--zan-warning-soft); }
.zan-bg-danger-soft { background: var(--zan-danger-soft); }
.zan-bg-transparent { background: transparent; }

.zan-shadow-none { box-shadow: none; }
.zan-shadow-xs { box-shadow: var(--zan-shadow-xs); }
.zan-shadow-sm { box-shadow: var(--zan-shadow-sm); }
.zan-shadow-md { box-shadow: var(--zan-shadow-md); }
.zan-shadow-lg { box-shadow: var(--zan-shadow-lg); }

.zan-opacity-0 { opacity: 0; }
.zan-opacity-50 { opacity: 0.5; }
.zan-opacity-75 { opacity: 0.75; }
.zan-opacity-100 { opacity: 1; }

.zan-cursor-pointer { cursor: pointer; }
.zan-cursor-default { cursor: default; }
.zan-pointer-events-none { pointer-events: none; }
.zan-select-none { user-select: none; }

.zan-transition {
  transition: all var(--zan-duration) var(--zan-ease);
}

.zan-hover-lift {
  transition: transform var(--zan-duration) var(--zan-ease),
    box-shadow var(--zan-duration) var(--zan-ease);
}

.zan-hover-lift:hover {
  box-shadow: var(--zan-shadow-md);
  transform: translateY(-2px);
}

.zan-hover-scale {
  transition: transform var(--zan-duration) var(--zan-ease);
}

.zan-hover-scale:hover { transform: scale(1.03); }

/* ---- 渐变色 -------------------------------------------------------------- */
.zan-gradient-primary {
  background-image: linear-gradient(135deg, var(--zan-brand-500), var(--zan-brand-700));
}

.zan-gradient-soft {
  background-image: linear-gradient(135deg, var(--zan-brand-50), var(--zan-surface));
}

[data-theme="dark"] .zan-gradient-soft {
  background-image: linear-gradient(135deg, rgba(91, 91, 247, 0.16), var(--zan-surface));
}

/* ---- 动效 ---------------------------------------------------------------- */
.zan-animate-fade { animation: zan-fade-in var(--zan-duration-slow) var(--zan-ease) both; }
.zan-animate-up { animation: zan-fade-up var(--zan-duration-slow) var(--zan-ease-out) both; }
.zan-animate-down { animation: zan-fade-down var(--zan-duration-slow) var(--zan-ease-out) both; }
.zan-animate-left { animation: zan-fade-left var(--zan-duration-slow) var(--zan-ease-out) both; }
.zan-animate-right { animation: zan-fade-right var(--zan-duration-slow) var(--zan-ease-out) both; }
.zan-animate-zoom { animation: zan-zoom-in var(--zan-duration-slow) var(--zan-ease-out) both; }

.zan-animate-shake { animation: zan-shake 0.5s var(--zan-ease) both; }
.zan-animate-pulse { animation: zan-pulse 2s var(--zan-ease) infinite; }
.zan-animate-float { animation: zan-float 4s ease-in-out infinite; }
.zan-animate-spin { animation: zan-spin 1s linear infinite; }

/* 延迟（毫秒语义的编号） */
.zan-delay-1 { animation-delay: 100ms !important; }
.zan-delay-2 { animation-delay: 200ms !important; }
.zan-delay-3 { animation-delay: 300ms !important; }
.zan-delay-4 { animation-delay: 400ms !important; }
.zan-delay-5 { animation-delay: 500ms !important; }
.zan-delay-6 { animation-delay: 600ms !important; }

@keyframes zan-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zan-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes zan-fade-down {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: none; }
}

@keyframes zan-fade-left {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes zan-fade-right {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: none; }
}

@keyframes zan-zoom-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes zan-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

@keyframes zan-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes zan-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---- 减少动态效果 -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==========================================================================
   12 · 图标（Icons）
   图标以 24×24 网格绘制，由 JS 注入内联 SVG，无字体、无额外请求。
   用法：<i class="zan-icon zan-icon-search"></i>，颜色随 currentColor。
   ========================================================================== */

.zan-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  line-height: 0;
  vertical-align: -0.125em;
  color: inherit;
}

.zan-icon > svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.zan-icon-sm { font-size: 0.875rem; }
.zan-icon-md { font-size: 1.125rem; }
.zan-icon-lg { font-size: 1.375rem; }
.zan-icon-xl { font-size: 1.75rem; }

