/* ============================================================================
   AutFeng Hub — Design System v1.0
   主色沿用 AutFeng 品牌 teal 体系（#39C5BB / #66CCFF），Light 玻璃拟态 + Dark 深空
   加载顺序：tailwind CDN -> theme.css（组件层用 :where() 保持 0 特异性，工具类可覆盖）
   ========================================================================== */

/* ---------------------------------------------------------------- Tokens -- */
:root {
  /* 品牌 */
  --af-brand: #39C5BB;
  --af-brand-600: #2AB3A9;
  --af-brand-700: #1A8C85;
  --af-brand-050: #EDFCFB;
  --af-sky: #66CCFF;
  --af-sky-600: #3FB2EE;
  --af-sky-700: #1A7AAA;
  --af-grad: linear-gradient(90deg, #39C5BB 0%, #66CCFF 100%);
  --af-grad-135: linear-gradient(135deg, #39C5BB 0%, #66CCFF 100%);
  --af-grad-vivid: linear-gradient(135deg, #2AB8AE 0%, #4AB8E8 60%, #66CCFF 100%);

  /* 语义色 */
  --af-success: #16A34A;
  --af-success-bg: rgba(22, 163, 74, .12);
  --af-warn: #D97706;
  --af-warn-bg: rgba(217, 119, 6, .13);
  --af-danger: #E05656;
  --af-danger-bg: rgba(224, 86, 86, .12);
  --af-info: #2C7FD9;
  --af-info-bg: rgba(44, 127, 217, .12);
  --af-vip: #B4881F;
  --af-vip-bg: rgba(214, 168, 52, .16);

  /* 文本 / 描边 / 面板（Light） */
  --af-text: #0D2E2D;
  --af-text-2: #3D6462;
  --af-text-3: #5A8A88;
  --af-text-4: #8FB4B2;
  --af-line: rgba(57, 197, 187, .18);
  --af-line-strong: rgba(57, 197, 187, .32);
  --af-panel: rgba(255, 255, 255, .74);
  --af-panel-2: rgba(255, 255, 255, .56);
  --af-panel-3: rgba(255, 255, 255, .42);
  --af-solid: #FFFFFF;
  --af-bg: linear-gradient(160deg, #EDFCFB 0%, #F3FBFF 52%, #F0F8FF 100%);
  --af-bg-flat: #F2FBFA;
  --af-fill: rgba(57, 197, 187, .09);
  --af-fill-2: rgba(57, 197, 187, .14);

  /* 阴影 */
  --af-sh-1: 0 1px 2px rgba(13, 46, 45, .04), 0 2px 12px rgba(57, 197, 187, .07);
  --af-sh-2: 0 2px 6px rgba(13, 46, 45, .05), 0 8px 28px rgba(57, 197, 187, .11);
  --af-sh-3: 0 8px 20px rgba(13, 46, 45, .08), 0 24px 60px rgba(57, 197, 187, .15);
  --af-sh-brand: 0 6px 20px rgba(57, 197, 187, .32);

  /* 圆角 / 间距节奏 */
  --af-r-sm: 10px;
  --af-r: 14px;
  --af-r-lg: 18px;
  --af-r-xl: 24px;
  --af-blur: 20px;

  /* z-index 阶梯 */
  --z-base: 1;
  --z-sticky: 10;
  --z-nav: 20;
  --z-dropdown: 30;
  --z-overlay: 40;
  --z-modal: 50;
  --z-toast: 60;

  /* 动效 */
  --af-ease: cubic-bezier(.22, 1, .36, 1);
  --af-dur: 220ms;

  /* 布局 */
  --af-shell: 1240px;
  --af-nav-h: 60px;
  /* 顶栏移动端多一行导航滑轨 */
  --af-nav-h-m: 100px;
  /* 宿主 App 底部 tab 的避让高度。站内不再有底栏；
     独立浏览器打开时宿主没有底栏，可覆盖为 0px。 */
  --af-host-tab: 56px;
  --af-side-w: 248px;
  --af-safe-b: env(safe-area-inset-bottom, 0px);
  --af-safe-t: env(safe-area-inset-top, 0px);
}

[data-theme="dark"] {
  --af-brand: #45D6CB;
  --af-brand-600: #39C5BB;
  --af-brand-700: #7FE6DD;
  --af-brand-050: rgba(69, 214, 203, .12);
  --af-sky: #78D2FF;
  --af-sky-700: #A6E2FF;

  --af-success: #4ADE80;
  --af-success-bg: rgba(74, 222, 128, .16);
  --af-warn: #FBBF24;
  --af-warn-bg: rgba(251, 191, 36, .16);
  --af-danger: #FF7B7B;
  --af-danger-bg: rgba(255, 123, 123, .16);
  --af-info: #6BB4FF;
  --af-info-bg: rgba(107, 180, 255, .16);
  --af-vip: #F0CE6A;
  --af-vip-bg: rgba(240, 206, 106, .18);

  --af-text: #E8F6F5;
  --af-text-2: #A8CBC8;
  --af-text-3: #7FA6A3;
  --af-text-4: #5C807E;
  --af-line: rgba(69, 214, 203, .16);
  --af-line-strong: rgba(69, 214, 203, .3);
  --af-panel: rgba(16, 34, 38, .72);
  --af-panel-2: rgba(16, 34, 38, .55);
  --af-panel-3: rgba(16, 34, 38, .4);
  --af-solid: #0E1F23;
  --af-bg: radial-gradient(1200px 600px at 12% -8%, rgba(57, 197, 187, .16), transparent 60%),
           radial-gradient(900px 520px at 92% 8%, rgba(102, 204, 255, .13), transparent 62%),
           linear-gradient(165deg, #08171A 0%, #0A1D22 52%, #071417 100%);
  --af-bg-flat: #0A1B1F;
  --af-fill: rgba(69, 214, 203, .1);
  --af-fill-2: rgba(69, 214, 203, .16);

  --af-sh-1: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 14px rgba(0, 0, 0, .24);
  --af-sh-2: 0 4px 10px rgba(0, 0, 0, .34), 0 12px 34px rgba(0, 0, 0, .3);
  --af-sh-3: 0 10px 26px rgba(0, 0, 0, .42), 0 30px 70px rgba(0, 0, 0, .38);
  --af-sh-brand: 0 6px 22px rgba(57, 197, 187, .28);
}

/* ------------------------------------------------------------------ Base -- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--af-bg);
  background-attachment: fixed;
  color: var(--af-text);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--af-dur) var(--af-ease), color var(--af-dur) var(--af-ease);
}

h1, h2, h3, h4, h5, .af-display {
  font-family: 'Outfit', -apple-system, 'PingFang SC', 'Noto Sans SC', sans-serif;
  letter-spacing: -.015em;
  line-height: 1.25;
  margin: 0;
  font-weight: 600;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, video, canvas { display: block; max-width: 100%; }
::selection { background: rgba(57, 197, 187, .26); }
.tnum { font-variant-numeric: tabular-nums; }
.af-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* 滚动条 */
.af-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.af-scroll::-webkit-scrollbar-track { background: transparent; }
.af-scroll::-webkit-scrollbar-thumb { background: var(--af-line-strong); border-radius: 99px; }
.af-scroll::-webkit-scrollbar-thumb:hover { background: var(--af-brand); }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 焦点可见性（a11y：键盘导航必须可见） */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--af-brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ------------------------------------------------------------- 背景光斑 -- */
.af-aura { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.af-aura i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(80px); opacity: .18;
}
[data-theme="dark"] .af-aura i { opacity: .26; filter: blur(96px); }
.af-aura i:nth-child(1) { width: 34vw; height: 34vw; min-width: 260px; min-height: 260px; left: -8vw; top: -6vw; background: #39C5BB; }
.af-aura i:nth-child(2) { width: 30vw; height: 30vw; min-width: 220px; min-height: 220px; right: -7vw; top: 4vh; background: #66CCFF; }
.af-aura i:nth-child(3) { width: 28vw; height: 28vw; min-width: 200px; min-height: 200px; left: -6vw; top: 52%; background: #39C5BB; opacity: .12; }
.af-aura i:nth-child(4) { width: 26vw; height: 26vw; min-width: 200px; min-height: 200px; right: -6vw; bottom: -4vh; background: #66CCFF; }
/* 细网格纹理，增加“工具型产品”质感 */
.af-grid-tex::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--af-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--af-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 12%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 12%, transparent 72%);
  opacity: .5;
}

/* ------------------------------------------------------------ 玻璃面板 -- */
:where(.af-glass) {
  background: var(--af-panel);
  backdrop-filter: blur(var(--af-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--af-blur)) saturate(180%);
  border: 1px solid var(--af-line);
  box-shadow: var(--af-sh-1);
  border-radius: var(--af-r-lg);
}
:where(.af-glass-2) {
  background: var(--af-panel-2);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--af-line);
  border-radius: var(--af-r);
}
:where(.af-glass-3) {
  background: var(--af-panel-3);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--af-line);
  border-radius: var(--af-r);
}
:where(.af-solid-card) {
  background: var(--af-solid);
  border: 1px solid var(--af-line);
  border-radius: var(--af-r-lg);
  box-shadow: var(--af-sh-1);
}
/* 可点击卡片：hover 只改颜色/阴影/边框，绝不用 scale 造成布局抖动 */
.af-card-i { cursor: pointer; transition: box-shadow var(--af-dur) var(--af-ease), border-color var(--af-dur) var(--af-ease), transform var(--af-dur) var(--af-ease); }
.af-card-i:hover { box-shadow: var(--af-sh-2); border-color: var(--af-line-strong); transform: translateY(-2px); }
.af-card-i:active { transform: translateY(0); }

/* ---------------------------------------------------------------- 文字 -- */
.af-t1 { color: var(--af-text); }
.af-t2 { color: var(--af-text-2); }
.af-t3 { color: var(--af-text-3); }
.af-t4 { color: var(--af-text-4); }
.af-brandtext { color: var(--af-brand-700); }
.af-gradtext {
  background: var(--af-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.af-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--af-brand-700);
}
.af-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.af-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.af-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* --------------------------------------------------------------- 按钮 -- */
:where(.af-btn) {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--h); min-height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
  background: var(--af-fill); color: var(--af-text);
  transition: background var(--af-dur) var(--af-ease), color var(--af-dur) var(--af-ease),
              border-color var(--af-dur) var(--af-ease), box-shadow var(--af-dur) var(--af-ease), opacity var(--af-dur);
  position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent;
}
.af-btn:disabled, .af-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.af-btn-primary { background: var(--af-grad); color: #fff; box-shadow: var(--af-sh-brand); }
.af-btn-primary:hover:not(:disabled) { box-shadow: 0 8px 26px rgba(57, 197, 187, .42); filter: saturate(115%); }
.af-btn-cta { background: linear-gradient(90deg, #16A34A, #34C77B); color: #fff; box-shadow: 0 6px 20px rgba(22, 163, 74, .3); }
.af-btn-cta:hover:not(:disabled) { filter: saturate(115%); }
.af-btn-ghost { background: var(--af-panel-2); border-color: var(--af-line); color: var(--af-text-2); backdrop-filter: blur(10px); }
.af-btn-ghost:hover:not(:disabled) { border-color: var(--af-brand); color: var(--af-brand-700); background: var(--af-fill); }
.af-btn-outline { background: transparent; border-color: var(--af-line-strong); color: var(--af-brand-700); }
.af-btn-outline:hover:not(:disabled) { background: var(--af-fill); border-color: var(--af-brand); }
.af-btn-quiet { background: transparent; color: var(--af-text-3); }
.af-btn-quiet:hover:not(:disabled) { background: var(--af-fill); color: var(--af-text); }
.af-btn-danger { background: var(--af-danger); color: #fff; }
.af-btn-danger:hover:not(:disabled) { filter: brightness(1.06); }
.af-btn-sm { --h: 32px; min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.af-btn-lg { --h: 48px; min-height: 48px; padding: 0 24px; font-size: 15px; }
.af-btn-block { width: 100%; }
/* 图标按钮：保证 44x44 触控区（移动端 a11y 硬指标） */
:where(.af-iconbtn) {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; min-width: 40px; border-radius: 999px;
  border: 1px solid transparent; background: var(--af-panel-2); color: var(--af-text-2);
  cursor: pointer; transition: all var(--af-dur) var(--af-ease);
  backdrop-filter: blur(10px); -webkit-tap-highlight-color: transparent;
}
.af-iconbtn:hover { color: var(--af-brand-700); background: var(--af-fill-2); border-color: var(--af-line); }
.af-iconbtn-lined { border-color: var(--af-line); }
@media (pointer: coarse) {
  .af-iconbtn { width: 44px; height: 44px; min-width: 44px; }
  .af-btn { min-height: 44px; }
  .af-btn-sm { min-height: 38px; }
}
/* 点击涟漪 */
.af-ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.5); animation: af-ripple .55s var(--af-ease); pointer-events: none; }
[data-theme="dark"] .af-ripple { background: rgba(255,255,255,.25); }
@keyframes af-ripple { to { transform: scale(2.6); opacity: 0; } }

/* --------------------------------------------------------------- 徽标 -- */
:where(.af-chip) {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.7;
  background: var(--af-fill); color: var(--af-brand-700); border: 1px solid var(--af-line);
}
.af-chip-brand { background: linear-gradient(90deg, rgba(57,197,187,.16), rgba(102,204,255,.16)); color: var(--af-brand-700); border-color: var(--af-line-strong); }
.af-chip-success { background: var(--af-success-bg); color: var(--af-success); border-color: transparent; }
.af-chip-warn { background: var(--af-warn-bg); color: var(--af-warn); border-color: transparent; }
.af-chip-danger { background: var(--af-danger-bg); color: var(--af-danger); border-color: transparent; }
.af-chip-info { background: var(--af-info-bg); color: var(--af-info); border-color: transparent; }
.af-chip-vip { background: var(--af-vip-bg); color: var(--af-vip); border-color: rgba(214,168,52,.3); }
.af-chip-plain { background: var(--af-panel-3); color: var(--af-text-3); }
/* 状态点：颜色以外再加形状/文字，避免“仅靠颜色传达信息” */
.af-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.af-dot-live { background: var(--af-success); box-shadow: 0 0 0 3px var(--af-success-bg); }
.af-dot-busy { background: var(--af-warn); box-shadow: 0 0 0 3px var(--af-warn-bg); }
.af-dot-off { background: var(--af-text-4); }

/* 分段选择 / 标签滚动条 */
.af-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--af-fill); border: 1px solid var(--af-line); }
.af-seg > button {
  border: 0; background: transparent; cursor: pointer; border-radius: 999px;
  padding: 7px 15px; font-size: 13px; font-weight: 600; color: var(--af-text-3);
  transition: all var(--af-dur) var(--af-ease); min-height: 34px;
}
.af-seg > button[aria-selected="true"] { background: var(--af-solid); color: var(--af-brand-700); box-shadow: var(--af-sh-1); }
[data-theme="dark"] .af-seg > button[aria-selected="true"] { background: rgba(69,214,203,.18); }
.af-pillbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.af-pillbar > * { scroll-snap-align: start; flex: none; }
.af-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; min-height: 38px;
  border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--af-panel-2); border: 1px solid var(--af-line); color: var(--af-text-3);
  transition: all var(--af-dur) var(--af-ease); white-space: nowrap;
}
.af-pill:hover { color: var(--af-brand-700); border-color: var(--af-brand); }
.af-pill[aria-pressed="true"], .af-pill.is-on { background: var(--af-grad); color: #fff; border-color: transparent; box-shadow: var(--af-sh-brand); }

/* --------------------------------------------------------------- 表单 -- */
.af-label { display: block; font-size: 13px; font-weight: 600; color: var(--af-text-2); margin-bottom: 7px; }
.af-req::after { content: '*'; color: var(--af-danger); margin-left: 3px; }
:where(.af-input, .af-select, .af-textarea) {
  width: 100%; min-height: 44px; padding: 11px 14px;
  background: var(--af-panel-2); border: 1px solid var(--af-line);
  border-radius: var(--af-r); color: var(--af-text); font-size: 14px;
  transition: border-color var(--af-dur), box-shadow var(--af-dur), background var(--af-dur);
  -webkit-appearance: none; appearance: none;
}
.af-textarea { min-height: 108px; resize: vertical; line-height: 1.6; }
.af-input::placeholder, .af-textarea::placeholder { color: var(--af-text-4); }
.af-input:focus, .af-select:focus, .af-textarea:focus {
  outline: none; border-color: var(--af-brand);
  box-shadow: 0 0 0 3px rgba(57, 197, 187, .18); background: var(--af-solid);
}
.af-input[aria-invalid="true"], .af-textarea[aria-invalid="true"] { border-color: var(--af-danger); box-shadow: 0 0 0 3px var(--af-danger-bg); }
.af-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A8A88' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 17px; padding-right: 38px;
}
.af-hint { font-size: 12px; color: var(--af-text-3); margin-top: 6px; }
.af-err { font-size: 12px; color: var(--af-danger); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.af-field-icon { position: relative; }
.af-field-icon > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--af-text-4); pointer-events: none; }
.af-field-icon > .af-input { padding-left: 40px; }

/* 开关 */
.af-switch { position: relative; display: inline-flex; align-items: center; width: 46px; height: 27px; border-radius: 999px; cursor: pointer; border: 0; background: var(--af-fill-2); transition: background var(--af-dur) var(--af-ease); flex: none; }
.af-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.22); transition: left var(--af-dur) var(--af-ease); }
.af-switch[aria-checked="true"] { background: var(--af-brand); }
.af-switch[aria-checked="true"]::after { left: 22px; }

/* 复选 / 单选卡 */
.af-optcard {
  position: relative; display: flex; gap: 11px; padding: 14px;
  border-radius: var(--af-r); border: 1px solid var(--af-line);
  background: var(--af-panel-2); cursor: pointer; transition: all var(--af-dur) var(--af-ease);
}
.af-optcard:hover { border-color: var(--af-brand); background: var(--af-fill); }
.af-optcard[aria-checked="true"] { border-color: var(--af-brand); background: var(--af-fill-2); box-shadow: 0 0 0 1px var(--af-brand) inset; }
.af-optcard[aria-checked="true"]::after {
  content: ''; position: absolute; right: 12px; top: 12px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--af-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* 上传拖拽区 */
.af-drop {
  display: grid; place-items: center; gap: 10px; padding: 34px 20px; text-align: center;
  border: 1.5px dashed var(--af-line-strong); border-radius: var(--af-r-lg);
  background: var(--af-panel-3); cursor: pointer; transition: all var(--af-dur) var(--af-ease);
}
.af-drop:hover, .af-drop.is-over { border-color: var(--af-brand); background: var(--af-fill); }
.af-drop.is-over { box-shadow: 0 0 0 4px rgba(57,197,187,.14); }

/* --------------------------------------------------------------- 表格 -- */
.af-table-wrap { overflow-x: auto; border-radius: var(--af-r-lg); border: 1px solid var(--af-line); background: var(--af-panel); backdrop-filter: blur(var(--af-blur)); -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.af-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
.af-table th {
  text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--af-text-3); padding: 12px 14px; background: var(--af-fill);
  border-bottom: 1px solid var(--af-line); white-space: nowrap; position: sticky; top: 0; z-index: 2;
  backdrop-filter: blur(8px);
}
.af-table td { padding: 13px 14px; border-bottom: 1px solid var(--af-line); color: var(--af-text-2); vertical-align: middle; }
.af-table tbody tr { transition: background var(--af-dur); }
.af-table tbody tr:hover { background: var(--af-fill); }
.af-table tbody tr:last-child td { border-bottom: 0; }
.af-table .num { font-variant-numeric: tabular-nums; text-align: right; }

/* --------------------------------------------------------- 素材/预设卡 -- */
/* 多比例适配核心：--ar 由 data-ar 驱动，支持 9:16 / 16:9 / 1:1 / 4:5 / 2.35:1 */
.af-ratio { position: relative; width: 100%; aspect-ratio: var(--ar, 16 / 9); overflow: hidden; border-radius: var(--af-r); background: var(--af-fill-2); }
.af-ratio > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-ar="9:16"] { --ar: 9 / 16; }
[data-ar="16:9"] { --ar: 16 / 9; }
[data-ar="1:1"] { --ar: 1 / 1; }
[data-ar="4:5"] { --ar: 4 / 5; }
[data-ar="4:3"] { --ar: 4 / 3; }
[data-ar="2.35:1"] { --ar: 2.35 / 1; }
.af-thumb-ph { display: grid; place-items: center; color: #fff; font-weight: 700; font-family: 'Outfit', sans-serif; letter-spacing: .04em; }
.af-media-ov { position: absolute; inset: 0; background: linear-gradient(to top, rgba(4,20,22,.78) 0%, rgba(4,20,22,.12) 46%, transparent 72%); }
.af-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.9); color: var(--af-brand-700); box-shadow: 0 4px 16px rgba(0,0,0,.24);
  transition: transform var(--af-dur) var(--af-ease), background var(--af-dur);
}
.af-card-i:hover .af-play { background: #fff; transform: translate(-50%, -50%) scale(1.08); }
.af-badge-ar { position: absolute; left: 8px; top: 8px; padding: 2px 7px; border-radius: 7px; font-size: 10.5px; font-weight: 700; background: rgba(4,20,22,.62); color: #fff; backdrop-filter: blur(6px); letter-spacing: .02em; }
.af-badge-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 7px; font-size: 10.5px; font-weight: 700; background: rgba(4,20,22,.62); color: #fff; backdrop-filter: blur(6px); font-variant-numeric: tabular-nums; }
.af-badge-type { position: absolute; right: 8px; top: 8px; padding: 3px 8px; border-radius: 7px; font-size: 10.5px; font-weight: 700; background: var(--af-grad); color: #fff; }

/* 头像 */
.af-ava { display: grid; place-items: center; border-radius: 50%; background: var(--af-grad-135); color: #fff; font-weight: 700; flex: none; overflow: hidden; font-family: 'Outfit', sans-serif; }
.af-ava-ring { box-shadow: 0 0 0 2px var(--af-solid), 0 0 0 3.5px var(--af-brand); }

/* --------------------------------------------------------------- 导航 -- */
.af-topnav {
  position: sticky; top: 0; z-index: var(--z-nav);
  padding-top: var(--af-safe-t);
  background: var(--af-panel);
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--af-line);
}
.af-topnav-in { display: flex; align-items: center; gap: 12px; height: var(--af-nav-h); max-width: var(--af-shell); margin: 0 auto; padding: 0 16px; }
.af-logo { display: flex; align-items: center; gap: 9px; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -.02em; flex: none; }
.af-logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--af-grad-135); display: grid; place-items: center; color: #fff; box-shadow: var(--af-sh-brand); flex: none; }
.af-navlink {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--af-text-2); position: relative;
  transition: color var(--af-dur), background var(--af-dur); white-space: nowrap;
}
.af-navlink:hover { color: var(--af-brand-700); background: var(--af-fill); }
.af-navlink[aria-current="page"] { color: var(--af-brand-700); font-weight: 600; background: var(--af-fill-2); }

/* 移动端主导航滑轨（顶栏第二行）
   本站嵌在 AutFeng 客户端 WebView 里，宿主自带底部 tab，
   所以不再渲染站内底栏，主入口全部收在顶栏，避免两条底栏叠在一起。 */
.af-navrail {
  display: flex; gap: 4px; align-items: center;
  padding: 0 12px 8px; overflow-x: auto;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.af-navrail-i {
  flex: none; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--af-text-3);
  background: var(--af-fill); border: 1px solid transparent;
  transition: color var(--af-dur), background var(--af-dur), border-color var(--af-dur);
  -webkit-tap-highlight-color: transparent;
}
.af-navrail-i:hover { color: var(--af-brand-700); }
.af-navrail-i[aria-current="page"] {
  color: var(--af-brand-700); background: var(--af-fill-2); border-color: var(--af-brand);
}
/* 顶栏功能键：渐变实心，和其他图标按钮区分开 */
.af-launch-btn { background: var(--af-grad); color: #fff; border-color: transparent; box-shadow: var(--af-sh-brand); }
.af-launch-btn:hover { color: #fff; background: var(--af-grad); border-color: transparent; }

/* Admin 侧边栏 */
.af-side {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--af-side-w); z-index: var(--z-nav);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--af-panel); border-right: 1px solid var(--af-line);
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  transition: transform var(--af-dur) var(--af-ease);
}
.af-side-body { flex: 1; overflow-y: auto; padding: 8px 12px 20px; }
.af-side-group { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--af-text-4); padding: 16px 10px 7px; }
.af-side-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--af-text-2); margin-bottom: 2px;
  transition: all var(--af-dur) var(--af-ease); position: relative;
}
.af-side-link:hover { background: var(--af-fill); color: var(--af-brand-700); }
.af-side-link[aria-current="page"] { background: var(--af-fill-2); color: var(--af-brand-700); font-weight: 600; }
.af-side-link[aria-current="page"]::before { content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--af-grad); }
.af-side-link .cnt { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--af-danger); color: #fff; font-variant-numeric: tabular-nums; }
.af-admin-main { margin-left: var(--af-side-w); min-height: 100vh; min-height: 100dvh; }
.af-admin-top {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 20px;
  background: var(--af-panel); border-bottom: 1px solid var(--af-line);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.af-side-scrim { position: fixed; inset: 0; z-index: 19; background: rgba(4,20,22,.42); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity var(--af-dur); }
body.af-side-open .af-side-scrim { opacity: 1; pointer-events: auto; }
@media (max-width: 1023px) {
  .af-side { transform: translateX(-100%); box-shadow: var(--af-sh-3); }
  body.af-side-open .af-side { transform: none; }
  .af-admin-main { margin-left: 0; }
}

/* ------------------------------------------------------- 覆盖层组件 -- */
.af-scrim { position: fixed; inset: 0; z-index: var(--z-overlay); background: rgba(4, 20, 22, .5); backdrop-filter: blur(3px); animation: af-fade var(--af-dur) var(--af-ease); }
.af-modal-host { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 18px; pointer-events: none; }
.af-modal {
  pointer-events: auto; width: min(560px, 100%); max-height: min(86dvh, 780px); overflow: hidden;
  display: flex; flex-direction: column; border-radius: var(--af-r-xl);
  background: var(--af-solid); border: 1px solid var(--af-line); box-shadow: var(--af-sh-3);
  animation: af-pop .28s var(--af-ease);
}
.af-modal-hd { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--af-line); }
.af-modal-bd { padding: 18px; overflow-y: auto; }
.af-modal-ft { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--af-line); background: var(--af-fill); }
/* 移动端底部抽屉 */
.af-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-modal);
  max-height: 88dvh; display: flex; flex-direction: column;
  padding-bottom: var(--af-safe-b);
  background: var(--af-solid); border-top: 1px solid var(--af-line);
  border-radius: var(--af-r-xl) var(--af-r-xl) 0 0; box-shadow: var(--af-sh-3);
  animation: af-up .3s var(--af-ease);
}
.af-sheet-grip { width: 38px; height: 4px; border-radius: 99px; background: var(--af-line-strong); margin: 10px auto 4px; flex: none; }
/* ------------------------------------------- 悬浮径向功能菜单 -- */
/* 以 tabbar 中央悬浮键为圆心，双环展开；背景高斯模糊突出功能项 */
.af-launch-scrim {
  position: fixed; inset: 0; z-index: 44;
  background: rgba(6, 32, 34, .3);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  opacity: 0; transition: opacity .28s var(--af-ease);
}
[data-theme="dark"] .af-launch-scrim { background: rgba(2, 14, 16, .52); }
/* 不支持 backdrop-filter 的旧 WebView：靠加深纯色遮罩保证功能项可辨识 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .af-launch-scrim { background: rgba(6, 32, 34, .76); }
  [data-theme="dark"] .af-launch-scrim { background: rgba(2, 14, 16, .82); }
}
.af-launch-scrim.is-on { opacity: 1; }
.af-launch-layer { position: fixed; inset: 0; z-index: 45; pointer-events: none; }
.af-launch-item {
  position: fixed; width: 62px; margin-left: -31px; margin-top: -31px;
  display: grid; justify-items: center; gap: 7px; pointer-events: auto;
  opacity: 0; transform: translate3d(0, 0, 0) scale(.35);
  transition: transform .44s cubic-bezier(.34, 1.5, .64, 1), opacity .26s var(--af-ease);
  -webkit-tap-highlight-color: transparent;
}
.af-launch-item.is-on { opacity: 1; }
.af-launch-ico {
  width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .94); color: var(--af-brand-700);
  box-shadow: 0 6px 22px rgba(4, 20, 22, .26); transition: transform var(--af-dur) var(--af-ease);
}
[data-theme="dark"] .af-launch-ico { background: rgba(24, 48, 52, .96); color: var(--af-brand-700); }
.af-launch-item:active .af-launch-ico { transform: scale(.92); }
.af-launch-item[data-primary] .af-launch-ico {
  width: 64px; height: 64px; border-radius: 22px;
  background: var(--af-grad); color: #fff; box-shadow: 0 8px 26px rgba(57, 197, 187, .5);
}
.af-launch-lb {
  font-size: 10.5px; font-weight: 600; white-space: nowrap; color: #fff;
  padding: 2px 8px; border-radius: 999px; background: rgba(6, 26, 28, .58);
  backdrop-filter: blur(4px);
}
.af-launch-item[data-primary] .af-launch-lb { background: rgba(6, 26, 28, .72); }
.af-launch-btn > svg { transition: transform .34s cubic-bezier(.34, 1.5, .64, 1); }
.af-launch-btn[aria-expanded="true"] > svg { transform: rotate(135deg); }
body.af-launch-open { overflow: hidden; }

/* 站内已无底栏，但宿主 App 的底 tab 会盖住底部，用 --af-host-tab 留出避让高度 */
.af-toast-host { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--af-host-tab) + var(--af-safe-b) + 18px); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
@media (min-width: 1024px) { .af-toast-host { bottom: auto; top: 78px; } }
.af-toast {
  display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 999px;
  background: var(--af-solid); border: 1px solid var(--af-line); box-shadow: var(--af-sh-3);
  font-size: 13.5px; font-weight: 500; color: var(--af-text); animation: af-up .26s var(--af-ease);
}
.af-toast[data-k="success"] { border-color: rgba(22,163,74,.4); }
.af-toast[data-k="error"] { border-color: rgba(224,86,86,.4); }
.af-dropdown {
  position: absolute; z-index: var(--z-dropdown); min-width: 176px; padding: 6px;
  border-radius: var(--af-r); background: var(--af-solid); border: 1px solid var(--af-line);
  box-shadow: var(--af-sh-3); animation: af-pop .18s var(--af-ease);
}
.af-menuitem {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border: 0; border-radius: 9px;
  background: transparent; font-size: 13.5px; color: var(--af-text-2); cursor: pointer; text-align: left;
  transition: background var(--af-dur), color var(--af-dur);
}
.af-menuitem:hover { background: var(--af-fill); color: var(--af-brand-700); }
.af-menuitem[data-k="danger"] { color: var(--af-danger); }
.af-menuitem[data-k="danger"]:hover { background: var(--af-danger-bg); }

/* --------------------------------------------------- 进度 / 骨架 / 空态 -- */
.af-bar { height: 6px; border-radius: 99px; background: var(--af-fill-2); overflow: hidden; }
.af-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--af-grad); transition: width .6s var(--af-ease); }
.af-skel { position: relative; overflow: hidden; background: var(--af-fill-2); border-radius: var(--af-r-sm); }
.af-skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); animation: af-shim 1.5s infinite; }
[data-theme="dark"] .af-skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
.af-empty { display: grid; place-items: center; gap: 10px; padding: 56px 20px; text-align: center; }
.af-empty-ico { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; background: var(--af-fill-2); color: var(--af-brand); }
.af-spin { width: 17px; height: 17px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: af-spin .7s linear infinite; }

/* 步骤条 */
.af-steps { display: flex; align-items: center; gap: 6px; }
.af-step { display: flex; align-items: center; gap: 8px; flex: none; }
.af-step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--af-fill-2); color: var(--af-text-3); flex: none; }
.af-step.is-on .af-step-n { background: var(--af-grad); color: #fff; box-shadow: var(--af-sh-brand); }
.af-step.is-done .af-step-n { background: var(--af-success-bg); color: var(--af-success); }
.af-step-line { flex: 1; height: 2px; border-radius: 2px; background: var(--af-fill-2); min-width: 14px; }
.af-step.is-done + .af-step-line, .af-step-line.is-done { background: var(--af-brand); }

/* 时间轴 */
.af-timeline { position: relative; padding-left: 26px; }
.af-timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--af-line-strong); border-radius: 2px; }
.af-tl-item { position: relative; padding-bottom: 18px; }
.af-tl-item::before { content: ''; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--af-solid); border: 2.5px solid var(--af-brand); }
.af-tl-item.is-muted::before { border-color: var(--af-line-strong); }

/* 统计卡 */
.af-stat { padding: 16px; border-radius: var(--af-r-lg); background: var(--af-panel); border: 1px solid var(--af-line); backdrop-filter: blur(var(--af-blur)); box-shadow: var(--af-sh-1); }
.af-stat-v { font-family: 'Outfit', sans-serif; font-size: 27px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--af-text); }
.af-trend { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; }
.af-trend-up { color: var(--af-success); }
.af-trend-down { color: var(--af-danger); }

/* 图表容器（纯 CSS/SVG，不引第三方库） */
.af-chart { width: 100%; height: 100%; overflow: visible; }
.af-barchart { display: flex; align-items: flex-end; gap: 6px; height: 148px; }
.af-barchart > div { flex: 1; border-radius: 6px 6px 3px 3px; background: var(--af-grad-135); min-height: 3px; transition: height .6s var(--af-ease), opacity var(--af-dur); position: relative; }
.af-barchart > div:hover { opacity: .82; }

/* 代码块（对接文档用） */
.af-code {
  position: relative; border-radius: var(--af-r); overflow: hidden;
  background: #0B1F24; border: 1px solid rgba(69,214,203,.22);
}
.af-code pre { margin: 0; padding: 15px 16px; overflow-x: auto; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 1.75; color: #CFEFEC; }
.af-code-hd { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(69,214,203,.09); border-bottom: 1px solid rgba(69,214,203,.16); font-size: 11.5px; font-weight: 600; color: #7FE6DD; letter-spacing: .04em; }
.tok-k { color: #7FE6DD; }
.tok-s { color: #A5E887; }
.tok-n { color: #FFC06B; }
.tok-c { color: #5E8A88; font-style: italic; }
.tok-p { color: #8FB4B2; }
.af-method { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.af-method[data-m="GET"] { background: rgba(44,127,217,.16); color: #2C7FD9; }
.af-method[data-m="POST"] { background: rgba(22,163,74,.16); color: #16A34A; }
.af-method[data-m="PUT"], .af-method[data-m="PATCH"] { background: rgba(217,119,6,.16); color: #D97706; }
.af-method[data-m="DELETE"] { background: rgba(224,86,86,.16); color: #E05656; }
[data-theme="dark"] .af-method[data-m="GET"] { color: #6BB4FF; }
[data-theme="dark"] .af-method[data-m="POST"] { color: #4ADE80; }
[data-theme="dark"] .af-method[data-m="PUT"], [data-theme="dark"] .af-method[data-m="PATCH"] { color: #FBBF24; }
[data-theme="dark"] .af-method[data-m="DELETE"] { color: #FF7B7B; }

/* --------------------------------------------------------------- 布局 -- */
.af-shell { max-width: var(--af-shell); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .af-shell { padding: 0 24px; } }
@media (min-width: 1280px) { .af-shell { padding: 0 32px; } }
/* 移动端底部留出宿主 App tab 的避让空间，桌面端不需要 */
.af-host-pad { padding-bottom: calc(var(--af-host-tab) + var(--af-safe-b) + 16px); }
@media (min-width: 1024px) { .af-host-pad { padding-bottom: 40px; } }
.af-sec { padding: 26px 0; }
@media (min-width: 768px) { .af-sec { padding: 36px 0; } }
.af-sec-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.af-sec-t { font-size: 18px; font-weight: 600; }
@media (min-width: 768px) { .af-sec-t { font-size: 21px; } }
/* 响应式网格：素材/预设瀑布 */
.af-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .af-grid { gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .af-grid { gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1440px) { .af-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.af-grid-wide { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .af-grid-wide { gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .af-grid-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 详情页：主内容 + 侧栏 */
.af-split { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .af-split { gap: 28px; grid-template-columns: minmax(0, 1fr) 336px; align-items: start; } }
/* 移动端顶栏多一行导航滑轨，吸顶偏移要跟着变高 */
.af-sticky-side { position: sticky; top: calc(var(--af-nav-h-m) + 16px); }
@media (min-width: 1024px) { .af-sticky-side { top: calc(var(--af-nav-h) + 16px); } }
/* 筛选侧栏（桌面常驻 / 移动抽屉） */
.af-filter-layout { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .af-filter-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 26px; } }

/* --------------------------------------------- 多形态设备 / 比例适配 -- */
/* 折叠屏展开态（近方形，8:7~1:1）：避免超宽留白 */
@media (min-aspect-ratio: 6/7) and (max-aspect-ratio: 8/7) and (min-width: 600px) {
  .af-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* 横屏手机：纵向空间紧张，压缩留白与顶栏 */
@media (max-height: 480px) and (orientation: landscape) {
  :root { --af-nav-h: 52px; --af-nav-h-m: 88px; --af-host-tab: 48px; }
  .af-sec { padding: 16px 0; }
  .af-navrail { padding-bottom: 6px; }
  .af-navrail-i { padding: 5px 10px; font-size: 12px; }
}
/* 超宽屏 21:9：限制正文行宽，避免长行 */
@media (min-aspect-ratio: 2/1) and (min-width: 1600px) {
  :root { --af-shell: 1480px; }
  .af-prose { max-width: 76ch; }
}
.af-prose { max-width: 72ch; }
.af-prose p { margin: 0 0 12px; color: var(--af-text-2); }
/* 平板竖屏：两栏详情改为堆叠但保留大预览 */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
  .af-split { grid-template-columns: 1fr; }
}
/* 触控设备：去掉 hover-only 依赖的位移 */
@media (hover: none) {
  .af-card-i:hover { transform: none; }
}

/* ------------------------------------------------------------- 动效 -- */
@keyframes af-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes af-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes af-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes af-shim { to { transform: translateX(100%); } }
@keyframes af-spin { to { transform: rotate(360deg); } }
@keyframes af-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
/* 入场：滚动进入视口时逐级揭示（app.js 挂 is-in） */
.af-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--af-ease), transform .5s var(--af-ease); }
.af-reveal.is-in { opacity: 1; transform: none; }
.af-stagger > * { opacity: 0; transform: translateY(12px); animation: af-up .5s var(--af-ease) forwards; }
.af-stagger > *:nth-child(1) { animation-delay: .04s; }
.af-stagger > *:nth-child(2) { animation-delay: .09s; }
.af-stagger > *:nth-child(3) { animation-delay: .14s; }
.af-stagger > *:nth-child(4) { animation-delay: .19s; }
.af-stagger > *:nth-child(5) { animation-delay: .24s; }
.af-stagger > *:nth-child(6) { animation-delay: .29s; }
.af-stagger > *:nth-child(7) { animation-delay: .34s; }
.af-stagger > *:nth-child(8) { animation-delay: .39s; }
.af-stagger > *:nth-child(n+9) { animation-delay: .44s; }

/* 尊重系统「减少动效」设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .af-reveal, .af-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* 打印：文档页可直接导出 PDF */
@media print {
  .af-aura, .af-topnav, .af-side, .af-admin-top, .af-noprint { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .af-admin-main { margin-left: 0 !important; }
  .af-glass, .af-solid-card { box-shadow: none !important; border-color: #ddd !important; background: #fff !important; }
}

/* 工具 */
.af-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.af-skip {
  position: absolute; left: 12px; top: -60px; z-index: var(--z-toast);
  padding: 10px 16px; border-radius: 0 0 10px 10px; background: var(--af-brand); color: #fff;
  font-size: 13px; font-weight: 600; transition: top var(--af-dur);
}
.af-skip:focus { top: 0; }
.af-divider { height: 1px; background: var(--af-line); border: 0; margin: 0; }
.af-hide-mobile { display: none; }
@media (min-width: 1024px) { .af-hide-mobile { display: revert; } .af-only-mobile { display: none !important; } }

/* ============================ 紧凑工具类 ==================================
   仅覆盖高频排版需求，替代 Tailwind CDN 依赖，保证离线可用
   ========================================================================= */
.f { display: flex; }
.fc { display: flex; flex-direction: column; }
.gr { display: grid; }
.ic { align-items: center; }
.is { align-items: flex-start; }
.ie { align-items: flex-end; }
.jb { justify-content: space-between; }
.jc { justify-content: center; }
.je { justify-content: flex-end; }
.wrap { flex-wrap: wrap; }
.f1 { flex: 1; }
.fn { flex: none; }
.mw0 { min-width: 0; }
.rel { position: relative; }
.ovh { overflow: hidden; }
.full { width: 100%; }
.cp { cursor: pointer; }
.ml-a { margin-left: auto; }
.mr-a { margin-right: auto; }
.tc { text-align: center; }
.tr { text-align: right; }

.g2 { gap: 2px; } .g4 { gap: 4px; } .g6 { gap: 6px; } .g8 { gap: 8px; }
.g10 { gap: 10px; } .g12 { gap: 12px; } .g14 { gap: 14px; } .g16 { gap: 16px; }
.g20 { gap: 20px; } .g24 { gap: 24px; }

.gc2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gc3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gc4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 639px) { .gc4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gc3-m2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 移动优先列数：基线单列，按断点逐级放宽。命名 gc{列数}-{断点}
   断点 sm=640 md=768 lg=1024 xl=1280。布局用这些类，不要用 JS 读 innerWidth 写 style，
   否则 JS 执行前的首屏是错的，且内联 style 会盖掉媒体查询。 */
.gc1 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .gc2-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gc3-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gc-aside-sm { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (min-width: 768px) {
  .gc2-md { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gc3-md { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gc-bal-md { grid-template-columns: 1.2fr 1fr; }
}
@media (min-width: 900px) {
  .gc2-mdx { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gc3-mdx { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gc-aside-mdx { grid-template-columns: minmax(0, 1fr) 420px; }
}
/* 仅 900px 起显示：配合 .gc-aside-mdx 的侧栏，断点必须与之一致 */
.af-only-mdx { display: none; }
@media (min-width: 900px) { .af-only-mdx { display: block; } }
/* 步骤条文字：窄屏只留序号圆点，640px 起补文字 */
.af-step-lb { display: none; }
@media (min-width: 640px) { .af-step-lb { display: inline; } }
@media (min-width: 1024px) {
  .gc2-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gc3-lg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gc4-lg { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gc-aside-lg { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (min-width: 1280px) {
  .gc3-xl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gc4-xl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gc-main-xl { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}

.p8 { padding: 8px; } .p10 { padding: 10px; } .p12 { padding: 12px; }
.p14 { padding: 14px; } .p16 { padding: 16px; } .p18 { padding: 18px; } .p20 { padding: 20px; }
.mt4 { margin-top: 4px; } .mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; }
.mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .mt14 { margin-top: 14px; }
.mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb4 { margin-bottom: 4px; } .mb6 { margin-bottom: 6px; } .mb8 { margin-bottom: 8px; }
.mb10 { margin-bottom: 10px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; } .mb20 { margin-bottom: 20px; }
.pt12 { padding-top: 12px; } .pb12 { padding-bottom: 12px; }
.bt { border-top: 1px solid var(--af-line); }
.bb { border-bottom: 1px solid var(--af-line); }

.s10 { font-size: 10.5px; } .s11 { font-size: 11.5px; } .s12 { font-size: 12.5px; }
.s13 { font-size: 13.5px; } .s14 { font-size: 14px; } .s15 { font-size: 15px; }
.s16 { font-size: 16px; } .s18 { font-size: 18px; } .s20 { font-size: 20px; }
.s24 { font-size: 24px; } .s28 { font-size: 28px; } .s34 { font-size: 34px; }
.w5 { font-weight: 500; } .w6 { font-weight: 600; } .w7 { font-weight: 700; }
.lh15 { line-height: 1.5; } .lh17 { line-height: 1.72; }
.dsp { font-family: 'Outfit', -apple-system, 'PingFang SC', sans-serif; }
