/* 设计 token 来自 vendor/design-tokens.css（stock-lu 原文件） */

/* 系统栏安全区：iOS PWA / 浏览器取 env()；Android APP（Capacitor edge-to-edge）
   env() 恒为 0，由壳工程 MainActivity 把真实系统栏高度注入同名内联变量覆盖 */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { height: 100%; background: var(--color-bg); }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; font-size: var(--text-body); }
/* iOS Safari：所有交互元素禁用双击缩放（pinch 缩放保留），点按立即响应 */
button, a, input, select, textarea, label { touch-action: manipulation; }
a { color: var(--color-accent-text); text-decoration: none; text-underline-offset: 0.18em; }
::selection {
  background: color-mix(in srgb, var(--color-accent) 22%, transparent);
  color: var(--color-text-strong);
}
input, textarea, select { caret-color: var(--color-accent-text); }
.hidden { display: none !important; }
.ui-icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.lightbox-close .ui-icon,
.lightbox-nav .ui-icon { width: 26px; height: 26px; }
.ima-reader-back .ui-icon { width: 18px; height: 18px; }
.ima-reader-nav .ui-icon,
.ima-folder-panel-toggle > .ui-icon,
.ima-folder-expand .ui-icon { width: 18px; height: 18px; }
.p-file .ui-icon,
.post-expand-btn .ui-icon,
.pager .ui-icon,
.news-admin-page .post-cell .ui-icon,
.ima-acl-chip .ui-icon { width: 16px; height: 16px; }
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-control);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
  outline: 2px solid var(--color-text-strong);
  outline-offset: 2px;
}
.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;
}

/* ---------- 认证页 ---------- */
.auth-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(40px + var(--safe-top)) 24px 40px;
  position: relative;
  isolation: isolate;
  background-color: var(--color-bg);
  background-image: var(--gradient-login-page);
  overflow: hidden;
}
.auth-view::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--color-login-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-login-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 25%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 25%, transparent 85%);
  pointer-events: none;
  z-index: -1;
}

.auth-topbar {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
}
.auth-topbar .auth-theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: var(--border-default);
  background: var(--color-surface);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: color var(--ease-standard), border-color var(--ease-standard), background var(--ease-standard);
}
.auth-topbar .auth-theme-toggle:hover {
  color: var(--color-text-strong);
  border-color: var(--color-line-strong);
}
.auth-topbar .auth-theme-toggle svg {
  width: 18px;
  height: 18px;
}

.login-shell {
  display: flex;
  align-items: center;
  gap: 64px;
  width: 100%;
  max-width: 980px;
  position: relative;
  z-index: 1;
}
.login-brand { flex: 1 1 48%; }
.brand-mark {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: var(--color-white);
  font-size: 26px; font-weight: var(--font-weight-semibold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.brand-mark.brand-logo { background: transparent; box-shadow: var(--shadow-xs); }
.brand-mark.small { width: 40px; height: 40px; border-radius: var(--radius-sm); font-size: var(--text-icon); margin: 0; box-shadow: var(--shadow-xs); }
.brand-mark.small.brand-logo { box-shadow: var(--shadow-xs); }
.login-brand-header { margin-bottom: 24px; }
/* 登录页品牌符号：与全站统一融合符号，展示位用大尺寸更醒目 */
.login-logo { height: 60px; width: auto; margin-bottom: 16px; display: block; }
.login-eyebrow { font-size: var(--text-xs); font-weight: var(--font-weight-semibold); letter-spacing: 2px; text-transform: uppercase; color: var(--color-accent-text); }
.login-brand-title { font-size: var(--text-display); font-weight: var(--font-weight-semibold); letter-spacing: 0; margin: 0; color: var(--color-text); line-height: 1.15; }
.login-brand-desc { font-size: var(--text-body); color: var(--color-text-muted); margin: 8px 0 0; line-height: 1.5; }

.login-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
}
.login-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--ease-standard), box-shadow var(--ease-standard);
}
.login-feature:hover {
  border-color: var(--color-line-strong);
}
.login-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--color-bg-muted);
  border: 1px solid var(--color-line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-duty-blue);
}
.login-feature-icon svg {
  width: 18px;
  height: 18px;
}
.login-feature-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.login-feature-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-feature-name {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
  line-height: 1.3;
}
.login-feature-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}
.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.login-card {
  flex: 1 1 44%;
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-login-card);
  padding: 36px 38px;
  animation: login-rise 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes login-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .login-card { animation: none; }
  .login-form:not(.hidden) { animation: none; }
  .tl-pill[data-platform="live"]::after { animation: none; }
  .icon-badge-bar .pt-icon,
  .icon-badge-bar .funnel-icon,
  .icon-badge-bar .star-icon { transition: none; }
  .icon-badge-bar .tl-pill:active .pt-icon,
  .icon-badge-bar > .fav-toggle:active .star-icon,
  .icon-badge-bar .tl-actions button:active .funnel-icon { transform: none; }
}
/* 密码可见性切换 */
.pw-field { position: relative; margin-bottom: 16px; }
.pw-field .form-control { margin-bottom: 0; padding-right: 46px; width: 100%; }
/* 与密码框输入区等宽：用户名/邀请码框预留相同右侧留白，保持纵向对齐 */
.login-form > .form-control { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border: none; background: transparent; border-radius: var(--radius-2xs);
  color: var(--color-text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color var(--ease-standard), background var(--ease-standard);
}
.pw-toggle:hover { color: var(--color-text-strong); background: var(--color-bg-muted); }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle .pw-eye-off { display: none; }
.pw-toggle.visible .pw-eye { display: none; }
.pw-toggle.visible .pw-eye-off { display: block; }
.auth-switch {
  display: inline-flex;
  background: var(--color-bg-muted);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  margin-bottom: 26px;
}
.auth-switch .switch-btn {
  border: none;
  background: transparent;
  padding: 10px 22px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: background var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard);
}
.auth-switch .switch-btn.active {
  background: var(--color-surface);
  color: var(--color-text-strong);
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-xs);
}
.login-title { font-size: var(--text-title); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.login-subtitle { color: var(--color-text-muted); font-size: var(--text-sm); margin: 6px 0 22px; }
.login-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.login-form:not(.hidden) {
  animation: auth-form-fade 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes auth-form-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.field-label { font-size: var(--text-sm); font-weight: var(--font-weight-medium); color: var(--color-text-strong); margin-bottom: 6px; }
.form-control {
  height: var(--control-height-2xl);
  border: var(--border-strong);
  border-radius: var(--radius-control);
  padding: 0 14px;
  background: var(--color-surface);
  font-size: var(--text-body);
  color: var(--color-text);
  outline: none;
  margin-bottom: 16px;
  transition: border-color var(--ease-standard), box-shadow var(--ease-standard);
}
.form-control::placeholder { color: var(--color-text-faint); }
.form-control:focus { border-color: var(--color-accent-text); box-shadow: var(--shadow-focus-ring); }
textarea.form-control {
  height: auto;
  width: 100%;
  min-height: 150px;
  padding: 12px 14px;
  line-height: 1.6;
  resize: vertical;
}
.cf-turnstile:empty { display: none; }
.cf-turnstile { margin: 0 auto; }
.form-error { color: var(--color-danger); font-size: var(--text-sm); min-height: 18px; margin: 0 0 12px; }
.btn-normal {
  height: var(--control-height-2xl);
  border: none;
  border-radius: var(--radius-control);
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
  padding: 0 20px;
  transition: background var(--ease-standard), transform 120ms ease;
}
.btn-normal:hover { background: var(--color-accent-strong); }
.btn-normal:active { background: var(--color-accent-strong); transform: translateY(1px); }
.btn-normal:disabled { opacity: 0.65; cursor: default; transform: none; }
.btn-fluid { width: 100%; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 44px;
  border: var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text-strong);
  padding: 0 16px;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  transition: border-color var(--ease-standard), background var(--ease-standard);
}
.btn-ghost:hover { border-color: var(--color-text-muted); }
.btn-ghost:active { background: var(--color-surface-button-active); }
.btn-ghost:disabled { opacity: 0.65; cursor: default; }
.refresh-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.btn-ghost.danger { color: var(--color-danger); border-color: var(--color-line-danger); }
.btn-ghost.danger:hover { border-color: var(--color-danger); color: var(--color-danger-strong); }

/* 特别关注 ⭐ */
.fav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-pill);
  border: var(--border-strong); background: var(--color-surface);
  color: var(--color-text-muted); cursor: pointer;
  transition: all var(--ease-standard);
  vertical-align: middle;
}
.fav-btn:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.fav-btn.fav-on {
  color: var(--color-accent-text);
  border-color: var(--color-accent-text);
  background: var(--color-accent-soft);
}
/* 次要铃铛：默认 🔔 黄色（正常推送），已设次要 🔕 灰色（降频） */
.fav-btn.sec-off {
  color: var(--color-accent-text);
  border-color: var(--color-accent-text);
  background: var(--color-accent-soft);
}
.fav-btn.sec-on {
  color: var(--color-text-muted);
  border-color: var(--color-text-muted);
  background: var(--color-muted-soft);
}
.star-icon { width: 18px; height: 18px; fill: currentColor; display: block; }
.bell-icon { width: 18px; height: 18px; display: block; }
.fav-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: var(--border-strong); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text-muted);
  font-size: var(--text-sm); cursor: pointer;
  transition: all var(--ease-standard);
}
.fav-toggle:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.fav-toggle.fav-on {
  color: var(--color-accent-text);
  border-color: var(--color-accent-text);
  background: var(--color-accent-soft);
  font-weight: var(--font-weight-semibold);
}
.fav-toggle .star-icon { width: 16px; height: 16px; }
.fav-toggle .bell-icon { width: 16px; height: 16px; }
.fav-toggle .eye-icon { width: 16px; height: 16px; }
.fav-toggle .funnel-icon { width: 16px; height: 16px; }

/* ---------- 申请添加大V 邀请横幅 ---------- */
.request-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(22, 119, 255, 0.16);
  border-radius: var(--radius-card);
  background: var(--color-accent-soft);
}
.request-banner-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-accent-text);
  font-size: var(--text-icon);
  font-weight: var(--font-weight-semibold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}
.request-banner-icon svg { width: 20px; height: 20px; }
.request-banner-copy { flex: 1 1 auto; min-width: 0; }
.request-banner-copy .title {
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
}
.request-banner-copy .desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.request-banner .btn-normal { flex: 0 0 auto; }

/* ---------- 应用壳 ---------- */
.app-view { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--color-bg);
  border-right: var(--border-default);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 20px; border-bottom: var(--border-default); }
.sidebar-brand-toggle {
  border: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  line-height: 0;
}
.sidebar-brand-toggle:hover { opacity: 0.72; }
/* 侧边栏品牌符号：与 topbar/favicon 同源融合符号，28px 与标题协调 */
.sidebar-logo { height: 28px; width: auto; flex-shrink: 0; pointer-events: none; }
.sidebar-brand-text { display: flex; flex-direction: column; }
.sidebar-brand-name { font-size: var(--text-title); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.sidebar-brand-meta { font-size: var(--text-xs); color: var(--color-text-faint); letter-spacing: 0.4px; }
.sidebar-nav {
  flex: 1; min-height: 0; overflow-y: auto;
  padding-top: 10px; display: flex; flex-direction: column; gap: 2px;
}
.nav-group-label { font-size: var(--text-xs); font-weight: var(--font-weight-semibold); color: var(--color-text-faint); letter-spacing: 1px; padding: 12px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  border: none; background: transparent;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  font-size: var(--text-sm);
  color: var(--color-text);
  text-align: left;
  transition: background var(--ease-standard), color var(--ease-standard);
}
.nav-item:hover { background: var(--color-surface-accent-soft); }
.nav-item.active { background: var(--color-accent-soft); color: var(--color-accent-text); font-weight: var(--font-weight-semibold); }
.nav-item .nav-icon { width: 20px; text-align: center; font-size: var(--text-body); }
.nav-item .nav-icon svg { width: 15px; height: 15px; vertical-align: -2px; }
/* 侧边栏待办角标（如：内容管理上的待审批数） */
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  text-align: center;
}
html.sidebar-slim .nav-badge { display: none; }

/* 管理侧边栏折叠子组：分组标签与顶级分组统一样式与间距 */
.nav-sub { margin-top: 0; }
.nav-sub summary { list-style: none; cursor: pointer; }
.nav-sub summary::-webkit-details-marker { display: none; }
.nav-sub-label {
  font-size: var(--text-xs); font-weight: var(--font-weight-semibold);
  color: var(--color-text-faint); letter-spacing: 1px;
  padding: 12px 12px 6px;
  display: flex; align-items: center; justify-content: space-between;
  user-select: none;
}
.nav-sub-label .ui-icon { width: 16px; height: 16px; color: var(--color-text-muted); transition: transform var(--ease-standard); }
.nav-sub[open] > .nav-sub-label .ui-icon { transform: rotate(90deg); }
.nav-sub .nav-item { padding-left: 12px; width: 100%; }
/* 子组图标与顶级导航对齐，仅文字缩进保留层级 */
.nav-sub .nav-item .nav-label { margin-left: 10px; }
.sidebar-foot { padding: 24px 12px 14px; }
.sidebar-user { font-size: var(--text-xs); color: var(--color-text-muted); display: block; }

/* 主题切换（侧边栏底部两钮：浅色/深色互切 + 跟随系统）：无边框小图标，选中用蓝色+淡蓝底 */
.theme-switcher {
  display: flex; gap: 6px;
  justify-content: center;
}
.theme-mode {
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  border: none; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-text-faint);
  transition: all var(--ease-standard);
}
.theme-mode .theme-ic { width: 17px; height: 17px; }
.theme-mode:hover { background: var(--color-surface-hover); color: var(--color-accent-text); }
.theme-mode.selected { background: var(--color-surface-accent); color: var(--color-accent-text); }
.theme-mode.selected .theme-ic { stroke-width: 2.4; }

/* 顶部主题切换按钮：桌面用侧边栏三态，仅移动端（无侧边栏）显示 */
.theme-toggle-btn {
  display: none;
  width: 30px; height: 30px; flex-shrink: 0;
  border: none; background: none; border-radius: var(--radius-2xs);
  color: var(--color-text-muted);
  align-items: center; justify-content: center;
  transition: all var(--ease-standard);
}
.theme-toggle-btn:hover { background: var(--color-surface-hover); color: var(--color-accent-text); }
.theme-toggle-btn .theme-ic { width: 17px; height: 17px; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: calc(56px + var(--safe-top));
  padding: 0 24px;
  /* 沉浸式状态栏（安卓 15 强制 edge-to-edge）下内容不顶进状态栏 */
  padding-top: var(--safe-top);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg);
  border-bottom: var(--border-default);
}
.topbar-title { position: relative; display: flex; align-items: center; gap: 6px; }
.topbar-title h1 { font-size: var(--text-title); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
/* topbar 左上角品牌符号：PC 端与页面文字标题并存（logo 品牌锚 + 文字定位），移动端单独显示 */
.topbar-logo { display: inline-block; height: 28px; width: auto; flex-shrink: 0; }
.icon-btn {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none;
  font-size: var(--text-icon); color: var(--color-text);
  border-radius: var(--radius-2xs);
}
.icon-btn:hover { background: var(--color-surface-hover); }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: var(--color-white);
  font-size: var(--text-body); font-weight: var(--font-weight-semibold);
  display: flex; align-items: center; justify-content: center;
}
.user-meta { display: flex; flex-direction: column; }
.user-name { font-size: var(--text-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.user-role { font-size: var(--text-xs); color: var(--color-accent-text); }
.topbar-logout { border: none; background: none; color: var(--color-text-muted); font-size: var(--text-sm); padding: 6px 10px; border-radius: var(--radius-2xs); }
.topbar-logout:hover { background: var(--color-surface-hover); color: var(--color-danger); }

/* 内容区铺满可用宽度（宽屏不再留白）；正文可读性由 .p-content 行宽上限保障 */
.page-main { padding: 24px; width: 100%; --page-pad-x: 24px; }
.page-main:has(.ima-report-page),
.page-main:has(.ima-reader-page) {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px - var(--safe-top));
  max-height: calc(100vh - 56px - var(--safe-top));
  padding-top: 16px;
  padding-bottom: 16px;
  overflow: hidden;
}

/* ---------- 面板 ---------- */
.section-panel {
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-card);
  box-shadow: none;
  padding: var(--section-padding-lg-y) var(--section-padding-lg-x);
  margin-bottom: 18px;
}
.section-head { margin-bottom: 16px; }
.section-eyebrow { font-size: var(--text-xs); font-weight: var(--font-weight-semibold); letter-spacing: 1.5px; text-transform: uppercase; color: var(--color-accent-text); }
.section-title { font-size: var(--text-title); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); margin-top: 4px; }
.section-title .hint { color: var(--color-text-faint); font-weight: normal; }
.section-meta { color: var(--color-text-muted); font-size: var(--text-xs); margin-top: 4px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* 后台容器页签条 + 待办角标（内容管理/帖子与日志/用户与注册） */
.admin-group-tabs { margin-bottom: 14px; }
.tab-count {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
}
.settings-tab:not(.active) .tab-count { background: var(--color-accent-soft); color: var(--color-accent-text); }
/* 列表分页：单行紧凑排布，窄屏不换行不错位 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: nowrap;
}
.pager .btn-sm { flex: 0 0 auto; padding: 0 12px; }
.pager .pager-count { white-space: nowrap; font-size: var(--text-xs); color: var(--color-text-muted); }
@media (min-width: 769px) {
  .toolbar .btn-ghost,
  .toolbar .btn-sm {
    height: var(--control-height-2xl);
    box-sizing: border-box;
  }
}
.ak-filters { margin-top: 12px; }
.ak-platform-tabs { margin-top: 12px; }
.ak-add-lines {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  margin-bottom: 0;
}
.ak-add-bar { margin-top: 12px; }
.ak-add-bar .form-control { width: auto; }
.ak-add-result { white-space: pre-line; }

/* 抓取设置：频率两列 → 通道 → 知识星球通栏 → 保活与保存。
   不用 masonry 两列，避免知识星球把左列撑出空洞。 */
.cfg-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.cfg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: start;
}
.cfg-grid .cfg-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
}
.cfg-grid .cfg-field {
  flex: none;
  min-width: 0;
}
.cfg-flags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
  margin-top: 12px;
}
.cfg-flags .cfg-field.cfg-check {
  flex: none;
  min-width: 0;
}
.cfg-flag-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cfg-flag-text > span:first-child {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-strong);
  line-height: 1.35;
}
.cfg-group--zsxq .cfg-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cfg-group--zsxq .cfg-field {
  flex: none;
  min-width: 0;
}
.cfg-group--zsxq .cfg-field.cfg-check,
.cfg-group--zsxq .cfg-field--wide {
  grid-column: 1 / -1;
}
.cfg-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}
.cfg-foot .muted { margin: 0; }
.cfg-ops {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: end;
}
.cfg-ops .cfg-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cfg-ops .cfg-field {
  flex: none;
  min-width: 0;
}
.cfg-ops .cfg-save-row {
  margin: 0;
  padding-bottom: 2px;
}
#st-config .cfg-save-row .btn-normal {
  min-height: 44px;
  height: 44px;
}
.cfg-field .cfg-unit { margin-left: 0.25em; }
@media (max-width: 800px) {
  .cfg-grid { grid-template-columns: 1fr; }
  .cfg-group--zsxq .cfg-fields { grid-template-columns: 1fr; }
  .ima-kb-list,
  .ima-folder-tree { max-height: 360px; }
}
@media (max-width: 720px) {
  .cfg-flags { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cfg-ops { grid-template-columns: 1fr; }
  .cfg-ops .cfg-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfg-ops .cfg-save-row .btn-normal { width: 100%; }
}
.cfg-group {
  background: var(--color-surface-soft);
  border: var(--border-default);
  border-radius: var(--radius-card);
  padding: 14px 16px 16px;
}
.cfg-group-title {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.5px;
  color: var(--color-accent-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cfg-group-title .hint { color: var(--color-text-faint); font-weight: normal; letter-spacing: 0; }
.cfg-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  margin-top: 12px;
}
.cfg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex: 1 1 130px;
  min-width: 130px;
}
.cfg-field .form-control {
  margin: 0;
  width: 100%;
  height: var(--control-height-xl);
  font-variant-numeric: tabular-nums;
}
.cfg-field .cfg-unit { color: var(--color-text-faint); font-weight: normal; }
.proxy-route {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  flex: 1 1 200px;
  min-width: min(100%, 200px);
}
.proxy-route .cfg-field { flex: 1 1 160px; }
.proxy-extract-url { overflow-wrap: anywhere; }
.proxy-nodes-wrap { margin-top: var(--space-4); }
textarea.proxy-import { min-height: 96px; }
.cfg-field.cfg-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  min-height: 44px;
  font-size: var(--text-sm);
  color: var(--color-text);
  flex: 1 1 100%;
}
.cfg-field.cfg-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 4px 0 0;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}
.cfg-field.cfg-check input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.cfg-field.cfg-check .cfg-check-desc {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: normal;
}
.cfg-save-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }

.plaza-src {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 0;
  border-bottom: var(--border-default);
}
.plaza-src:last-child { border-bottom: 0; }
.plaza-src-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.plaza-src-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.plaza-src-icon .pt-icon { width: 20px; height: 20px; }
.plaza-src-icon[data-platform="xueqiu"] .pt-icon,
.plaza-src-icon[data-platform="combination"] .pt-icon { color: var(--color-brand-xueqiu); }
.plaza-src-icon[data-platform="weibo"] .pt-icon { color: var(--color-brand-weibo); }
.plaza-src-icon[data-platform="twitter"] .pt-icon { color: var(--color-brand-twitter); }
.plaza-src-icon[data-platform="zsxq"] .pt-icon { color: var(--color-brand-zsxq); }
.plaza-src-copy { min-width: 0; }
.plaza-src-name {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
}
.plaza-src-meta {
  margin: 4px 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.plaza-src-modes {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.plaza-src-mode {
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border: var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
}
.plaza-src-mode:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.plaza-src-mode.selected {
  background: var(--color-accent);
  border-color: var(--color-accent-text);
  color: var(--color-white);
  font-weight: var(--font-weight-semibold);
}
@media (max-width: 640px) {
  .plaza-src { flex-direction: column; align-items: stretch; }
  .plaza-src-modes { width: 100%; }
  .plaza-src-mode { flex: 1; }
}

/* 备份页：路径占满剩余宽度，时刻/份数按内容定宽，避免三列均分把数字框拉得过宽 */
.backup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px 16px;
  align-items: end;
  margin: 0 0 4px;
}
.backup-grid .form-label { margin-bottom: 0; }
.backup-grid .form-control {
  margin-bottom: 0;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.backup-num .form-control { width: 5.5rem; }
.backup-status { margin: 12px 0 0; }
.backup-page .cfg-save-row { margin-top: 14px; }
.backup-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.backup-stack .form-label { margin-bottom: 0; }
.backup-file-input {
  align-self: start;
  max-width: 100%;
  font-size: var(--text-sm);
  color: var(--color-text);
}
@media (max-width: 640px) {
  .backup-grid {
    grid-template-columns: 1fr 1fr;
  }
  .backup-path { grid-column: 1 / -1; }
  .backup-num .form-control { width: 100%; }
}

/* 平台筛选 */
.platform-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
/* 横向滑动胶囊行隐藏原生滚动条（保留滑动；设置/广场/分类共用，避免移动端出现滑动框） */
.platform-tabs,
.tl-pills,
.settings-tabs,
.home-filter-content .home-cats {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.platform-tabs::-webkit-scrollbar,
.tl-pills::-webkit-scrollbar,
.settings-tabs::-webkit-scrollbar,
.home-filter-content .home-cats::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}
.platform-tab,
.tl-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color var(--ease-standard), background var(--ease-standard), color var(--ease-standard);
}
.platform-tab:hover,
.tl-pill:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.platform-tab:focus-visible,
.tl-pill:focus-visible {
  outline: 2px solid var(--color-accent-text);
  outline-offset: 2px;
}
.platform-tab.selected,
.tl-pill.selected {
  background: var(--color-accent);
  border-color: var(--color-accent-text);
  color: var(--color-white);
  font-weight: var(--font-weight-semibold);
}
/* 选中态：单色 SVG 走 currentColor 自动反白、章保持透明 */
.platform-tab.selected .pt-icon,
.tl-pill.selected .pt-icon { background: transparent; }
/* 官方填充图标默认品牌色，选中时直接反白，无需滤镜。 */
.platform-tab.selected .pt-icon,
.tl-pill.selected .pt-icon { --platform-icon-fill: #fff; }
.pt-label { display: inline; }
.pt-icon { width: 16px; height: 16px; flex-shrink: 0; }
/* 「全部」与快讯同用 Duty Blue：平台色属于未选中图标（选中态让位给白图形） */
.tl-pill[data-platform=""]:not(.selected) .pt-icon,
.platform-tab[data-platform=""]:not(.selected) .pt-icon { color: var(--color-accent); }
/* 平台/筛选角标沿用统一圆底衬。 */
.tl-pill .pt-icon,
.platform-tab .pt-icon {
  width: 22px;
  height: 22px;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--color-bg-muted);
}
.tl-pill:hover .pt-icon,
.platform-tab:hover .pt-icon { background: var(--color-accent-soft); }
/* 选中反白时去掉底衬，避免蓝底上再叠灰圆 */
.tl-pill.selected .pt-icon,
.platform-tab.selected .pt-icon { background: transparent; }
.tl-pill[data-platform="live"]:not(.selected) .pt-icon { color: var(--color-accent); }
/* 内联 Truth 图形继承主题强调色，选中后随按钮反白。 */
.tl-pill[data-platform="truth"]:not(.selected) .pt-icon,
.platform-tab[data-platform="truth"]:not(.selected) .pt-icon { color: var(--color-accent-text); }
/* 快讯呼吸点：未选中时提示「有实时源可看」，选中后隐去（注意力只给未到达的地方） */
.tl-pill[data-platform="live"] { position: relative; }
.tl-pill[data-platform="live"]::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px var(--color-surface);
  animation: live-pulse 2.4s ease-in-out infinite;
}
.tl-pill[data-platform="live"].selected::after { display: none; }
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.platform-tab[data-platform="xueqiu"]:not(.selected) .pt-icon,
.tl-pill[data-platform="xueqiu"]:not(.selected) .pt-icon { color: var(--color-brand-xueqiu); }
.platform-tab[data-platform="combination"]:not(.selected) .pt-icon,
.tl-pill[data-platform="combination"]:not(.selected) .pt-icon { color: var(--color-brand-xueqiu); }
.platform-tab[data-platform="weibo"]:not(.selected) .pt-icon,
.tl-pill[data-platform="weibo"]:not(.selected) .pt-icon { color: var(--color-brand-weibo); }
.platform-tab[data-platform="twitter"]:not(.selected) .pt-icon,
.tl-pill[data-platform="twitter"]:not(.selected) .pt-icon { color: var(--color-brand-twitter); }
.platform-tab[data-platform="zsxq"]:not(.selected) .pt-icon,
.tl-pill[data-platform="zsxq"]:not(.selected) .pt-icon { color: var(--color-brand-zsxq); }

/* 搜索 */
.search-bar {
  display: flex; align-items: center;
  background: var(--color-surface);
  border: var(--border-strong);
  border-radius: var(--radius-control);
  height: var(--control-height-2xl);
  padding: 0 14px;
  gap: 8px;
}
.search-bar .search-ic { width: 16px; height: 16px; color: var(--color-text-muted); flex-shrink: 0; }
.search-bar input { flex: 1; border: none; outline: none; background: none; color: var(--color-text); }
.search-bar:focus-within { border-color: var(--color-accent-text); box-shadow: var(--shadow-focus-ring); }

/* 大V 行 */
.kol-item {
  display: flex; align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: var(--border-soft);
}
.kol-item:last-child { border-bottom: none; }

/* 订阅广场网格卡片 */
.kol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: stretch; }
/* 空状态占满整行：grid 里只有一个 .empty 时若只占一列会偏左、右侧大片空白 */
.kol-grid > .empty { grid-column: 1 / -1; }
.kol-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px;
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-card);
  transition: border-color var(--ease-standard), box-shadow var(--ease-standard);
}
.kol-card:hover { border-color: var(--color-accent-text); box-shadow: var(--shadow-xs); }
.kol-card-head { display: flex; align-items: flex-start; gap: 12px; }
/* 卡片头部即大V动态页链接：重置 <a> 默认样式，hover 时昵称提示可点 */
a.kol-card-head { color: inherit; text-decoration: none; }
a.kol-card-head:hover .kol-card-info .name { color: var(--color-accent-text); }
.kol-card .kol-avatar { width: 52px; height: 52px; font-size: var(--text-icon); }
.kol-card-info { flex: 1; min-width: 0; cursor: pointer; }
.kol-card-info .name { display: block; font-size: var(--text-body); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.kol-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.kol-card-info .tag { font-size: var(--text-xs); color: var(--color-accent-text); background: var(--color-accent-soft); border-radius: var(--radius-pill); padding: 2px 10px; flex-shrink: 0; white-space: nowrap; }
.kol-card-info .tag.cube-day { background: transparent; padding: 2px 0; font-variant-numeric: tabular-nums; }
.kol-card-info .tag.cube-day.up { color: var(--color-data-positive); }
.kol-card-info .tag.cube-day.down { color: var(--color-data-negative); }
/* 外部 ID 与平台标签同行（放不下整段换行），省一行高度 */
.kol-card-meta .ext-id { color: var(--color-text-muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.kol-card-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }
/* 主按钮与星标/删除圆按钮等高（44px），垂直居中，避免矮一截偏上 */
.kol-card-actions .btn-sub { flex: 1; height: 44px; }
/* 操作区图标按钮（星标/删除）统一尺寸，与主按钮并排协调 */
.kol-card-actions .fav-btn, .kol-card-actions .kol-del {
  width: 44px; height: 44px; padding: 0; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.kol-card-actions .kol-del:hover { border-color: var(--color-danger); color: var(--color-danger-strong); }
.kol-card-actions .kol-del .trash-icon { width: 15px; height: 15px; }
.kol-card-subtype { padding-top: 2px; }
.kol-card-subtype .sub-type-switches { gap: 14px; }

/* 分组头（grid 容器内横跨整行） */
.group-head {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 20px 2px 10px; padding: 8px 14px;
  background: var(--color-bg-muted);
  border-radius: var(--radius-control);
}
.group-head .g-count { color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }

/* 分类 chips */
.home-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.home-filter-content {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: var(--border-default);
  border-radius: var(--radius-control);
  background: var(--color-bg-muted);
}
.home-filter-content[hidden] { display: none; }
.home-scope-filters { display: flex; flex-wrap: wrap; gap: 16px; }
.home-scope-switch { min-height: 44px; }
.home-filter-toggle { width: 44px; height: 44px; padding: 0; justify-content: center; flex-shrink: 0; }
.home-head .fav-toggle.has-filter { border-color: var(--color-accent-text); color: var(--color-accent-text); background: var(--color-accent-soft); font-weight: var(--font-weight-semibold); }
.cat-chip {
  height: 32px; padding: 0 14px;
  border: var(--border-strong); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text);
  font-size: var(--text-xs); cursor: pointer;
  transition: all var(--ease-standard);
}
.cat-chip:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.cat-chip.selected { background: var(--color-accent); border-color: var(--color-accent-text); color: var(--color-white); font-weight: var(--font-weight-semibold); }
.kol-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: var(--color-white);
  font-size: var(--text-title); font-weight: var(--font-weight-semibold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kol-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
/* Truth Social 认证粉勾：压在头像右下角，描边圈住避免和照片糊在一起 */
.avatar-verified { position: relative; display: inline-flex; line-height: 0; flex-shrink: 0; }
.avatar-verified .vs-check {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--color-surface);
}
.kol-info { flex: 1; min-width: 0; cursor: pointer; text-decoration: none; }
.kol-info .base { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kol-info .name { min-width: 104px; font-size: var(--text-body); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.kol-info .tag { font-size: var(--text-xs); color: var(--color-accent-text); background: var(--color-accent-soft); border-radius: var(--radius-pill); padding: 2px 10px; }
.kol-info .desc { color: var(--color-text-muted); font-size: var(--text-xs); margin-top: 5px; }
.btn-sub {
  height: var(--control-height-lg);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  padding: 0 20px;
  flex-shrink: 0;
  transition: background var(--ease-standard), transform 120ms ease;
}
.btn-sub:hover { background: var(--color-accent-strong); }
.btn-sub:active { transform: translateY(1px); }
.btn-sub.subscribed {
  background: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid var(--color-line-success);
  box-shadow: none;
}
.btn-sub.subscribed:hover { background: var(--color-success-soft); border-color: var(--color-success); }
.sub-type-switches { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sub-type-switch {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-sm); color: var(--color-text-muted); cursor: pointer; user-select: none;
}
.sub-type-switch input { accent-color: var(--color-success); cursor: pointer; }

/* 推送通道选择 */
.channel-picks { display: flex; gap: 10px; flex-wrap: wrap; }
.channel-pick {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  /* 紧凑胶囊：按内容宽度自适应，多行自动换行，不横贯整行 */
  width: auto; flex: none; min-width: 0;
  padding: 7px 11px; border: var(--border-strong); border-radius: 999px;
  background: var(--color-surface); cursor: pointer; user-select: none;
  font-size: var(--text-sm); color: var(--color-text-strong);
  transition: all var(--ease-standard);
}
.channel-pick:hover { border-color: var(--color-accent-text); }
.channel-pick.selected {
  border-color: var(--color-accent-text);
  background: var(--color-accent-soft);
}
.channel-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.ch-icon-wrap { display: inline-flex; align-items: center; }
.ch-icon { width: 20px; height: 20px; display: block; }
.ch-label { font-weight: var(--font-weight-medium); }
.ch-check {
  width: 18px; height: 18px; border-radius: 50%;
  margin-left: auto; /* 等宽后把勾选圈推到最右，内部布局不变 */
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); line-height: 1; color: transparent;
  border: 1px solid var(--color-line-strong);
  transition: all var(--ease-standard);
}
.channel-pick.selected .ch-check {
  background: var(--color-accent); border-color: var(--color-accent-text); color: var(--color-white);
}
.channel-pick[data-channel="telegram"] .ch-icon { color: var(--color-brand-telegram); }
.channel-pick[data-channel="feishu"] .ch-icon { color: var(--color-brand-feishu); }
.channel-pick[data-channel="wecom"] .ch-icon { color: var(--color-brand-wecom); }
.channel-pick[data-channel="bark"] .ch-icon,
.channel-pick[data-channel="webpush"] .ch-icon { color: var(--color-text-strong); }

/* 帖子 */
.post-item { padding: 16px 4px; border-bottom: var(--border-soft); overflow-wrap: anywhere; }
.post-item:last-child { border-bottom: none; }
.post-item .p-header { display: flex; align-items: center; gap: 12px; min-width: 0; }
.post-item .p-header .kol-avatar { width: 38px; height: 38px; font-size: var(--text-icon); }
:is(.post-item, .kol-card) .p-name-line { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.kol-card .p-name-line .name { min-width: 0; }
.post-item .p-name { display: block; font-size: var(--text-body); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); text-decoration: none; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-item .p-name:hover { color: var(--color-accent-text); text-decoration: underline; }
.post-item .p-time { font-size: var(--text-xs); color: var(--color-text-muted); white-space: nowrap; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.post-item .p-time::before { content: "·"; margin-right: 6px; color: var(--color-text-muted); }
/* 实时资讯：大V名与时间同样式（小号灰字），时间在前、名称在后 */
.news-rt-item .p-time::before { content: none; }
.news-rt-item .p-name::before { content: "·"; margin-right: 6px; color: var(--color-text-muted); }
.news-rt-item .p-name { font-size: var(--text-xs); font-weight: 400; color: var(--color-text-muted); }
.post-item .p-tr { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: var(--text-xs); color: var(--color-text-muted); }
.post-item .p-tr-grok { width: 16px; height: 15.5px; flex: none; display: block; }
.post-item .p-tr-toggle { border: 0; background: none; padding: 0; margin-left: 4px; color: var(--color-accent-text); cursor: pointer; font: inherit; }
.post-item .p-tr-toggle:hover { text-decoration: underline; }
.post-item .p-title { font-size: var(--text-body); font-weight: var(--font-weight-semibold); margin-top: 12px; color: var(--color-text); }
/* 正文限行宽：外壳铺满后保持舒适阅读行长（65-75ch），超宽屏不整行读不动 */
.post-item .p-content { color: var(--color-text); margin-top: 8px; line-height: 1.65; overflow-wrap: break-word; word-break: normal; font-size: var(--text-body); max-width: 75ch; white-space: pre-line; }
:root.theme-dark .post-item .p-content { line-height: 1.7; }
/* Markdown 正文：块级元素自己控制换行，关掉外壳的 pre-line，避免出现双倍空行 */
.md-body { white-space: normal; }
.md-body p { margin: 0 0 8px; }
.md-body p:last-child { margin-bottom: 0; }
.md-body .md-h { font-weight: var(--font-weight-semibold); color: var(--color-text-strong); margin: 10px 0 6px; line-height: 1.4; }
.md-body .md-h:first-child { margin-top: 0; }
.md-body .md-h1 { font-size: 1.2em; }
.md-body .md-h2 { font-size: 1.12em; }
.md-body .md-h3 { font-size: 1.05em; }
.md-body .md-h4 { font-size: 1em; }
.md-body ul, .md-body ol { margin: 0 0 8px; padding-left: 22px; }
.md-body li { margin: 2px 0; }
.md-body li:last-child { margin-bottom: 0; }
.md-body blockquote { margin: 0 0 8px; padding: 4px 12px; border-left: 3px solid var(--color-accent-soft, var(--color-bg-muted)); color: var(--color-text-muted); }
.md-body blockquote:last-child { margin-bottom: 0; }
.md-body pre { margin: 0 0 8px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--color-bg-muted); overflow-x: auto; }
.md-body pre:last-child { margin-bottom: 0; }
.md-body code { font-family: ui-monospace, SFMono-Regular, Consolas, Menlo, monospace; font-size: 0.9em; }
.md-body :not(pre) > code { background: var(--color-bg-muted); border-radius: var(--radius-2xs); padding: 1px 5px; }
.md-body pre > code { display: block; white-space: pre; }
.md-body hr { border: 0; border-top: var(--border-soft); margin: 10px 0; }
.md-body a { word-break: break-all; }
.md-table-wrap { margin: 0 0 8px; overflow-x: auto; }
.md-table-wrap:last-child { margin-bottom: 0; }
.md-table-wrap table { border-collapse: collapse; width: 100%; font-size: 0.95em; }
.md-table-wrap th, .md-table-wrap td { border: var(--border-soft); padding: 5px 9px; text-align: left; vertical-align: top; }
.md-table-wrap th { background: var(--color-bg-muted); font-weight: var(--font-weight-semibold); white-space: nowrap; }
.md-table-wrap tr:first-child th { border-top: 0; }
.md-table-wrap tr:last-child td { border-bottom: 0; }
/* 快讯正文：md 输出替换原来的 \n→<br>，段落间距交给 p */
.live-body.md-body p { margin: 0 0 8px; }
.post-images { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.post-images img {
  width: 120px; height: 120px; object-fit: cover;
  border-radius: var(--radius-control);
  border: var(--border-soft);
  background: var(--color-bg-muted);
}
.post-images { position: relative; }
.post-images-more {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0, 0, 0, 0.55); color: var(--color-white);
  font-size: var(--text-xs); font-weight: var(--font-weight-semibold);
  padding: 3px 9px; border-radius: var(--radius-pill);
  pointer-events: none;
}

/* 组合调仓：PC 一行表，持仓两列；手机仍完整可读 */
.combo-post { margin-top: 10px; max-width: 75ch; }
.combo-detail { display: grid; gap: 10px; }
.combo-stats {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  padding: 6px 10px; border: var(--border-soft); background: var(--color-bg-muted);
  font-size: var(--text-sm);
}
.combo-stat { color: var(--color-text); }
.combo-stat b { color: var(--color-text-strong); font-variant-numeric: tabular-nums; }
.combo-section { display: grid; gap: 4px; }
.combo-section-title {
  margin: 0; font-size: var(--text-sm); font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
}
.combo-actions, .combo-holdings { border-top: var(--border-soft); }
.combo-action {
  display: grid;
  grid-template-columns: 3.5em minmax(0, 1fr) auto;
  align-items: baseline; column-gap: 12px;
  padding: 5px 0; border-bottom: var(--border-soft);
  font-size: var(--text-sm);
}
.combo-action-cols {
  padding-top: 6px; color: var(--color-text-muted);
  font-size: var(--text-xs); font-weight: var(--font-weight-semibold);
}
.combo-action-cols span:nth-child(3),
.combo-action-meta { text-align: right; font-variant-numeric: tabular-nums; }
.combo-action-type { color: var(--color-text-muted); white-space: nowrap; }
.combo-action-name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: var(--font-weight-semibold); color: var(--color-text-strong);
}
.combo-sym { color: var(--color-text-muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.combo-action-meta { display: inline-flex; align-items: baseline; gap: 14px; white-space: nowrap; }
.combo-action-position { color: var(--color-text-muted); }
.combo-action-price { color: var(--color-accent-text); }
.combo-holdings { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.combo-holding {
  display: table; table-layout: fixed; width: 100%;
  padding: 4px 0; border-bottom: var(--border-soft); font-size: var(--text-sm);
}
.combo-holding > span:first-child {
  display: table-cell; width: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.combo-w {
  display: table-cell; width: 4.5em; text-align: right; white-space: nowrap;
  color: var(--color-text-strong); font-variant-numeric: tabular-nums; font-weight: var(--font-weight-semibold);
}
.combo-cash b { color: var(--color-text-strong); font-variant-numeric: tabular-nums; }
.combo-cash { color: var(--color-text-muted); font-size: var(--text-sm); }
/* ---------- 图片灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8, 10, 14, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  cursor: zoom-out;
  user-select: none; /* 拖拽平移时不选中任何内容 */
  animation: lightbox-in 0.25s ease-out;
}
.lightbox-img {
  /* 按原始尺寸显示：小图不放大；仅当超过视口（减去 padding 与留白）时才缩放 */
  width: auto; height: auto;
  max-width: calc(100vw - 56px);
  max-height: calc(100vh - 56px);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
  cursor: default;
  touch-action: none; /* 缩放/平移手势全部交给 JS，禁用原生捏合与双击缩放 */
  -webkit-user-drag: none;
  animation: lightbox-img-in 0.28s ease-out;
}
/* 缩放过渡（lb-anim）：滚轮/双击/按钮/吸附复位时启用；连续拖拽与捏合中移除以保证跟手 */
.lightbox-img.lb-anim { transition: transform 0.22s ease-out, opacity 0.12s ease-out; }
.lightbox-img.lb-dragging { cursor: grabbing !important; }
/* 左上角缩放工具条：− / 当前倍数（点击复位）/ + */
.lightbox-zoom {
  z-index: 1;
  position: absolute; top: 18px; left: 18px;
  display: flex; align-items: center; gap: 8px;
}
.lightbox-zbtn {
  height: 42px; min-width: 42px; padding: 0 14px;
  border: none; border-radius: var(--radius-pill);
  background: rgba(12, 14, 18, 0.55); color: var(--color-white);
  font-size: 20px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--ease-standard);
}
.lightbox-zbtn:hover { background: rgba(12, 14, 18, 0.72); }
.lightbox-zbtn:disabled { opacity: 0.4; cursor: default; }
.lightbox-zbtn:disabled:hover { background: rgba(12, 14, 18, 0.55); }
.lightbox-zpct { font-size: var(--text-sm); }
.lightbox-close {
  z-index: 1;
  position: absolute; top: 18px; right: 18px;
  width: 42px; height: 42px; border-radius: 50%;
  border: none;
  /* 深色半透明底：放大后的亮色图片铺满视口时控件仍可辨识（与底部计数徽章一致） */
  background: rgba(12, 14, 18, 0.55); color: var(--color-white);
  font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--ease-standard);
}
.lightbox-close:hover { background: rgba(12, 14, 18, 0.72); }
/* 多图切换：左右箭头（半透明圆钮，hover 增强）+ 计数 */
.lightbox-nav {
  z-index: 1;
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  border: none;
  background: rgba(12, 14, 18, 0.55); color: var(--color-white);
  font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--ease-standard);
}
.lightbox-nav:hover { background: rgba(12, 14, 18, 0.72); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-count {
  z-index: 1;
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-sm);
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px; border-radius: var(--radius-pill);
}
/* 图片彻底失效（直连+代理都 404）时灯箱内的占位提示 */
.lightbox-dead {
  z-index: 1;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--text-sm);
  pointer-events: none; /* 点击穿透到遮罩，保持「点空白关闭」的手感 */
}
.lightbox-img { transition: opacity 0.12s ease-out; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lightbox-img-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}
/* 关闭过渡：比打开略快（200ms），淡出 + 轻微缩小，快进快出更克制 */
.lightbox.closing { animation: lightbox-out 0.2s ease-in forwards; }
.lightbox.closing .lightbox-img { animation: lightbox-img-out 0.2s ease-in forwards; }
@keyframes lightbox-out { to { opacity: 0; } }
@keyframes lightbox-img-out { to { opacity: 0; transform: scale(0.97); } }
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox-img, .lightbox.closing, .lightbox.closing .lightbox-img { animation: none; }
  /* 缩放的过渡动画也一并禁用，缩放立即生效 */
  .lightbox-img.lb-anim { transition: opacity 0.12s ease-out; }
  /* 骨架屏 shimmer 无限循环、toast 入场：reduce 下改为静态/瞬显 */
  .tl-sk-item, .tl-sk-line { animation: none; }
  .tl-new-badge.show { animation: none; }
  .toast { animation: none; }
}
.post-item .p-file { display: block; margin-top: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-xs); color: var(--color-accent-text); text-align: left; cursor: pointer; word-break: break-all; }
/* MX 语音消息播放按钮：点击即时拉取 CDN 音频流播放 */
.mx-audio-row { margin-top: 8px; }
.post-item .mx-audio-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--color-border); background: var(--color-bg);
  color: var(--color-accent-text); font-size: var(--text-xs);
  cursor: pointer; font-variant-numeric: tabular-nums;
}
.post-item .mx-audio-btn:hover { border-color: var(--color-accent-text); }
.post-item .mx-audio-btn.loading { opacity: 0.7; cursor: wait; }
.post-item .mx-audio-btn.playing { color: var(--color-accent); border-color: var(--color-accent); background: var(--color-accent-soft); }
.post-item .p-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.post-item .p-meta-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.post-item .p-meta .cat { color: var(--color-accent-text); background: var(--color-accent-soft); border-radius: var(--radius-pill); padding: 2px 10px; }
/* 标签徽章基础形态：.cat 的徽章样式原本只作用于帖子卡（.post-item .p-meta .cat），
   管理端表格/词表预览里的相邻徽章会粘成一串（如「黄河旋风个股」），这里给 .cat-tag
   统一补上底色/圆角/间距；帖子卡内由 p-meta 的 gap 控距，外边距归零保持原样 */
.cat-tag {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  color: var(--color-accent-text);
  font-size: var(--text-xs);
  /* 不加 white-space:nowrap：极端长的无空格标签（用户输入）会撑破 320px 小屏视口，
     换行交给 .post-item 的 overflow-wrap:anywhere 处理 */
}
.post-item .p-meta .cat-tag { margin: 0; }
/* 最新动态 MX 帖 tag 区首位的「持仓」按钮：与「图卡」按钮同款软底 pill + 图标，点开右侧持仓抽屉
   （按钮本体样式随 .cat 基础形态，flex/gap/hover 与 button.cat-export 共用下方选择器组） */
.post-item .p-meta .tl-hold-btn .nav-svg { width: 12px; height: 12px; flex: 0 0 auto; }
/* 「更多N」展开按钮：与标签徽章同形，可点击 */
.tags-more-btn { border: 0; font: inherit; cursor: pointer; }
/* 手动 LLM 打标进度条 */
.mx-tag-progress-bar { height: 8px; border-radius: var(--radius-pill); background: var(--color-accent-soft); overflow: hidden; }
.mx-tag-progress-fill { height: 100%; border-radius: var(--radius-pill); background: var(--color-accent); transition: width .4s var(--ease-standard, ease); }
/* 手动打标选大V弹窗 */
.admin-modal-mask { position: fixed; inset: 0; z-index: 320; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-modal { background: var(--color-bg, #fff); color: var(--color-text, #111); border-radius: 12px; width: min(560px, 100%); max-height: 82vh; display: flex; flex-direction: column; gap: 10px; padding: 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.admin-modal-title { margin: 0; font-size: var(--text-md, 16px); }
.admin-modal-list { overflow: auto; border: 1px solid var(--color-border, rgba(128, 128, 128, .3)); border-radius: 8px; }
.mx-tag-kol-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; }
.mx-tag-kol-row:hover { background: var(--color-accent-soft); }
.mx-tag-kol-row + .mx-tag-kol-row { border-top: 1px solid var(--color-border, rgba(128, 128, 128, .2)); }
.mx-tag-kol-count { margin-left: auto; font-size: var(--text-xs, 12px); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
/* 标签审核表：多选列 + 长消息钳 2 行（「更多」展开） */
.tag-review-check { width: 32px; text-align: center; }
.tag-review-check input { vertical-align: middle; }
.tag-review-msg { max-width: 460px; }
.tag-review-msg-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap;
}
.tag-review-msg-text.expanded { display: block; }
/* 标签审核「查看」弹窗：消息的现有标签 / LLM 打入的标签 / 待审核标签 */
.tag-detail-card { width: min(680px, 100%); position: relative; }
.tag-detail-close {
  position: absolute; top: 12px; right: 14px; width: 26px; height: 26px;
  border: 0; border-radius: var(--radius-pill); background: var(--color-surface-muted);
  color: var(--color-text-muted); font-size: var(--text-md, 15px); line-height: 1; cursor: pointer;
}
.tag-detail-close:hover { color: var(--color-text-strong); }
.tag-detail-body { overflow: auto; }
.tag-detail-section { margin-top: 16px; }
.tag-detail-sec-title { margin: 0 0 8px; font-size: var(--text-xs); font-weight: var(--font-weight-semibold, 600); color: var(--color-text-muted); }
.tag-detail-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag-detail-chip.is-llm { box-shadow: inset 0 0 0 1px var(--color-accent); }
.tag-llm-badge {
  font-style: normal; font-size: var(--text-xs); line-height: 14px; padding: 0 5px;
  border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-surface, #fff);
}
/* 智囊团观点回流：标签多空方向角标（红涨绿跌）与来源徽标 */
.tag-dir {
  font-style: normal; font-size: var(--text-xs); line-height: 14px; padding: 0 4px; margin-left: 2px;
  border-radius: var(--radius-pill); font-weight: 600;
}
.tag-dir.bull { background: rgba(216, 56, 79, .14); color: #c22a40; }
.tag-dir.bear { background: rgba(12, 166, 120, .14); color: #067a56; }
.theme-dark .tag-dir.bull { background: rgba(255, 93, 108, .16); color: #ff8090; }
.theme-dark .tag-dir.bear { background: rgba(46, 230, 168, .14); color: #5fe8bd; }
.tag-src-badge {
  font-style: normal; font-size: var(--text-xs); line-height: 14px; padding: 0 5px; margin-left: 4px;
  border-radius: var(--radius-pill); background: var(--color-surface-muted); color: var(--color-text-muted);
}
/* 待审标签：审核队列未通过的标签提示性展示（虚线框 + 待审角标），仅供实时决策参考，不可点筛选 */
.cat.tag-pending { border: 1px dashed currentColor; cursor: default; }
.post-item .p-meta .cat.tag-pending { opacity: .75; }
.tag-pending-badge {
  font-style: normal; font-size: var(--text-xs); line-height: 14px; padding: 0 4px; margin-left: 2px;
  border-radius: var(--radius-pill); background: rgba(176, 127, 44, .16); color: #96690f; font-weight: 600;
}
.theme-dark .tag-pending-badge { background: rgba(255, 193, 94, .16); color: #ffc861; }
/* 大众评审：带审核 id 的待审标签可点开审核弹窗（按钮形态 chip），已裁决的禁用 */
.cat.tag-pending.tag-review-open { cursor: pointer; }
.cat.tag-pending.tag-review-open:hover { border-style: solid; }
.cat.tag-pending.tag-review-open:disabled { cursor: default; opacity: .6; }
.tag-pending-badge.is-approved { background: rgba(12, 166, 120, .14); color: #067a56; }
.tag-pending-badge.is-rejected { background: rgba(216, 56, 79, .14); color: #c22a40; }
.theme-dark .tag-pending-badge.is-approved { background: rgba(46, 230, 168, .14); color: #5fe8bd; }
.theme-dark .tag-pending-badge.is-rejected { background: rgba(255, 93, 108, .16); color: #ff8090; }
/* 标签审核投票弹窗：标签 + 消息摘要 + 投票进度 + 通过/拒绝 */
.tag-vote-card { width: min(480px, 100%); position: relative; }
.tag-vote-target { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag-vote-source { font-size: var(--text-xs); }
.tag-vote-excerpt {
  margin: 10px 0 0; font-size: var(--text-xs); line-height: 1.6; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tag-vote-progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: var(--text-sm, 14px); }
.tag-vote-count { font-weight: var(--font-weight-semibold, 600); }
.tag-vote-count.approve { color: #c22a40; }
.tag-vote-count.reject { color: #067a56; }
.theme-dark .tag-vote-count.approve { color: #ff8090; }
.theme-dark .tag-vote-count.reject { color: #5fe8bd; }
.tag-vote-hint { margin: 8px 0 0; font-size: var(--text-xs); line-height: 1.6; }
.tag-vote-actions { display: flex; gap: 10px; margin-top: 16px; }
.tag-vote-actions button { flex: 1; }
.tag-vote-actions button:disabled { opacity: .55; cursor: default; }
/* 管理后台「标签审核」面板内的大众评审配置行 */
.tag-review-vote-config {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin-top: 12px; padding: 10px 12px;
  border: 1px dashed var(--color-border); border-radius: var(--radius-md, 10px);
  font-size: var(--text-xs); color: var(--color-text-muted);
}
.tag-review-vote-config .tag-review-vote-toggle { display: flex; align-items: center; gap: 6px; color: var(--color-text); }
.tag-review-vote-config .tag-review-vote-num { display: inline-flex; align-items: center; gap: 6px; }
.tag-review-vote-config input[type="number"] { width: 64px; padding: 4px 6px; }
.tag-detail-pending-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.tag-detail-pending-row + .tag-detail-pending-row { border-top: 1px dashed var(--color-border); }
.tag-detail-pending-meta { flex: 1; font-size: var(--text-xs); color: var(--color-text-muted); }
.tag-detail-pending-ops { display: flex; gap: 6px; }
.tag-detail-msg {
  max-height: 130px; overflow: auto; padding: 10px 12px;
  background: var(--color-surface-muted); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: var(--text-xs); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
/* 原始消息弹窗：标签区（管理员可增删） */
.mx-raw-tags { margin-top: 14px; }
.mx-raw-tags-title { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: 8px; }
.mx-raw-tags-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mx-raw-tag { display: inline-flex; align-items: center; gap: 4px; }
.mx-raw-tag-del {
  border: 0; background: none; padding: 0 1px; margin: 0 -2px 0 0;
  font: inherit; font-size: var(--text-sm, 13px); line-height: 1;
  color: inherit; opacity: .55; cursor: pointer; border-radius: var(--radius-pill, 999px);
}
.mx-raw-tag-del:hover { opacity: 1; color: var(--color-danger-strong, #d33); }
.mx-raw-tag-add { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.mx-raw-tag-add .form-control { flex: 1; min-width: 0; margin-bottom: 0; }
.post-item .p-meta a.cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  position: relative;
}
.post-item .p-meta .ui-icon { width: 12px; height: 12px; }
.post-item .p-meta .cat.post-tag-filter,
.post-item .p-meta button.cat-export,
.post-item .p-meta button.tl-hold-btn {
  position: relative;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.post-item .p-meta button.cat-export,
.post-item .p-meta button.tl-hold-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.post-item .p-meta button.cat-export[data-busy="1"] { cursor: wait; opacity: .7; }
.post-item .p-meta .cat.post-tag-filter:hover,
.post-item .p-meta .cat.post-tag-filter:focus-visible,
.post-item .p-meta button.cat-export:hover,
.post-item .p-meta button.cat-export:focus-visible,
.post-item .p-meta button.tl-hold-btn:hover,
.post-item .p-meta button.tl-hold-btn:focus-visible {
  color: var(--color-accent);
  outline: 2px solid var(--color-accent-text);
  outline-offset: 2px;
}
.tl-group { margin-bottom: 4px; }
.tl-group:last-child { margin-bottom: 0; }
.tl-group-head { margin: 18px 0 4px; font-size: var(--text-xs); font-weight: 400; color: var(--color-text-faint); display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.tl-group-count { font-weight: normal; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.tl-group:first-child .tl-group-head { margin-top: 0; }
.post-expand-btn { display: inline-block; margin-left: 6px; font-size: var(--text-xs); color: var(--color-accent-text); cursor: pointer; user-select: none; white-space: nowrap; border: none; background: none; padding: 0; }
.post-expand-btn:hover { text-decoration: underline; }

/* ---------- 动态页筛选条（平台胶囊 + 折叠筛选面板） ---------- */
#tl-active-chips-wrap.is-hidden { display: none; }
.tl-new-badge.live-mode .tl-badge-avatars { display: none; }

.live-feed-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 0 4px 12px;
  border-bottom: var(--border-soft);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.live-toolbar-clock { color: var(--color-text-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-toolbar-divider { width: 1px; height: 18px; background: var(--color-line); flex: 0 0 auto; }
.live-important-toggle { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; cursor: pointer; }
.live-important-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--color-accent); }

.live-feed { display: flex; flex-direction: column; }
.live-item {
  display: flex;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: var(--border-soft);
}
.live-item:last-child { border-bottom: none; }
.live-time {
  flex: 0 0 42px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.65;
  padding-top: 1px;
}
.live-main { flex: 1; min-width: 0; }
.live-title {
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-danger);
  margin-bottom: 4px;
}
.live-body {
  display: block;
  color: var(--color-text);
  font-size: var(--text-body);
  line-height: 1.65;
  text-decoration: none;
  overflow-wrap: break-word;
  word-break: normal;
  max-width: 75ch;
}
.live-body p { margin: 0 0 8px; }
.live-body p:last-child { margin-bottom: 0; }
.live-body strong, .live-body b { font-weight: var(--font-weight-semibold); }
.live-item[data-score="2"] .live-time,
.live-item[data-score="2"] .live-title,
.live-item[data-score="2"] .live-body,
.live-item[data-score="3"] .live-time,
.live-item[data-score="3"] .live-title,
.live-item[data-score="3"] .live-body {
  color: var(--color-danger-strong);
  font-weight: var(--font-weight-semibold);
}
.live-item[data-score="3"] {
  background: var(--color-danger-soft);
  border-radius: var(--radius-control);
  padding-inline: 8px;
}
.live-attribution {
  margin: 16px 4px 0;
  font-size: var(--text-xs);
  text-align: center;
}
.live-attribution a { color: var(--color-text-muted); }
.live-attribution a:hover { color: var(--color-accent-text); }

/* 快讯播报按钮：管理员在快讯卡片上手动转发到V平台 KOL */
.live-broadcast-btn {
  margin-top: 8px;
  font-size: var(--text-xs);
  opacity: 0.7;
  transition: opacity 0.15s;
}
.live-broadcast-btn:hover { opacity: 1; }
.live-broadcast-btn.done { opacity: 0.45; cursor: default; }
.wscn-broadcast-panel { margin-top: 16px; }
.wscn-broadcast-panel .switch { font-weight: var(--font-weight-medium); }

.tl-filterbar {
  position: sticky;
  top: calc(56px + var(--safe-top));
  z-index: 25;
  overflow: visible;
  background: var(--color-bg);
  margin: 0 calc(-1 * var(--page-pad-x)) 4px;
  padding: 14px var(--page-pad-x) 12px;
} /* 不透明画布色 + 拉满与 topbar 同宽；新帖胶囊挂在条底，随筛选条吸顶 */
/* 生效筛选条件 chip：筛选后常驻可见，逐个可移除（P0：筛选状态可见） */
.tl-active-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.tl-active-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 6px 0 12px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  color: var(--color-accent-text);
  font-size: var(--text-xs);
}
.tl-chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0; border: none; background: transparent;
  color: inherit; cursor: pointer; border-radius: 50%;
}
.tl-chip-x:hover { background: var(--color-surface-hover); }
.tl-chip-x .x-icon { width: 12px; height: 12px; }
.tl-feed-panel { margin-top: 0; }
.tl-ima-entry { display: none; }
@media (max-width: 900px) {
  .tl-ima-entry { display: block; margin: 0 0 8px; }
  /* 手机端入口压成单行紧凑条：只留标题一行（提一级优先级，压过下方基础规则的 52px/双行） */
  .tl-ima-entry .tl-ima-entry-btn { min-height: 44px; padding: 6px 12px; }
  .tl-ima-entry .tl-ima-entry-btn small { display: none; }
}
.tl-ima-entry-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px;
  padding: 8px 12px; border: var(--border-default); border-radius: var(--radius-card);
  background: var(--color-surface); color: var(--color-text); text-align: left; cursor: pointer;
}
.tl-ima-entry-btn:hover { border-color: var(--color-accent); background: var(--color-surface-hover); }
.tl-ima-entry-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.tl-ima-entry-icon { display: inline-flex; color: var(--color-accent-text); }
.tl-ima-entry-icon svg { width: 20px; height: 20px; }
.tl-ima-entry-btn strong, .tl-ima-entry-btn small { display: block; }
.tl-ima-entry-btn small { margin-top: 2px; color: var(--color-text-muted); font-size: var(--text-xs); }
.tl-feed-panel.has-new { padding-top: 36px; } /* 胶囊从筛选条底边探出时，给首条卡片让位 */
.tl-new-badge {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, -16px);
  display: none; z-index: 26;
}
.tl-new-badge.show { display: block; animation: tl-new-slide 0.25s var(--ease-standard); }
.tl-new-badge-btn {
  display: inline-flex; align-items: center; white-space: nowrap;
  height: 40px; padding: 4px 16px; line-height: 1; gap: 0;
  overflow: hidden;
  border: none; background: var(--color-accent); color: var(--color-white);
  font-size: var(--text-body); font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 8px rgba(101, 119, 134, 0.2), 0 1px 3px 1px rgba(101, 119, 134, 0.25);
  cursor: pointer;
  transition: background var(--ease-standard);
}
.theme-dark .tl-new-badge-btn {
  box-shadow: 0 0 5px rgba(217, 217, 217, 0.2), 0 1px 4px 1px rgba(217, 217, 217, 0.25);
}
.tl-new-badge-btn:hover { background: var(--color-accent-strong); }
.tl-new-badge-btn:hover .tl-badge-avatars > * { border-color: var(--color-accent-strong); }
.tl-new-badge-btn:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}
.tl-badge-arrow {
  width: 20px; height: 20px; flex-shrink: 0;
}
.tl-badge-avatars {
  display: inline-flex; align-items: center; isolation: isolate;
  margin-inline: 4px 6px;
}
.tl-badge-avatars > * {
  position: relative; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--color-accent); margin-left: -12px;
  box-sizing: border-box;
}
.tl-badge-avatars > *:nth-child(1) { z-index: 3; margin-left: 0; }
.tl-badge-avatars > *:nth-child(2) { z-index: 2; }
.tl-badge-avatars > *:nth-child(3) { z-index: 1; }
.tl-badge-avatars img { object-fit: cover; display: block; background: rgba(255, 255, 255, 0.2); }
.tl-badge-avatars .ph {
  background: rgba(255, 255, 255, 0.28); color: var(--color-white);
  font-size: var(--text-xs); font-weight: var(--font-weight-bold);
  display: inline-flex; align-items: center; justify-content: center;
}
@keyframes tl-new-slide {
  from { opacity: 0; transform: translate(-50%, -22px); }
  to { opacity: 1; transform: translate(-50%, -16px); }
}
.tl-skeleton { display: flex; flex-direction: column; gap: 16px; padding: 4px 0; }
.tl-sk-item { display: flex; gap: 12px; align-items: flex-start; }
.tl-sk-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(90deg, var(--color-bg-muted) 25%, var(--color-surface-accent-soft) 50%, var(--color-bg-muted) 75%);
  background-size: 200% 100%; animation: tl-sk-shimmer 1.4s infinite;
}
.tl-sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tl-sk-line {
  height: 13px; border-radius: var(--radius-2xs);
  background: linear-gradient(90deg, var(--color-bg-muted) 25%, var(--color-surface-accent-soft) 50%, var(--color-bg-muted) 75%);
  background-size: 200% 100%; animation: tl-sk-shimmer 1.4s infinite;
}
@keyframes tl-sk-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 管理后台加载骨架：与动态页 shimmer 同一动画，数据到达后整块被覆盖 */
.admin-skeleton { display: flex; flex-direction: column; gap: 14px; padding: 2px 0; }
.admin-sk-card { border: var(--border-default); border-radius: var(--radius-card); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.admin-sk-line {
  height: 14px; border-radius: var(--radius-2xs);
  background: linear-gradient(90deg, var(--color-bg-muted) 25%, var(--color-surface-accent-soft) 50%, var(--color-bg-muted) 75%);
  background-size: 200% 100%; animation: tl-sk-shimmer 1.4s infinite;
}
.admin-sk-head { height: 18px; width: 32%; }
.admin-sk-table-row { display: flex; gap: 12px; }
.admin-sk-table-row .admin-sk-line { flex: 1; }
.tl-filterbar-top { display: flex; align-items: center; gap: 10px; }
.tl-pills {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 8px;
  flex: 1;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}
.tl-pill[data-platform="xueqiu"],
.platform-tab[data-platform="xueqiu"] { margin-inline-end: 6px; }
/* 大V头像行：平台胶囊行下的第二排，点击头像只看该大V，再点取消。
   默认单行横向滑动；溢出时显示展开开关，展开后多行平铺 */
.tl-kolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  /* 原 10px：6px 移入 strip 的 padding-top，给新帖角标留出不被裁剪的探出空间 */
  margin-top: 4px;
}
.tl-kolbar[hidden] { display: none; }
.tl-kolbar-strip {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 10px;
  flex: 1;
  min-width: 0;
  /* 顶部/右侧留白：角标向头像外探出，滚动容器 overflow 裁剪需要这部分空间 */
  padding-top: 6px;
  padding-inline-end: 6px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tl-kolbar-strip::-webkit-scrollbar { display: none; height: 0; width: 0; }
.tl-kolbar.expanded { align-items: flex-start; }
.tl-kolbar.expanded .tl-kolbar-strip {
  flex-wrap: wrap;
  overflow: visible;
  touch-action: pan-y;
  row-gap: 10px;
}
.tl-kolbar-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border: var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--ease-standard), color var(--ease-standard);
}
/* 展开态开关在 strip 内作为换行项，与首行头像圆垂直居中：(头像40 - 开关26) / 2 */
.tl-kolbar.expanded .tl-kolbar-toggle { margin-top: 7px; }
.tl-kolbar-toggle:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.tl-kolbar-toggle:focus-visible { outline: 2px solid var(--color-accent-text); outline-offset: 2px; }
.tl-kolbar-toggle[hidden] { display: none; }
.tl-kolbar-caret { width: 12px; height: 12px; flex-shrink: 0; }
.tl-kolbar.expanded .tl-kolbar-caret { transform: rotate(180deg); }
.tl-kol-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 52px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-text);
  cursor: pointer;
  flex-shrink: 0;
}
.tl-kol-av {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--color-bg-muted);
  box-sizing: border-box;
  transition: border-color var(--ease-standard);
}
.tl-kol-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-kol-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
}
.tl-kol-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.tl-kol-item:hover .tl-kol-av,
.tl-kol-item:hover .tl-kol-name { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.tl-kol-item:focus-visible { outline: 2px solid var(--color-accent-text); outline-offset: 2px; }
.tl-kol-item.selected .tl-kol-av { border-color: var(--color-accent); }
.tl-kol-item.selected .tl-kol-name { color: var(--color-accent-text); font-weight: var(--font-weight-semibold); }
/* 新消息角标：头像右上角探出的小圆，筛选单一大V时显示其他大V新到的动态条数 */
.tl-kol-avwrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.tl-kol-count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-danger);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 17px;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
}
/* 返回顶部：动态页/实时资讯页滚动较深时出现在右下角（移动端悬在 bottom-nav 上方）；
   PC 和手机都显示，有待读新帖时带条数角标提前弹出 */
.tl-backtop {
  display: inline-flex;
  position: fixed;
  right: 14px;
  bottom: calc(84px + var(--safe-bottom));
  z-index: 55;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: var(--border-default);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--ease-standard), transform var(--ease-standard);
}
.tl-backtop.show { opacity: 1; pointer-events: auto; transform: none; }
.tl-backtop svg { width: 18px; height: 18px; }
.tl-backtop-new {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--color-danger, #e5484d);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold, 600);
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(229, 72, 77, 0.4);
}
.tl-backtop.has-new { border-color: var(--color-danger, #e5484d); color: var(--color-danger, #e5484d); }
/* PC：不再 fixed 在视口右下角（宽屏会落到右侧栏下面，很难看到），改为 sticky 挂在动态列末尾，
   始终贴着动态框右缘——滚动途中悬在窗口底部，滚到列表末尾就停靠在动态框右下方 */
@media (min-width: 769px) {
  .tl-backtop {
    position: sticky;
    display: flex;
    margin: 10px 0 0 auto;
    top: auto;
    right: auto;
    bottom: 32px;
  }
}
/* 实时资讯新帖胶囊（fixed 吸顶，与最新动态的 tl-new-badge 视觉一致） */
.news-rt-new-badge {
  position: fixed; top: calc(56px + var(--safe-top) + 10px); left: 50%;
  transform: translateX(-50%);
  display: none; z-index: 26;
}
.news-rt-new-badge.show { display: block; animation: news-rt-badge-in 0.25s var(--ease-standard); }
.news-rt-new-badge-btn {
  display: inline-flex; align-items: center; white-space: nowrap;
  height: 40px; padding: 4px 16px; line-height: 1; gap: 0;
  overflow: hidden; border: none; border-radius: var(--radius-pill);
  background: var(--color-accent); color: var(--color-white);
  font-size: var(--text-body); font-weight: var(--font-weight-semibold);
  box-shadow: 0 0 8px rgba(101, 119, 134, 0.2), 0 1px 3px 1px rgba(101, 119, 134, 0.25);
  cursor: pointer; transition: background var(--ease-standard);
}
.theme-dark .news-rt-new-badge-btn {
  box-shadow: 0 0 5px rgba(217, 217, 217, 0.2), 0 1px 4px 1px rgba(217, 217, 217, 0.25);
}
.news-rt-new-badge-btn:hover { background: var(--color-accent-strong); }
.news-rt-new-badge-btn:focus-visible { outline: 2px solid var(--color-white); outline-offset: 2px; }
.news-rt-new-badge-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.news-rt-badge-avatars {
  display: inline-flex; align-items: center; isolation: isolate;
  margin-inline: 4px 6px;
}
.news-rt-badge-avatars > * {
  position: relative; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--color-accent); margin-left: -12px;
  box-sizing: border-box;
}
.news-rt-badge-avatars > *:nth-child(1) { z-index: 3; margin-left: 0; }
.news-rt-badge-avatars > *:nth-child(2) { z-index: 2; }
.news-rt-badge-avatars > *:nth-child(3) { z-index: 1; }
.news-rt-badge-avatars img { object-fit: cover; display: block; background: rgba(255, 255, 255, 0.2); }
.news-rt-badge-avatars .ph {
  background: rgba(255, 255, 255, 0.28); color: var(--color-white);
  font-size: var(--text-xs); font-weight: var(--font-weight-bold);
  display: inline-flex; align-items: center; justify-content: center;
}
.news-rt-new-badge-btn:hover .news-rt-badge-avatars > * { border-color: var(--color-accent-strong); }
@keyframes news-rt-badge-in {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .news-rt-new-badge.show { animation: none; }
}
.tl-filter-views { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-filter-views .fav-toggle { flex: 1; min-width: 0; justify-content: center; }
.tl-filterbar .fav-toggle { height: 44px; min-height: 44px; }
.tl-filter-views .fav-toggle,
.tl-rail-view .fav-toggle { height: 44px; min-height: 44px; }
.tl-actions { display: flex; gap: 10px; flex-shrink: 0; }
.tl-layout { display: flex; align-items: flex-start; gap: 20px; }
.tl-main { flex: 1; min-width: 0; }
.tl-layout .tl-feed-panel { flex: 1; min-width: 0; margin-top: 16px; }
@media (min-width: 1280px) {
  .tl-filterbar {
    min-height: 64px;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
  }
  .tl-filterbar-top { width: 100%; }
  .tl-layout {
    display: grid;
    grid-template-columns: minmax(680px, 1fr) 300px;
    column-gap: 20px;
    align-items: start;
  }
  .tl-rail-head {
    height: 64px;
    display: flex;
    align-items: center;
  }
  .tl-rail-head > .tl-rail-search {
    width: 100%;
    min-width: 0;
  }
  .tl-rail {
    width: 100%;
    position: sticky;
    top: calc(56px + var(--safe-top));
  }
  .tl-layout.live-mode .tl-rail-view,
  .tl-layout.live-mode #tl-rail-recs,
  .tl-layout.live-mode #tl-rail-tags { display: none; }
}
@media (max-width: 1279px) {
  .tl-layout { display: block; }
  .tl-rail { display: none; }
}
.tl-rail-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
#tl-rail-recs:empty,
#tl-rail-tags:empty { display: none; }
.tl-rail-card {
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-card);
  padding: 16px;
}
.tl-live-rail { display: none; }
.tl-layout.live-mode .tl-live-rail { display: block; }
.live-rail-stats { margin: 0; }
.live-rail-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: var(--border-soft);
}
.live-rail-stats > div:last-child { border-bottom: 0; }
.live-rail-stats dt { color: var(--color-text-muted); }
.live-rail-stats dd { margin: 0; color: var(--color-text-strong); font-variant-numeric: tabular-nums; }
.live-rail-refresh { width: 100%; margin-top: 12px; justify-content: center; }
.live-rail-refresh .refresh-icon { width: 15px; height: 15px; }
.tl-rail-title {
  font-size: var(--text-title);
  font-weight: var(--font-weight-semibold);
  margin: 0 0 12px;
}
.tl-rail-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.tl-rail-view .fav-toggle { width: 100%; justify-content: center; }
.market-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); cursor: pointer; }
.market-heading .tl-rail-title { margin: 0; font-size: var(--text-body); font-weight: var(--font-weight-semibold); }
.market-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
.market-toggle .market-chevron { flex-shrink: 0; color: var(--color-text-muted); transition: transform var(--ease-standard); }
.market-toggle[aria-expanded="false"] .market-chevron { transform: rotate(-90deg); }
.market-body[hidden] { display: none; }
.market-status, .market-footer { color: var(--color-text-muted); font-size: var(--text-xs); }
.market-status { flex-shrink: 0; }
.market-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-3); }
.market-tabs { display: flex; gap: 2px; padding: 3px; background: var(--color-bg); border-radius: var(--radius-2xs); }
.market-tabs button { min-height: 32px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-2xs); background: transparent; color: var(--color-text-muted); font-size: var(--text-xs); }
.market-tabs button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.market-auto { display: flex; align-items: center; gap: 4px; min-height: 38px; font-size: var(--text-xs); color: var(--color-text-muted); cursor: pointer; }
.market-auto input { margin: 0; accent-color: var(--color-accent); }
.market-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: var(--space-2); font-size: var(--text-sm); }
.market-table th, .market-table td { height: 58px; padding: 0; border-bottom: var(--border-soft); background: transparent; vertical-align: middle; }
.market-table th { width: 36%; text-align: left; font-size: inherit; font-weight: var(--font-weight-medium); color: var(--color-text); }
.market-table .market-chart { width: 26%; padding: 0 4px; }
.market-table .market-values { width: 38%; }
.market-table tr:last-child th, .market-table tr:last-child td { border-bottom: 0; }
.market-table td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.market-name, .market-price { display: block; line-height: 20px; }
.market-price { color: var(--color-text-strong); font-size: var(--text-body); font-weight: var(--font-weight-semibold); }
.market-symbol, .market-change { display: block; font-size: var(--text-xs); line-height: 18px; }
.market-symbol { color: var(--color-text-muted); font-weight: normal; }
.market-spark { display: block; width: 100%; height: 36px; overflow: visible; }
.market-spark polyline { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.market-spark-baseline { stroke: var(--color-line-strong); stroke-width: 1; stroke-dasharray: 2 3; }
.market-spark-empty { display: block; text-align: center; color: var(--color-text-muted); font-size: var(--text-xs); }
.market-change.positive, .market-spark.positive { color: var(--color-data-positive); }
.market-change.negative, .market-spark.negative { color: var(--color-data-negative); }
.market-change.flat, .market-spark.flat { color: var(--color-text-muted); }
.market-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 24px; margin-top: var(--space-2); }
.market-retry { border: 0; background: transparent; color: var(--color-accent-text); font-size: var(--text-xs); min-height: 32px; padding: 0 var(--space-2); }
.market-retry:disabled { color: var(--color-text-muted); cursor: wait; }
.tl-rail-rec { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.tl-rail-rec + .tl-rail-rec { margin-top: 8px; }
.tl-rail-rec .kol-avatar { width: 36px; height: 36px; flex-shrink: 0; }
.tl-rail-rec-info { flex: 1; min-width: 0; }
.tl-rail-rec-name {
  display: block;
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-rail-rec .btn-ghost { flex-shrink: 0; }
.tl-rail-subscribe {
  width: 72px;
  padding: 0 6px;
  color: var(--color-text-strong);
  white-space: nowrap;
}
.tl-rail-subscribe[disabled],
.tl-rail-subscribe[aria-busy="true"] {
  opacity: 0.55;
  cursor: wait;
}
.tl-rail-fail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tl-rail-fail .muted { margin: 0; }
.tl-rail-subscribe-action { display: none; }
.tl-rail-subscribe.subscribed {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-text-strong);
}
.tl-rail-subscribe.subscribed:hover .tl-rail-subscribe-state,
.tl-rail-subscribe.subscribed:focus-visible .tl-rail-subscribe-state { display: none; }
.tl-rail-subscribe.subscribed:hover .tl-rail-subscribe-action,
.tl-rail-subscribe.subscribed:focus-visible .tl-rail-subscribe-action { display: inline; }
.tl-rail-rec-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-rail-more { display: inline-block; margin-top: 10px; font-size: var(--text-sm); }
.tl-rail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-rail-tag {
  height: 32px; padding: 0 12px;
  border: var(--border-strong); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text);
  font-size: var(--text-xs); cursor: pointer;
}
.tl-rail-tag.selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}
.tl-actions .fav-toggle.has-filter { border-color: var(--color-accent-text); color: var(--color-accent-text); background: var(--color-accent-soft); font-weight: var(--font-weight-semibold); }
.tl-filter-panel { display: none; margin-top: 12px; padding-top: 12px; border-top: var(--border-default); flex-direction: column; gap: 10px; }
.tl-filterbar.open .tl-filter-panel { display: flex; }
.tl-filter-panel .form-control { margin: 0; width: 100%; }
.tl-filter-row { display: flex; gap: 10px; }
.tl-filter-row .form-control { flex: 1; min-width: 0; }
.tl-filter-actions { display: flex; gap: 10px; justify-content: flex-end; }
.tag-vocab-preview { display: flex; flex-wrap: wrap; gap: 8px; }
:is(.post-item, .kol-card) .p-name-line .p-platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-bg-muted);
  flex-shrink: 0;
}
:is(.post-item, .kol-card) .p-name-line .p-platform .pt-icon { width: 13px; height: 13px; }
:is(.post-item, .kol-card) .p-name-line .p-platform[data-platform="xueqiu"] .pt-icon { color: var(--color-brand-xueqiu); }
:is(.post-item, .kol-card) .p-name-line .p-platform[data-platform="combination"] .pt-icon { color: var(--color-brand-xueqiu); }
:is(.post-item, .kol-card) .p-name-line .p-platform[data-platform="weibo"] .pt-icon { color: var(--color-brand-weibo); }
:is(.post-item, .kol-card) .p-name-line .p-platform[data-platform="twitter"] .pt-icon { color: var(--color-brand-twitter); }
:is(.post-item, .kol-card) .p-name-line .p-platform[data-platform="zsxq"] .pt-icon { color: var(--color-brand-zsxq); }

/* Compensate for the official mark's 18.4/24 artwork bounds without changing paths. */
.pt-icon.xueqiu-icon { width: 21px; height: 21px; }
.plaza-src-icon .pt-icon.xueqiu-icon { width: 26px; height: 26px; }
:is(.post-item, .kol-card) .p-name-line .p-platform .xueqiu-icon { width: 17px; height: 17px; }
.tl-pill .pt-icon.xueqiu-icon,
.platform-tab .pt-icon.xueqiu-icon { width: 22px; height: 22px; padding: 1px; }
/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td { padding: 12px 10px; text-align: left; border-bottom: var(--border-soft); white-space: nowrap; }
th { color: var(--color-text-muted); font-weight: var(--font-weight-semibold); font-size: var(--text-xs); background: var(--color-bg-table-head); }
tbody tr { transition: background var(--ease-standard); }
tbody tr:hover { background: var(--color-surface-row-hover); }
.ak-row-flash { background: var(--color-accent-soft); }
.btn-sm {
  font-size: var(--text-xs); padding: 5px 12px; min-height: 32px;
  border: var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-strong);
  transition: border-color var(--ease-standard), color var(--ease-standard), background var(--ease-standard);
}
.btn-sm:hover { border-color: var(--color-text-muted); }
.btn-sm:disabled { opacity: 0.55; cursor: default; }
td .btn-sm { margin-right: 6px; }
/* 大V管理档位下拉：与同行 btn-sm 按钮保持同尺寸外观 */
select.btn-sm.form-control { width: auto; padding: 5px 8px; height: auto; min-height: 32px; }
.btn-sm.danger { color: var(--color-danger); border-color: var(--color-line-danger); }
.btn-sm.danger:hover { border-color: var(--color-danger); color: var(--color-danger-strong); }
/* 首页大V行：删除按钮与订阅按钮同尺寸（表格内的 btn-sm 保持紧凑） */
.kol-item .btn-sm.danger {
  height: var(--control-height-lg);
  padding: 0 20px;
  font-size: var(--text-sm);
}
.status-ok { color: var(--color-success); }
.status-fail { color: var(--color-danger); }
.status-warn { color: var(--color-warning); }

.rc-generate {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-3);
  max-width: 860px;
}
.rc-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.rc-field > span {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-strong);
  line-height: 1.2;
}
.rc-field .cfg-unit { color: var(--color-text-faint); font-weight: normal; }
.rc-field .form-control,
.rc-generate .form-control {
  margin: 0;
  width: 100%;
}
.rc-field-note { flex: 1 1 220px; max-width: 360px; }
.rc-field-count { width: 88px; flex: 0 0 88px; }
.rc-field-num { width: 108px; flex: 0 0 108px; }
.rc-field-expires { width: 148px; flex: 0 0 148px; }
.rc-presets { display: flex; gap: var(--space-2); flex-shrink: 0; }
.rc-preset {
  height: var(--control-height-2xl);
  padding: 0 14px;
  border: var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text-strong);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: border-color var(--ease-standard), color var(--ease-standard), background var(--ease-standard);
}
.rc-preset:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.rc-preset.selected {
  background: var(--color-accent-soft);
  border-color: var(--color-accent-text);
  color: var(--color-accent-text);
  font-weight: var(--font-weight-semibold);
}
.rc-field-submit { display: flex; align-items: stretch; }
.rc-field-submit > button { height: var(--control-height-2xl); }
.rc-generate-hint {
  min-height: var(--control-height-2xl);
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
}
.rc-list-head,
.au-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
}
.rc-search,
.au-search { width: min(280px, 100%); }
.rc-result {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--color-surface-muted);
  border: var(--border-default);
  border-radius: var(--radius-control);
}
.rc-result-head, .rc-batch-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.rc-result-actions, .rc-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.rc-result-codes {
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rc-result-row, .rc-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rc-result-row { display: flex; }
.rc-batch + .rc-batch { margin-top: 16px; padding-top: 16px; border-top: var(--border-default); }
.rc-batch-head { margin-bottom: 8px; }
.rc-batch-info { min-width: 0; }
.rc-batch-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rc-batch-meta { margin: 4px 0 0; }
.rc-empty { padding: 24px 0; margin: 0; }
.rc-table { table-layout: fixed; }
.rc-table th:nth-child(1) { width: 22%; }
.rc-table th:nth-child(2) { width: 18%; }
.rc-table th:nth-child(3) { width: 10%; }
.rc-table th:nth-child(4) { width: 12%; }
.rc-table th:nth-child(5) { width: 26%; }
.rc-table th:nth-child(6) { width: 12%; }
.rc-table td { vertical-align: middle; }
.rc-counts {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-accent-text);
  background: var(--color-accent-soft);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  white-space: nowrap;
}
.admin-batch-bar { align-items: center; }
.rc-code .rc-check, .rc-batch-title .rc-batch-check {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}
.rc-batch-title { align-items: center; }
.rc-list-toolbar {
  display: flex;
  align-items: center;
  margin: 10px 0 4px;
}
.rc-checkall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  user-select: none;
}
.rc-checkall input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}

.rate-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}
.rate-bar {
  flex: 1;
  min-width: 64px;
  height: 16px;
  background: var(--color-bg-muted);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.rate-fill {
  height: 100%;
  border-radius: var(--radius-pill);
}
.rate-fill.ok { background: var(--color-success); }
.rate-fill.warn { background: var(--color-warning); }
.rate-fill.fail { background: var(--color-danger); }
.rate-label {
  flex-shrink: 0;
  min-width: 3.25em;
  text-align: right;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
  font-variant-numeric: tabular-nums;
}
.channel-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: stretch;
}
.channel-card {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  background: var(--color-bg-muted);
  border: var(--border-soft);
  border-radius: var(--radius-control);
  padding: 18px 20px;
}
.channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.channel-head b { color: var(--color-text-strong); }
.channel-title { display: inline-flex; align-items: center; gap: 8px; }
.channel-title .ch-icon { width: 22px; height: 22px; }
.channel-card[data-channel="telegram"] .ch-icon { color: var(--color-brand-telegram); }
.channel-card[data-channel="feishu"] .ch-icon { color: var(--color-brand-feishu); }
.channel-card[data-channel="wecom"] .ch-icon { color: var(--color-brand-wecom); }
.channel-card[data-channel="bark"] .ch-icon,
.channel-card[data-channel="webpush"] .ch-icon { color: var(--color-text-strong); }
.channel-desc { margin-top: 10px; line-height: 1.6; }
.channel-actions { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.channel-btn {
  display: inline-flex; align-items: center; justify-content: center;
  /* 自适应宽度，不横贯整卡（与页面其他 btn-normal 紧凑风格一致） */
  width: auto; min-width: 88px; padding: 0 18px; height: auto; min-height: 44px;
  border: none; border-radius: var(--radius-control);
  font-size: var(--text-sm); font-weight: var(--font-weight-semibold);
  cursor: pointer; transition: all var(--ease-standard);
}
.channel-btn.primary { background: var(--color-accent); color: var(--color-white); }
.channel-btn.primary:hover { background: var(--color-accent-strong); }
.channel-btn.secondary {
  background: var(--color-surface);
  border: var(--border-strong);
  color: var(--color-text-strong);
}
.channel-btn.secondary:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.channel-btn:disabled { opacity: 0.55; cursor: default; }
.channel-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); font-weight: var(--font-weight-semibold);
  padding: 4px 10px; border-radius: var(--radius-pill);
  white-space: nowrap;
}
.channel-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.channel-status.status-ok { color: var(--color-success); background: var(--color-success-soft); }
.channel-status.status-warn { color: var(--color-warning); background: var(--color-warning-soft); }
.channel-status.status-fail { color: var(--color-danger); background: var(--color-danger-soft); }

/* 系统日志 */
.syslog {
  background: var(--color-bg-muted);
  border: var(--border-soft);
  border-radius: var(--radius-control);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  max-height: 62vh;
  overflow-y: auto;
  color: var(--color-text-strong);
}
pre.content-cell { white-space: pre-wrap; overflow-wrap: break-word; min-width: 260px; font-family: inherit; }

.empty { text-align: center; color: var(--color-text-muted); padding: 56px 20px; }
.empty > div { margin-top: 18px; }
.tl-feed-more {
  display: flex;
  justify-content: center;
  min-height: 34px;
  gap: 8px;
  margin-top: 14px;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.feed-load-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-line);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: feed-load-spin .7s linear infinite;
}
@keyframes feed-load-spin { to { transform: rotate(360deg); } }
.tl-feed-end {
  margin-top: 14px;
  padding: 8px 0 4px;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  text-align: center;
}
.notice {
  background: var(--color-surface-accent);
  color: var(--color-accent-text);
  font-size: var(--text-sm);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  margin-bottom: 16px;
  line-height: 1.7;
}
.notice-warn {
  background: var(--color-warning-soft);
  color: var(--color-warning-strong);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.notice-warn-body { flex: 1; min-width: 0; }
.notice-warn-body strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
}
.notice-warn-body p { margin: 4px 0 0; }
.notice-warn .btn-normal { flex-shrink: 0; }
.cookie-paste {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
#st-cookies .btn-normal,
#st-imgbed .btn-normal,
#ts-form .btn-normal {
  min-height: 44px;
  height: 44px;
}
#st-imgbed .field-label { margin-top: 14px; }
#ts-form .cfg-field { flex: none; }
#st-imgbed .imgbed-advanced { margin-top: 16px; }
#st-imgbed .imgbed-advanced summary { cursor: pointer; }
#st-imgbed .imgbed-advanced .cfg-fields { margin-top: 10px; }
.cfg-field-error {
  margin: 6px 0 0;
  font-size: var(--text-xs);
  color: var(--color-danger);
}
.ima-source-panel .btn-normal,
.ima-storage-toolbar .btn-normal,
#pc-zq-save {
  min-height: 44px;
  height: 44px;
}
.ima-storage-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.bind-code {
  font-family: var(--font-mono);
  font-size: var(--text-body);
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.7; }
.ask-error { color: var(--color-danger); }
.ask-ok { color: var(--color-success); }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: var(--text-sm); font-weight: var(--font-weight-medium); color: var(--color-text-strong); }
.form-row .form-control { margin-bottom: 0; }
.llm-model-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.llm-model-row .form-control { flex: 1; min-width: 220px; }
.llm-model-row .btn-ghost { flex: 0 0 auto; }
@media (max-width: 768px) {
  .llm-model-row .form-control,
  .llm-model-row .btn-ghost { width: 100%; min-width: 0; }
}
/* 横向工具栏/行内的表单控件不需要纵向间距，避免与按钮错位 */
.toolbar .form-control,
.row .form-control { margin-bottom: 0; }
.form-label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: var(--text-sm); font-weight: var(--font-weight-medium); color: var(--color-text-strong); }
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-card {
  background: var(--color-surface); color: var(--color-text-strong);
  border: 1px solid var(--color-border); border-radius: var(--radius-card);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  width: min(480px, 100%); padding: 24px; max-height: 90vh; overflow: auto;
}

/* ---------- 应用内确认/提示/输入弹窗（替代固定在窗口顶部的原生 confirm/alert/prompt） ---------- */
.dialog-mask { z-index: 120; } /* 可能叠加在普通弹窗之上（如编辑中的二次确认） */
.dialog-card { width: min(400px, 100%); }
.dialog-title { margin: 0 0 10px; font-size: var(--text-title); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.dialog-message { margin: 0 0 18px; white-space: pre-line; word-break: break-word; line-height: 1.6; }
.dialog-card .form-control { margin-bottom: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.dialog-btn { min-width: 84px; padding: 0 18px; }
.dialog-actions .btn-ghost { min-height: var(--control-height-2xl); height: var(--control-height-2xl); display: inline-flex; align-items: center; justify-content: center; }
.dialog-btn-danger,
.dialog-btn-danger:hover,
.dialog-btn-danger:active { background: var(--color-danger-strong); }

/* ---------- MX 原始消息弹窗（时间线 MX 消息「查看原文」） ---------- */
.mx-raw-card { width: min(640px, 100%); }
.mx-raw-title { margin: 0 0 6px; font-size: var(--text-title); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.mx-raw-meta { margin: 0 0 12px; font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.mx-raw-copy { margin-bottom: 10px; }
.mx-raw-pre {
  margin: 0; padding: 12px 14px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: var(--text-xs); line-height: 1.6; font-variant-numeric: tabular-nums;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
  max-height: 56vh; overflow: auto;
}
.mx-raw-empty { margin: 0; }

/* ---------- MX 管理面板（数据源页 st-mx） ---------- */
.mx-config-actions { margin-top: 16px; }
#mx-ws-status { margin-top: 12px; }
.mx-rooms-head-actions { margin-top: 12px; }
.mx-rooms-enabled-only { margin-left: 8px; }
#mx-rooms-list { margin-top: 16px; }
@media (max-width: 640px) {
  .modal-mask {
    align-items: flex-end;
    padding: 0;
  }
  .modal-card {
    width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    border-bottom: none;
    position: relative;
    padding-top: 28px;
  }
  .modal-card::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: var(--radius-pill);
    background: var(--color-border);
    opacity: 0.8;
  }
}

.au-inactive-policy {
  max-width: none;
  margin: var(--space-3) 0 0;
}
details.au-policy {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: var(--border-soft);
}
details.au-policy > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
  min-height: 44px;
  user-select: none;
}
details.au-policy > summary::-webkit-details-marker { display: none; }
details.au-policy > summary .ui-icon { width: 16px; height: 16px; color: var(--color-text-muted); transition: transform var(--ease-standard); }
details.au-policy[open] > summary .ui-icon { transform: rotate(90deg); }
details.au-policy > summary .muted { font-weight: var(--font-weight-medium); }
.user-name { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.user-name strong { font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.user-origin,
.user-login {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-sm);
}
.user-pill {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-accent-text);
  background: var(--color-accent-soft);
  border-radius: var(--radius-pill);
  padding: 1px var(--space-2);
}
.user-pill.muted {
  color: var(--color-badge-idle-text);
  background: var(--color-badge-idle-bg);
}
.user-pill.warn {
  color: var(--color-warning-strong);
  background: var(--color-warning-soft);
}
.user-channels { display: inline-flex; align-items: center; gap: var(--space-2); }
.user-ch { display: inline-flex; color: var(--color-text-muted); }
.user-ch .ch-icon { width: 16px; height: 16px; }
.user-ch.on[data-channel="telegram"] { color: var(--color-brand-telegram); }
.user-ch.on[data-channel="feishu"] { color: var(--color-brand-feishu); }
.user-ch.on[data-channel="wecom"] { color: var(--color-brand-wecom); }
.user-ch.on[data-channel="bark"] { color: var(--color-text-strong); }
.user-ch.on[data-channel="webpush"] { color: var(--color-text-strong); }
.user-ch.off { opacity: 0.32; }
.modal-card.user-modal { width: min(520px, 100%); }
.user-modal h3 { margin-bottom: 4px; }
.um-meta { margin-bottom: var(--space-4); }
.um-block + .um-block {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: var(--border-soft);
}
.um-block h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
}
.um-block .muted { margin-bottom: var(--space-2); }
.um-close { margin-top: var(--space-5); }
.um-push-result { margin-top: var(--space-2); white-space: pre-wrap; }
.user-modal-danger {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: var(--border-soft);
}
.user-modal-danger .muted { margin-bottom: 10px; }
.um-kb-list { display: grid; gap: 4px; }
.um-kb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.um-kb-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}
.um-kb-item .muted { margin: 0 0 0 auto; font-size: var(--text-xs); }

/* 轻量 toast 提示 */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 18px;
  border-radius: var(--radius-control);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-white);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  white-space: pre-wrap;
  pointer-events: none;
  animation: toast-in 0.18s ease-out;
}
.toast.success { background: var(--color-accent); }
.toast.error { background: var(--color-danger-strong); }
.toast.hide { opacity: 0; transition: opacity 0.3s ease; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 宽屏手动收起：与 ≤900px 自动收成同一条 68px 图标轨 */
html.sidebar-slim .sidebar { width: 68px; padding: 18px 8px; }
html.sidebar-slim .sidebar-brand { justify-content: center; padding: 6px 0 16px; }
html.sidebar-slim .sidebar-brand-text,
html.sidebar-slim .sidebar-brand-meta,
html.sidebar-slim .nav-item .nav-label,
html.sidebar-slim .nav-group-label,
html.sidebar-slim .nav-sub-label,
html.sidebar-slim .sidebar-user { display: none; }
html.sidebar-slim .nav-item { justify-content: center; padding: 12px; }
html.sidebar-slim .nav-sub .nav-item { padding-left: 12px; }

/* 响应式 */
@media (max-width: 900px) {
  .sidebar { width: 68px; padding: 18px 8px; }
  .sidebar-brand { justify-content: center; padding: 6px 0 16px; }
  .sidebar-brand-text, .sidebar-brand-meta, .nav-item .nav-label, .nav-group-label, .nav-sub-label, .sidebar-user { display: none; }
  .sidebar-brand-toggle { pointer-events: none; cursor: default; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-sub .nav-item { padding-left: 12px; }
  .login-shell { flex-direction: column; gap: 32px; max-width: 440px; min-height: auto; }
  .login-brand { text-align: center; align-self: auto; }
  .login-brand-header { display: flex; flex-direction: column; align-items: center; }
  .login-brand .brand-mark, .login-brand .login-logo { margin-left: auto; margin-right: auto; }
  .login-features { margin-left: auto; margin-right: auto; text-align: left; width: 100%; }
  .auth-view { padding: 56px 16px 32px; align-items: flex-start; }
  .auth-topbar { top: 14px; right: 16px; }
  .login-card { padding: 28px 22px; width: 100%; }
  .topbar { padding: 0 16px; }
  .page-main { padding: 16px; --page-pad-x: 16px; }
}

/* 键盘弹出/矮视口：手机键盘常把可视高度压到 500px 以下（viewport meta 的
   interactive-widget=resizes-content 与安卓壳的 ime margin 收窄视口后命中），
   收起品牌介绍、认证页贴顶，登录卡片连同聚焦输入框完整留在键盘上方 */
@media (max-height: 620px) {
  .auth-view { align-items: flex-start; padding-bottom: 20px; }
  .login-brand { display: none; }
}

@media (max-width: 1280px) {
  .proxy-route { flex: 1 1 100%; }
  .ak-table.proxy-nodes thead { display: none; }
  .ak-table.proxy-nodes tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 12px 0;
    border-bottom: var(--border-default);
  }
  .ak-table.proxy-nodes td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    white-space: normal;
  }
  .ak-table.proxy-nodes td::before {
    content: attr(data-label);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
  }
  .ak-table.proxy-nodes td.ak-hide-mobile { display: none; }
  .ak-table.proxy-nodes td.ak-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .ak-table.proxy-nodes td.ak-actions::before { content: none; }
  .ak-table.proxy-nodes td.ak-actions .btn-sm {
    width: 100%;
    height: 44px;
    min-height: 44px;
    margin-right: 0;
    box-sizing: border-box;
  }
  .ak-table.proxy-nodes tr.ak-empty { display: block; }
  .ak-table.proxy-nodes tr.ak-empty td { display: block; }
  .ak-table.proxy-nodes tr.ak-empty td::before { content: none; }
}

@media (max-width: 640px) {
  .post-item .p-title { font-size: var(--text-body); }
}

/* ---------- 移动端底部标签栏 ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--color-bg);
  border-top: var(--border-default);
  padding: 0 12px env(safe-area-inset-bottom);
  justify-content: space-around;
  transition: transform 180ms ease;
}
.bottom-nav[inert] { transform: translateY(100%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .bottom-nav { transition: none; }
}
.bnav-item {
  position: relative;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  color: var(--color-text-muted);
  min-width: 0;
  min-height: 48px;
  border-radius: var(--radius-control);
  -webkit-tap-highlight-color: transparent;
}
.bnav-item::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.bnav-item .bnav-icon { display: inline-flex; line-height: 1; }
.bnav-item .bnav-icon { position: relative; z-index: 1; }
.bnav-item .bnav-icon svg { width: 24px; height: 24px; }
.bnav-item.active { color: var(--color-accent-text); font-weight: var(--font-weight-semibold); }
.bnav-item.active .bnav-icon svg { stroke-width: 2.4; }
.bnav-item.is-feedback::before { animation: bottom-nav-feedback 220ms ease-out; }
@keyframes bottom-nav-feedback {
  from { opacity: 0; transform: translate(-50%, -50%); }
  50% { opacity: 1; transform: translate(-50%, -50%); }
  to { opacity: 0; transform: translate(-50%, -50%); }
}
@media (prefers-reduced-motion: reduce) {
  .bnav-item.is-feedback::before { animation-duration: 80ms; animation-timing-function: linear; }
}

/* 「更多」页网格 */
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.more-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px;
  border: var(--border-strong); border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-body);
  padding: 0 14px;
}
.more-item .more-icon { font-size: 16px; width: 20px; text-align: center; }
.more-item .more-icon svg { width: 16px; height: 16px; vertical-align: -2px; }

/* ---------- 手机端（≤768px）壳层 ---------- */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .combo-action {
    grid-template-columns: 3.5em minmax(0, 1fr);
    row-gap: 2px; column-gap: 8px; padding: 7px 0;
  }
  .combo-action-cols { display: none; }
  .combo-action-meta { grid-column: 2; justify-content: flex-start; gap: 10px; }
  .combo-holdings { grid-template-columns: 1fr; }
  .bottom-nav { display: flex; }
  .theme-toggle-btn { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .main-col { min-height: 100vh; }
  .section-panel.home-panel {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    margin-bottom: 12px;
  }
  .home-head { margin-bottom: 10px; position: relative; }
  .home-head .section-title { margin-top: 0; }
  .home-head .section-meta { margin-top: 2px; }
  .home-search-bar { min-height: 44px; }
  .home-filter-content .home-cats {
    margin-top: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .home-filter-content .cat-chip { flex-shrink: 0; }
  .home-filter-actions { display: flex; justify-content: flex-end; }
  .live-feed-head { flex-wrap: wrap; gap: 10px; }
  .live-toolbar-clock { flex: 1 1 auto; white-space: normal; }
  .live-toolbar-divider { display: none; }
  .live-important-toggle { min-height: 44px; }
  .request-banner { padding: 10px 12px; gap: 8px; }
  .request-banner-copy .desc { display: none; }
  .request-banner .btn-normal { min-height: 44px; }
  .notice-warn { flex-direction: column; }
  .notice-warn .btn-normal { min-height: 44px; }
  .cookie-paste { font-size: 16px; }
  .topbar { padding: 0 14px; padding-top: var(--safe-top); } /* 左右 14px 与内容区 page-main 对齐，logo 和下方胶囊同列 */

  /* 移动端左上角：logo 单独显示并放大；页名仍留在无障碍树 */
  .topbar-logo { height: 32px; }
  .topbar-title h1 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .page-main { padding: 16px 14px calc(74px + var(--safe-bottom)); --page-pad-x: 14px; }
  /* 下滑收起整个筛选条（平台行+大V行），上滑恢复；藏进不透明 topbar 后面。
     上下 padding 收窄到 10px，压低筛选条整体高度 */
  .tl-filterbar { padding-top: 10px; padding-bottom: 10px; transition: transform 0.25s var(--ease-standard); }
  .tl-filterbar.tl-bars-hidden { transform: translateY(calc(-100% - 16px)); }
  .platform-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
  }
  .tl-feed-panel,
  #kol-list { touch-action: pan-y; }
  /* 动态/订阅/广场：一行等宽图标角标（全部+6平台+筛选/星标）。字只留 aria，禁止改回带字胶囊。 */
  .icon-badge-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
    /* 两侧外扩 6px：从正文内边距借宽给格距，角标不挤正文 */
    margin-inline: -6px;
    width: calc(100% + 12px);
  }
  /* 动态页：列数随「全部+快讯+平台+筛选」个数自适应，保证筛选按钮不换行独占一排 */
  #tl-filterbar .icon-badge-bar {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }
  .icon-badge-bar .tl-pills,
  .icon-badge-bar .tl-actions { display: contents; }
  .icon-badge-bar .tl-pill,
  .icon-badge-bar > .fav-toggle,
  .icon-badge-bar > .home-filter-toggle,
  .icon-badge-bar .tl-actions button {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    justify-content: center;
  }
  .icon-badge-bar .tl-pill span { display: none; }
  .icon-badge-bar .tl-pill .pt-icon,
  .icon-badge-bar .funnel-icon,
  .icon-badge-bar .star-icon {
    width: min(34px, 92%);
    aspect-ratio: 1;
    height: auto;
    padding: 6px;
    box-sizing: border-box;
    border-radius: 50%;
    background: var(--color-bg-muted);
    transition: background var(--ease-standard), transform 120ms ease;
  }
  .icon-badge-bar .tl-pill .pt-icon.xueqiu-icon { width: min(34px, 92%); height: auto; padding: 3px; }
  .icon-badge-bar .tl-pill:active .pt-icon,
  .icon-badge-bar > .fav-toggle:active .star-icon,
  .icon-badge-bar .tl-actions button:active .funnel-icon,
  .icon-badge-bar .tl-actions button:active .star-icon { transform: scale(0.9); }
  .icon-badge-bar > .fav-toggle,
  .icon-badge-bar .tl-actions button { font-size: 0; gap: 0; }
  /* 所有平台共用同一尺寸的独立蓝底。 */
  .icon-badge-bar .tl-pill { position: relative; isolation: isolate; }
  .icon-badge-bar .tl-pill.selected::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: min(34px, 92%);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--color-accent);
    pointer-events: none;
  }
  .icon-badge-bar .tl-pill.selected .pt-icon { background: transparent; }
  .icon-badge-bar > .fav-toggle.fav-on .star-icon,
  .icon-badge-bar > .home-filter-toggle.has-filter .funnel-icon,
  .icon-badge-bar .tl-actions button.has-filter .funnel-icon { background: var(--color-accent); color: var(--color-white); }
  .home-head .icon-badge-bar { margin-top: 10px; }
  /* 大V头像行：手机端收窄头像/间距，降低筛选条第二排高度 */
  .tl-kol-item { width: 48px; gap: 3px; }
  .tl-kol-av { width: 36px; height: 36px; }
  .tl-kolbar-strip { gap: 8px; }
  .tl-kolbar.expanded .tl-kolbar-toggle { margin-top: 5px; } /* (头像36 - 开关26) / 2 */
  .tl-new-badge-btn { min-height: 44px; overflow: hidden; }
  .news-rt-new-badge-btn { min-height: 44px; overflow: hidden; }
  .kol-item { flex-wrap: wrap; }
  .kol-item .btn-sub { width: 100%; min-height: 44px; }
  .kol-item .btn-sm.danger { min-height: 44px; }
  /* 广场卡片紧凑化：小头像/小内边距/小间距，一屏可见更多大V（按钮触控目标仍保 44px） */
  .kol-grid { gap: 10px; }
  .kol-card { gap: 8px; padding: 10px 12px; }
  .kol-card-head { gap: 10px; }
  .kol-card .kol-avatar { width: 40px; height: 40px; font-size: 17px; }
  .kol-card-info .name { line-height: 1.35; }
  .kol-card-meta { margin-top: 2px; gap: 4px 6px; }
  .kol-card-info .tag { padding: 1px 8px; }
  .kol-card-subtype { padding-top: 0; }
  .group-head { margin: 12px 2px 6px; padding: 6px 10px; }
  .kol-card .btn-sub, .kol-card .fav-btn, .kol-card .btn-sm.danger { min-height: 44px; }
  .cat-chip { height: 44px; padding: 0 16px; }
  .search-bar { min-height: 44px; }
  .toolbar { flex-wrap: wrap; }
  .fav-toggle { min-height: 44px; }
  .sub-type-switches { gap: 8px; }
  .sub-type-switch { min-height: 44px; }
  .post-item { padding: 14px 4px; }
  .post-item a { min-height: 44px; display: inline-flex; align-items: center; }
  .post-item .p-meta a,
  .post-item .p-meta button.cat-export {
    min-height: 0;
    height: auto;
  }
  .post-item .p-meta .cat.post-tag-filter::before,
  .post-item .p-meta a.cat::before,
  .post-item .p-meta button.cat-export::before {
    content: "";
    position: absolute;
    inset: -11px -8px;
  }
  /* 名字必须盖过上一行 .post-item a：inline-flex + min-height 会让文字贴顶、角标居中，移动端错位。
     block + 固定行高才能同时保留省略号、44px 触控，并与平台角标/时间同一中线。 */
  .post-item a.p-name {
    display: block;
    height: 44px;
    min-height: 44px;
    line-height: 44px;
  }
  /* 实时资讯去头像后，名字行不必撑满 44px 触控行高，回归自然行高 */
  .news-rt-list .post-item a.p-name { height: auto; min-height: 0; line-height: inherit; }
  .news-research-list .post-item a.p-name { height: auto; min-height: 0; line-height: inherit; }
  .btn-sm { min-height: 44px; }
  .lightbox-close { width: 44px; height: 44px; }
  .lightbox-zbtn { height: 44px; min-width: 44px; }
  .topbar-logout { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .tl-group .post-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tl-group .post-images img { width: 100%; height: auto; aspect-ratio: 1; }
  /* 筛选条已在上方改为一行角标，不再纵向堆叠 */
  .btn-normal, .btn-ghost, .channel-btn { min-height: 44px; }
  .btn-add { min-height: 44px; }
  .form-control { min-height: 44px; }
  /* iOS Safari：聚焦 <16px 的表单控件会整页自动缩放（input zoom），移动端统一 16px */
  .form-control, input:not([type="checkbox"]):not([type="hidden"]):not([type="file"]), select, textarea { font-size: 16px; }
  .rc-generate { max-width: none; }
  .rc-field-note { flex: 1 1 100%; max-width: none; }
  .rc-field-count, .rc-field-num, .rc-field-expires { flex: 1 1 calc((100% - var(--space-3)) / 2); width: auto; }
  .rc-field-submit { flex: 1 1 100%; }
  .rc-field-submit > button { width: 100%; }
  .rc-presets { width: 100%; }
  .rc-preset { flex: 1; height: 44px; min-height: 44px; }
  .rc-generate .form-control, .rc-generate .btn-normal { width: 100%; min-height: 44px; }
  .rc-search,
  .au-search { width: 100%; }
  /* 注册码筛选：一行横向滚动，不再换行成两行（此处优先级低于文末基础规则，故在 .settings-tabs 定义后另设媒体块） */
  /* 批次头：信息纵向堆叠，操作按钮全宽两列 */
  .rc-batch-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .rc-batch-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .rc-result-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .rc-batch-actions .btn-sm, .rc-result-actions .btn-sm { width: 100%; }
  /* 表格改标签网格：每格带字段名，备注独占整行 */
  .rc-table thead { display: none; }
  .rc-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 12px 0; border-bottom: var(--border-default); }
  .rc-table td { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  .rc-table td::before { content: attr(data-label); font-size: var(--text-xs); color: var(--color-text-muted); }
  .rc-table td.rc-note-cell { grid-column: 1 / -1; }
  .rc-table td .btn-sm, .rc-batch-actions .btn-sm, .rc-result-actions .btn-sm { min-height: 44px; }
  .admin-batch-bar .btn-sm { min-height: 44px; }
  .rc-code .rc-check, .rc-batch-title .rc-batch-check, .rc-checkall input { width: 20px; height: 20px; }
  .ak-table thead { display: none; }
  .ak-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; padding: 12px 0; border-bottom: var(--border-default); }
  .ak-table td { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; white-space: normal; }
  .ak-table td::before { content: attr(data-label); font-size: var(--text-xs); color: var(--color-text-muted); }
  .ak-table td.ak-check { flex-direction: row; align-items: center; }
  .ak-table td.ak-check::before { content: none; }
  .ak-table td.ak-hide-mobile { display: none; }
  .ak-table td.ak-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ak-table td.ak-actions::before { content: none; }
  .ak-table td.ak-actions .btn-sm {
    width: 100%;
    height: 44px;
    min-height: 44px;
    margin-right: 0;
    box-sizing: border-box;
  }
  .ak-table td.ak-actions .btn-sm:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ak-table .kol-check, .ak-table #ak-checkall { width: 20px; height: 20px; }
  .ak-table tr.ak-empty { display: block; }
  .ak-table tr.ak-empty td { display: block; }
  .ak-table tr.ak-empty td::before { content: none; }
  .ak-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .ak-filters #ak-q { grid-column: 1 / -1; width: auto !important; max-width: none; }
  .ak-filters .form-control,
  .ak-filters .btn-ghost {
    width: 100%;
    height: 44px;
    min-height: 44px;
    margin: 0;
  }
  .ak-add-bar { align-items: stretch; }
  .ak-add-bar label { width: 100%; }
  .ak-add-bar .form-control,
  .ak-add-bar .btn-normal {
    width: 100%;
    min-height: 44px;
  }
  .ak-platform-tabs { align-items: stretch; }
  .ak-platform-tabs .platform-tab {
    height: 44px;
    min-height: 44px;
    width: auto;
  }
}

/* ---------- 全景概览 ---------- */
.dash-duty-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}
.dash-duty-grid:has(#dash-stale-panel[hidden]) { grid-template-columns: 1fr; }
.dash-duty-grid > .section-panel { margin-bottom: 0; }
.dash-stale-panel[hidden] { display: none; }
.dash-source-panel .section-head,
.dash-volume-panel .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.dash-fetch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 4px;
}
.dash-source-table { width: 100%; }
.dash-source-rate { min-width: 148px; }
.dash-source-counts {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
}
.dash-duty-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.dash-duty-strip li {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
}
.dash-duty-strip li.is-ok { color: var(--color-success); font-weight: var(--font-weight-medium); }
.dash-duty-strip li.is-fail { color: var(--color-danger); }
.dash-duty-strip li.is-warn { color: var(--color-warning-strong); }
.dash-duty-strip li.is-idle { color: var(--color-text); font-weight: var(--font-weight-medium); }
.dash-duty-strip .linkish {
  min-height: 0;
  min-width: 0;
  padding: 0;
  color: inherit;
  font: inherit;
}
.dash-status-cred { color: var(--color-warning-strong); }
.dash-stale-verdict {
  margin: 0 0 8px;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
}
.dash-stale-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-stale-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-line-soft);
}
.dash-stale-list li:last-child { border-bottom: none; }
.dash-stale-list .linkish,
.dash-source-table .linkish {
  min-height: 0;
  min-width: 0;
  padding: 2px 0;
  font-weight: var(--font-weight-semibold);
}
button.linkish {
  border: none;
  background: none;
  padding: 0;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--color-accent-text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
button.linkish:hover { text-decoration: underline; }
.dash-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.dash-stat {
  flex: 1;
  min-width: 150px;
  background: var(--color-bg-muted);
  border: var(--border-default);
  border-radius: var(--radius-control);
  padding: 14px 16px;
}
.dash-stat-label { font-size: var(--text-xs); color: var(--color-text-subtle); }
.dash-stat-value {
  font-size: var(--text-title);
  font-weight: var(--font-weight-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-strong);
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.dash-volume {
  display: grid;
  grid-template-columns: minmax(168px, 220px) minmax(0, 1fr);
  gap: 20px;
  align-items: end;
}
.dash-volume .dash-stats { flex-direction: column; gap: 14px; }
.dash-volume-panel .dash-stat,
.dash-volume .dash-stat {
  min-width: 0;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
}
.dash-split { display: flex; gap: 14px; flex-wrap: wrap; }
.dash-split > .section-panel { flex: 1; min-width: min(100%, 300px); }
.dash-trend {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 120px;
  padding: 4px 0 0;
  overflow-x: auto;
}
.dash-trend-col { flex: 1 0 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.dash-trend-bar { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; max-width: 42px; height: 92px; border-radius: var(--radius-2xs); background: var(--color-bg-muted); overflow: hidden; }
.dash-trend-ok { width: 100%; background: var(--color-success); }
.dash-trend-fail { width: 100%; background: var(--color-danger); }
.dash-trend-date { font-size: var(--text-xs); color: var(--color-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.dash-bar-label { width: 90px; flex-shrink: 0; font-size: var(--text-sm); color: var(--color-text-strong); }
.dash-bar-track { flex: 1; min-width: 72px; height: 10px; border-radius: var(--radius-pill); background: var(--color-bg-muted); overflow: hidden; }
.dash-bar-fill { height: 100%; background: var(--color-accent); border-radius: var(--radius-pill); }
.dash-bar-fill.warn { background: var(--color-warning); }
.dash-bar-value { width: 110px; flex-shrink: 0; text-align: right; font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .dash-duty-grid,
  .dash-duty-grid:has(#dash-stale-panel[hidden]) { grid-template-columns: 1fr; }
  .dash-volume { grid-template-columns: 1fr; }
  .dash-volume .dash-stats { flex-direction: row; }
}
@media (max-width: 768px) {
  .dash-duty-strip {
    flex-direction: column;
    gap: 4px;
  }
  .dash-duty-strip .linkish {
    min-height: 44px;
    min-width: 44px;
  }
  .dash-source-panel .section-head,
  .dash-volume-panel .section-head {
    flex-direction: column;
  }
  .dash-source-table tbody tr {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 44px;
    align-items: center;
  }
  .dash-source-table td.dash-source-cause { grid-column: 1 / -1; }
  .dash-stale-list li {
    min-height: 44px;
    align-items: center;
  }
  .dash-stale-list .linkish,
  .dash-source-table .linkish {
    min-height: 44px;
    min-width: 44px;
  }
  .dash-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    row-gap: 4px;
    align-items: baseline;
  }
  .dash-bar-label,
  .dash-bar-value { width: auto; }
  .dash-bar-track { grid-column: 1 / -1; min-width: 0; }
  .dash-event { flex-wrap: wrap; }
  .dash-event-detail { flex-basis: 100%; }
}
.dash-warn { padding: 10px 14px; border-radius: var(--radius-control); background: var(--color-warning-soft); color: var(--color-warning-strong); font-size: var(--text-sm); }
.dash-warn a { color: var(--color-link); }
.dash-event { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--color-line-soft); font-size: var(--text-sm); }
.dash-event:last-child { border-bottom: none; }
.dash-event-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dash-event-dot.ok { background: var(--color-success); }
.dash-event-dot.warn { background: var(--color-warning); }
.dash-event-dot.fail { background: var(--color-danger); }
.dash-event-time { font-size: var(--text-xs); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.dash-event-platform { flex-shrink: 0; font-weight: var(--font-weight-semibold); color: var(--color-text-strong); width: 70px; }
.dash-event-detail { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dash-events { margin-top: 12px; max-height: 11.5em; overflow: auto; }
.qr-box { margin-top: 16px; }
.qr-card {
  display: inline-block;
  padding: 16px;
  background: var(--color-white);
  border-radius: var(--radius-control);
}
.qr-card img { width: 220px; height: 220px; display: block; }
.qr-frame {
  width: 190px;
  height: 190px;
  border-radius: var(--radius-xs);
  background: var(--color-white);
  padding: 8px;
  box-shadow: var(--shadow-xs);
}
.qr-status { margin-top: 10px; }

/* ---------- 开关（switch）与免打扰时段表单 ---------- */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--text-sm); color: var(--color-text-strong); position: relative; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.switch .track { width: 38px; height: 22px; border-radius: var(--radius-pill); background: var(--color-line-strong); position: relative; flex-shrink: 0; transition: background var(--ease-standard); }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--color-white); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform var(--ease-standard); }
.switch input:checked + .track { background: var(--color-accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: var(--outline-focus); outline-offset: 2px; }
.kw-report-switch {
  min-height: 44px;
  margin-top: 14px;
  max-width: 560px;
}
.kw-report-switch > span:last-of-type {
  min-width: 0;
  line-height: 1.4;
}
#kol-images-settings { width: 100%; max-width: 640px; }
#kol-images-settings > .empty,
.kol-images-list > .empty { padding: 24px 12px; }
#kol-images-settings > .empty .btn-add,
.kol-images-list > .empty .btn-add { margin-top: 12px; }
.kol-images-search { margin-bottom: 8px; }
.kol-images-list {
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 12px;
  border-top: var(--border-soft);
}
#kol-images-more {
  margin-top: 8px;
}
.kol-images-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 4px 0;
  border-bottom: var(--border-soft);
}
.kol-images-row:last-child { border-bottom: none; }
.kol-images-row .kol-avatar { width: 36px; height: 36px; font-size: var(--text-sm); }
.kol-images-info { flex: 1; min-width: 0; }
.kol-images-name {
  display: block;
  color: var(--color-text-strong);
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kol-images-platform { display: block; margin-top: 2px; color: var(--color-text-muted); font-size: var(--text-xs); }
.kol-images-switch { min-height: 44px; margin-inline-start: auto; flex-shrink: 0; }
.kol-images-switch input:disabled { cursor: default; }
.kol-images-switch input:disabled ~ span { opacity: 0.55; cursor: default; }
.kol-images-local-state { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.kol-images-local-state .muted { margin: 0; }
.dnd-form { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; max-width: 560px; }
.dnd-range-field { display: flex; flex-direction: column; gap: 6px; }
.dnd-range-label { font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.dnd-range { display: flex; align-items: center; gap: 10px; }
.dnd-range input[type="time"] { margin: 0; flex: 1 1 138px; min-width: 0; max-width: 200px; }
.dnd-sep { font-size: var(--text-sm); color: var(--color-text-muted); }
.dnd-range-field.is-off { opacity: 0.55; }
.dnd-range-field.is-off input { pointer-events: none; }
.dnd-actions { display: flex; align-items: center; gap: 12px; justify-content: flex-start; }

/* 渠道绑定卡片内的渠道分块：块间细分隔线 */
.channel-bind-block + .channel-bind-block {
  border-top: var(--border-default);
  margin-top: 18px;
  padding-top: 18px;
}

/* 管理帖子列表：点击展开全文 */
.post-cell { cursor: pointer; }
.post-hidden-badge {
  font-size: var(--text-xs);
  color: var(--color-danger);
  background: var(--color-danger-soft);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  white-space: nowrap;
}
.post-detail {
  background: var(--color-surface-accent-soft);
  border-radius: var(--radius-control);
  padding: 12px;
}
.post-detail .content-cell { white-space: pre-wrap; }

/* 渠道绑定步骤折叠（设置页压缩） */
details.bind-steps { margin-top: 10px; }
details.bind-steps > summary {
  cursor: pointer;
  color: var(--color-accent-text);
  font-size: var(--text-sm);
  padding: 4px 0;
  user-select: none;
}
details.bind-steps > summary:hover { opacity: 0.85; }
details.bind-steps > summary { display: inline-flex; align-items: center; gap: 6px; }
details.bind-steps > summary .ui-icon { width: 16px; height: 16px; color: var(--color-text-muted); transition: transform var(--ease-standard); }
details.bind-steps[open] > summary .ui-icon { transform: rotate(90deg); }

/* iOS Safari 适配：横向可滚动胶囊行（平台/分类/设置分栏）点击会被手势吞掉。
   touch-action: manipulation 让点按立即触发（去掉双击缩放延迟），同时保留横向滑动与页面纵向滚动；
   -webkit-overflow-scrolling 已废弃（iOS 16+ 原生滚动），其旧的动量滚动层是 iOS 点击失效的根因之一。 */
.settings-tabs, .platform-tabs, .home-filter-content .home-cats { touch-action: manipulation; }

/* 设置页分段导航：与研报库设置 .ks-tab 同款（36px、默认描边、surface 底） */
.settings-tabs { display: flex; gap: 6px; margin-bottom: var(--space-4); flex-wrap: wrap; }
.settings-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: var(--border-default);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--ease-standard), color var(--ease-standard), border-color var(--ease-standard);
}
.settings-tab.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}
.settings-tab:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  /* 注册码筛选：一行横向滚动（须在基础 .settings-tabs 规则之后，否则被文末 wrap 覆盖） */
  .settings-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; margin-bottom: 12px; }
  .settings-tab { flex-shrink: 0; min-height: 44px; }
}

/* ---- 组合详情：状态 / 持仓 / 净值曲线 ---- */
.cube-quote { display: flex; gap: 32px; margin-top: 14px; flex-wrap: wrap; }
.cube-quote-item { display: flex; flex-direction: column; gap: 4px; }
.cube-quote-label { font-size: var(--text-xs); color: var(--color-text-muted); }
.cube-quote-value { font-size: var(--text-title); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); font-variant-numeric: tabular-nums; }
.cube-quote-value.small { font-size: var(--text-xs); font-weight: 400; color: var(--color-text-muted); align-self: center; }
/* A股惯例：红涨绿跌（数据色 token，深色主题自动切换亮色变体） */
.cube-quote-value.up { color: var(--color-data-positive); }
.cube-quote-value.down { color: var(--color-data-negative); }

.cube-holdings { margin-top: 12px; }
.cube-holding { padding: 8px 0; }
.cube-holding-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cube-holding-name { font-weight: 500; color: var(--color-text-strong); }
.cube-holding-weight { font-size: var(--text-sm); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.cube-holding-delta { font-style: normal; font-weight: 500; margin-left: 6px; }
.cube-holding-delta.up { color: var(--color-data-positive); }
.cube-holding-delta.down { color: var(--color-data-negative); }
.cube-weight-bar { margin-top: 5px; height: 6px; border-radius: var(--radius-pill); background: var(--color-surface-soft); overflow: hidden; }
.cube-weight-fill { height: 100%; border-radius: var(--radius-pill); background: var(--color-accent); opacity: 0.85; }

.cube-nav-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.cube-nav-svg { width: 100%; height: auto; margin-top: 8px; display: block; }
.cube-nav-grid { stroke: var(--color-line); stroke-width: 1; }
.cube-nav-tick { font-size: 10px; fill: var(--color-text-muted); }
.cube-nav-date { font-size: 11px; fill: var(--color-text-muted); }
.cube-nav-last { font-size: var(--text-xs); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }

/* IMA 文档中心 */
.ima-docs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ima-docs-head-main { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 4px; min-width: 0; flex: 1 1 auto; }
.ima-docs-head-main > div:first-child { min-width: 0; display: flex; align-items: baseline; gap: 4px; }
.ima-docs-head .btn-ghost,
.ima-reader-actions button { display: inline-flex; align-items: center; gap: 7px; }
.ima-docs-head svg,
.ima-reader-actions svg { width: 16px; height: 16px; }
.ima-doc-group-switcher { min-width: 0; margin: 4px 0 16px; }
.ima-doc-group-tabs { display: flex; gap: 6px; min-width: 0; }
.ima-doc-group-tab { min-width: 0; max-width: 180px; min-height: 44px; flex: 1 1 0; overflow: hidden; padding: 8px 12px; border: var(--border-default); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text); text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ima-doc-group-tab.is-selected { border-color: var(--color-accent); background: var(--color-accent-soft); color: var(--color-text-strong); }
.ima-doc-group-tab:focus-visible,
.ima-doc-group-switcher:focus-visible,
.ima-doc-group-select select:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.ima-doc-group-select { display: none; min-width: 0; }
.ima-doc-group-select select { width: 100%; min-width: 0; min-height: 44px; }
.ima-doc-group-switcher.is-select .ima-doc-group-tabs { display: none; }
.ima-doc-group-switcher.is-select .ima-doc-group-select { display: block; }
.ima-doc-group-label { min-width: 0; overflow: hidden; overflow-wrap: anywhere; color: var(--color-text-muted); font-size: var(--text-xs); text-overflow: ellipsis; white-space: nowrap; }
.ima-doc-toolbar { display: flex; gap: 10px; align-items: center; margin: 4px 0 12px; }
.ima-doc-toolbar[hidden] { display: none; }
.ima-doc-day-nav-slot:empty { display: none; }
.ima-doc-day-nav { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.ima-doc-day-jump { min-width: 0; }
.ima-doc-day-jump .form-control {
  min-width: 7.5em;
  width: auto;
  max-width: 12em;
  min-height: 44px;
  padding-right: 28px;
  font-weight: var(--font-weight-semibold);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ima-doc-search-form { display: flex; flex: 1 1 320px; min-width: 0; gap: 8px; align-items: center; }
.ima-doc-search { flex: 1 1 auto; min-width: 0; min-height: 42px; }
.ima-doc-toolbar .btn-ghost.has-filter {
  border-color: var(--color-accent-text);
  color: var(--color-accent-text);
  background: var(--color-accent-soft);
  font-weight: var(--font-weight-semibold);
}
.ima-doc-filters { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; }
.ima-doc-filters[hidden] { display: none; }
.ima-doc-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.ima-doc-filter-chips:empty { display: none; margin: 0; }
.ima-doc-filter-chip {
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 36px; padding: 0 4px 0 12px;
  border: var(--border-default); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text);
  font-size: var(--text-xs);
}
.ima-doc-filter-chip button {
  width: 36px; height: 36px; border: 0; background: transparent;
  color: var(--color-text-muted); display: inline-flex; align-items: center; justify-content: center;
}
.ima-doc-filter-chip .x-icon { width: 14px; height: 14px; }
.ima-doc-tag-filter { width: min(100%, 240px); min-height: 42px; }
.ima-docs-body { display: grid; gap: 20px; }
.ima-doc-day { border-top: var(--border-default); padding-top: 12px; }
.ima-doc-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.ima-doc-day-head h2 { margin: 0; font-size: var(--text-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.ima-doc-day-head span { color: var(--color-text-muted); font-size: var(--text-xs); }
.ima-doc-list { width: 100%; min-width: 0; }
.ima-doc-row {
  width: 100%; min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 132px;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}
.ima-doc-row:hover { background: var(--color-surface-soft); }
.ima-doc-row:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.ima-doc-ticker,
.ima-doc-row-day {
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ima-doc-row-day { text-align: right; }
.ima-doc-row-name {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-strong);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ima-doc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ima-doc-tag { display: inline-flex; align-items: center; max-width: 9em; padding: 2px 8px; overflow: hidden; border-radius: 999px; background: var(--color-surface-soft); color: var(--color-text-muted); font-size: var(--text-xs); text-overflow: ellipsis; white-space: nowrap; }
.ima-doc-tag.is-action { min-height: 32px; max-width: none; border: 0; cursor: pointer; }
.ima-doc-tag.is-action:hover, .ima-doc-tag.is-action:focus-visible { color: var(--color-text-strong); background: var(--color-surface-hover); }
.ima-doc-tag.is-selected, .ima-doc-tag.is-action[aria-pressed="true"] {
  color: var(--color-accent-text);
  background: var(--color-accent-soft);
  font-weight: var(--font-weight-semibold);
}
.ima-docs-more {
  display: flex;
  justify-content: center;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
.ima-docs-more[aria-busy="true"] { color: var(--color-text-muted); }
.ima-reader { display: flex; flex-direction: column; min-height: calc(100vh - 160px); }
.ima-reader-copy { min-width: 0; display: grid; gap: 4px; }
.ima-reader-abstract {
  margin: 10px 0 0;
  padding: 12px 14px;
  border: var(--border-soft);
  border-radius: var(--radius-control);
  background: var(--color-surface-soft);
  color: var(--color-text);
  font-size: var(--text-sm);
}
.ima-reader-abstract summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
  list-style: none;
}
.ima-reader-abstract summary::-webkit-details-marker { display: none; }
.ima-reader-abstract p { margin: 6px 0 0; max-width: 72ch; line-height: 1.7; }
.ima-reader-abstract.is-clamped:not(.is-expanded) p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.ima-reader-abstract.is-expanded p {
  max-height: 10em;
  overflow-y: auto;
  padding-right: 4px;
}
.ima-abstract-more {
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  padding: 0;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--color-accent-text);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
}
.ima-abstract-more:hover { text-decoration: underline; }
.ima-abstract-more:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.ima-reader-watch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  max-width: 100%;
}
.ima-reader-watch .ima-doc-tag {
  max-width: min(100%, 16em);
}
.ima-reader-watch .ima-doc-tag.is-action {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--color-line-strong);
  background: var(--color-surface);
  color: var(--color-text-strong);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
}
.ima-reader-watch .ima-doc-tag.is-action:hover,
.ima-reader-watch .ima-doc-tag.is-action:focus-visible {
  color: var(--color-accent-text);
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.ima-reader-watch .ima-doc-tag.is-selected {
  color: var(--color-white);
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.ima-reader-watch .ima-doc-tag.is-selected:hover,
.ima-reader-watch .ima-doc-tag.is-selected:focus-visible {
  color: var(--color-white);
  background: var(--color-accent-strong);
}
.ima-reader-filemeta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.35;
}
.ima-reader-filemeta .ima-reader-meta-item {
  display: inline-block;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  line-height: inherit;
  vertical-align: baseline;
}
.ima-reader-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ima-reader-title {
  overflow: hidden;
  margin-top: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ima-reader-actions { flex-shrink: 0; }
.ima-reader-empty { display: grid; justify-items: start; gap: 12px; margin: 16px 0 0; padding: 16px 0 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.ima-reader-empty p { margin: 0; }
.ima-reader-status { margin: 0; padding: 16px; color: var(--color-text-muted); font-size: var(--text-sm); }
.ima-pdf-panel { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 220px; margin: 10px 0 0; border: 0; border-top: var(--border-default); border-radius: 0; background: var(--color-surface-soft); overflow: hidden; }
.ima-pdf-panel .ima-reader-empty { margin: 0; padding: 16px; }
.ima-pdf-panel iframe { display: block; flex: 1 1 auto; width: 100%; min-height: 0; height: 100%; border: 0; background: var(--color-surface-soft); }
.ima-text-view { margin: 16px 0 0; padding: 18px; max-height: 70vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: var(--border-default); border-radius: var(--radius-control); background: var(--color-surface-soft); color: var(--color-text); font: inherit; line-height: 1.7; }
.ima-report-page,
.ima-reader-page {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-shadow: none;
}
#kb-list { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ima-report-head { flex: 0 0 auto; border-bottom: var(--border-default); }
.ima-report-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.ima-report-heading h2 { margin: 0; color: var(--color-text-strong); font-size: var(--text-title); font-weight: var(--font-weight-semibold); line-height: 1.3; }
.ima-report-heading .section-meta { margin-top: 2px; font-weight: var(--font-weight-medium); }
.ima-report-search { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 10px; padding: 0 16px 8px; }
.ima-report-searchbox { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 8px 0 12px; border: var(--border-strong); border-radius: var(--radius-control); background: var(--color-surface); }
.ima-report-searchbox:focus-within { border-color: var(--color-accent-text); box-shadow: var(--shadow-focus-ring); }
.ima-report-searchbox svg,
.ima-report-searchbox .search-ic { width: 16px; height: 16px; flex: 0 0 auto; color: var(--color-text-muted); }
.ima-report-searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--color-text); font: inherit; font-size: var(--text-body); }
.ima-report-searchbox .kb-desk-day {
  min-width: 0;
  min-height: 28px;
  height: 28px;
  margin: 0;
  padding: 0 10px;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
}
.ima-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-surface-soft);
  color: var(--color-text-muted);
  cursor: pointer;
  flex: 0 0 auto;
}
.ima-search-clear:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-strong);
}
.ima-search-clear svg {
  width: 12px;
  height: 12px;
}
.kb-source-select-wrap { display: none; position: relative; }
.kb-source-select-mobile {
  min-height: 42px;
  padding: 0 28px 0 10px;
  border: var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text-strong);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  width: 100%;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
}
.ima-report-filters { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: nowrap; }
.ima-report-filters > .ima-report-source { flex: 1 1 auto; min-width: 0; display: flex; }
.ima-report-filters > .ima-report-tag { flex: 0 0 auto; min-width: 0; }
.ima-report-head > .ima-report-filters { padding: 0 16px 12px; }
.ima-report-filters-row { padding: 12px 16px; flex-wrap: wrap; }
.ima-report-tag select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0 30px 0 10px;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
}
.ima-report-tag select[hidden] {
  display: none;
}
.ima-report-head .ima-doc-filter-chips { padding: 0 16px 12px; margin: 0; }
.kb-lib-empty { display: grid; gap: 8px; }
.ima-report-columns,
.ima-doc-row,
.ima-report-skeleton-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 132px; gap: 12px; align-items: center; padding: 8px 16px; }
.ima-report-columns {
  align-items: center;
  min-height: 32px;
  padding: 0 16px;
  border-top: var(--border-default);
  background: var(--color-surface-soft);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
}
.ima-report-columns span:last-child { text-align: right; }
.ima-report-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.ima-doc-row { min-height: 50px; border-bottom: var(--border-default); cursor: pointer; transition: background 0.15s ease; }
.ima-doc-row:hover { background: var(--color-surface-soft); }
.ima-doc-row:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.ima-doc-row.is-selected { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.ima-doc-row.is-selected .ima-report-title { color: var(--color-accent-text); }
.ima-report-date,
.ima-doc-row .ima-report-source {
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ima-doc-row .ima-report-source { text-align: right; }
.ima-report-copy { min-width: 0; display: grid; gap: 2px; }
.ima-report-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text-strong);
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: break-word;
}
.ima-report-snippet { display: -webkit-box; overflow: hidden; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ima-report-meta { display: flex; min-width: 0; gap: 8px; overflow: hidden; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-medium); line-height: 1.35; white-space: nowrap; }
.ima-report-meta .ima-doc-tag.is-action {
  flex: 0 1 auto;
  min-height: 0;
  max-width: 9em;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.ima-report-meta .ima-doc-tag.is-action:hover,
.ima-report-meta .ima-doc-tag.is-action:focus-visible {
  color: var(--color-accent-text);
  background: transparent;
}
.ima-report-meta .ima-doc-tag.is-selected {
  color: var(--color-accent-text);
  background: transparent;
  font-weight: var(--font-weight-semibold);
}
.ima-report-refresh-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 16px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--color-danger) 30%, transparent); border-radius: var(--radius-2xs); color: var(--color-danger); }
.ima-report-skeleton-row { min-height: 50px; border-bottom: var(--border-default); }

#kb-reader,
.ima-reader { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ima-reader-toolbar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 16px; border-bottom: var(--border-default); }
.ima-reader--feishu .ima-reader-toolbar { gap: var(--space-4); border-bottom: 0; padding-bottom: 4px; }
.ima-reader--feishu .ima-reader-title { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; color: var(--color-text-strong); font-size: var(--text-title); font-weight: var(--font-weight-semibold); line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.ima-reader--feishu .ima-reader-back { max-width: 88px; }
.ima-reader--feishu .ima-reader-actions { margin-left: auto; }
.ima-reader-actions { display: flex; align-items: center; gap: 8px; }
.ima-reader-back { flex: 0 1 auto; display: inline-flex; align-items: center; gap: 2px; min-width: 0; min-height: 44px; max-width: 50%; overflow: hidden; padding: 0 8px 0 2px; border: 0; background: transparent; color: var(--color-text); font: inherit; font-size: var(--text-sm); font-weight: var(--font-weight-medium); white-space: nowrap; text-overflow: ellipsis; }
.ima-reader-back:hover { color: var(--color-accent-text); }
.ima-back-icon { display: inline-flex; flex: 0 0 auto; align-items: center; }
.ima-reader-info { flex: 0 0 auto; padding: 12px 16px; }
.ima-reader-title { margin: 0; color: var(--color-text-strong); font-size: var(--text-title); font-weight: var(--font-weight-semibold); line-height: 1.35; }
.ima-reader-info .ima-reader-abstract { margin-top: 8px; }
.ima-reader-page .ima-pdf-panel {
  position: relative;
  flex: 1 1 auto;
  min-height: 240px;
  contain: strict;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
  border-top: var(--border-default);
  border-radius: 0;
  background: var(--color-surface-soft);
  overflow: hidden;
}
.ima-reader-page .ima-pdf-panel iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}
.ima-reader-nav { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: var(--border-default); }
.ima-reader-nav button { min-width: 0; min-height: 40px; padding: 0 16px; overflow: hidden; border: 0; background: var(--color-surface); color: var(--color-text-muted); font-size: var(--text-sm); font-weight: var(--font-weight-medium); text-overflow: ellipsis; white-space: nowrap; }
.ima-reader-nav button:hover { background: var(--color-surface-soft); color: var(--color-accent-text); }
.ima-reader-next { text-align: right; }

.feishu-timeline-panel { --feishu-time-rail: 68px; --feishu-track-gap: 20px; --feishu-entry-pad: 22px; --feishu-time-line: 20px; --feishu-node-size: 10px; --feishu-rail-center: calc(var(--feishu-time-rail) + (var(--feishu-track-gap) / 2)); flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--color-surface); }
.ima-reader--feishu .feishu-timeline-panel { border-top: 0; }
.feishu-timeline-toolbar { flex: 0 0 auto; min-width: 0; display: flex; align-items: center; justify-content: flex-start; gap: var(--space-3); padding: 0 16px 10px; border-bottom: var(--border-default); }
.feishu-source-pills { flex: 1 1 auto; min-width: 0; }
.feishu-source-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.feishu-date-badge { display: none; position: relative; }
.feishu-timeline-toolbar select { min-height: 40px; max-width: 220px; border: var(--border-strong); border-radius: var(--radius-control); padding: 0 30px 0 10px; background: var(--color-surface); color: var(--color-text); font: inherit; font-size: var(--text-sm); }
.feishu-timeline-toolbar .feishu-display-segment { flex: 0 0 auto; }
.feishu-date-select { display: none; }
.feishu-timeline-layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 132px; overflow: hidden; }
.feishu-timeline-body { min-width: 0; overflow-y: auto; scroll-behavior: smooth; padding: 14px 28px 40px 24px; }
.feishu-timeline-body .tl-group { margin: 0; }
.feishu-timeline-body .tl-group:first-child .tl-group-head { margin-top: 10px; }
.feishu-timeline-body .live-item { align-items: flex-start; }
.feishu-live-speaker { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--color-text-strong); font-size: var(--text-body); font-weight: var(--font-weight-semibold); line-height: 1.65; }
.feishu-live-speaker time { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-normal); font-variant-numeric: tabular-nums; }
.feishu-speaker-avatar { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.feishu-speaker-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--color-accent-soft); color: var(--color-accent-strong); font-size: var(--text-sm); }
.feishu-live-source { margin: 0 0 4px; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.65; }
.feishu-timeline-body .live-body .feishu-entry-block { margin: 0; }
.feishu-timeline-body .live-body .feishu-entry-block + .feishu-entry-block { margin-top: 8px; }
.feishu-timeline-body .live-body .feishu-entry-block p { max-width: 75ch; margin: 0 0 8px; color: inherit; font: inherit; line-height: 1.65; overflow-wrap: break-word; }
.feishu-timeline-body .live-body .feishu-entry-block p:last-child { margin-bottom: 0; }
.feishu-timeline-body .live-body .feishu-entry-speaker { margin-bottom: 4px; }
.feishu-timeline-body .live-body .feishu-entry-speaker strong { font-size: var(--text-body); line-height: 1.65; }
.feishu-day-heading { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: var(--feishu-time-rail) minmax(0, 1fr); column-gap: var(--feishu-track-gap); margin: 28px 0 0; padding: 0 0 10px; border-bottom: var(--border-default); background: var(--color-surface); color: var(--color-text-strong); font-size: var(--text-sm); font-weight: var(--font-weight-semibold); scroll-margin-top: 12px; }
.feishu-day-heading::before { content: ""; }
.feishu-entry { position: relative; display: grid; grid-template-columns: var(--feishu-time-rail) minmax(0, 1fr); gap: var(--feishu-track-gap); padding: var(--feishu-entry-pad) 0; }
.feishu-entry::before { content: ""; position: absolute; left: var(--feishu-rail-center); top: 0; bottom: 0; width: 1px; background: var(--color-line); }
.feishu-entry::after { content: ""; position: absolute; left: var(--feishu-rail-center); top: calc(var(--feishu-entry-pad) + (var(--feishu-time-line) - var(--feishu-node-size)) / 2); width: var(--feishu-node-size); height: var(--feishu-node-size); transform: translateX(-50%); border: 2px solid var(--color-accent); border-radius: 50%; background: var(--color-surface); }
.feishu-entry-time { display: grid; align-content: start; gap: 4px; min-width: 0; padding-right: 4px; text-align: right; }
.feishu-entry-time time { display: block; color: var(--color-text-strong); font-size: var(--text-sm); font-weight: var(--font-weight-semibold); line-height: var(--feishu-time-line); font-variant-numeric: tabular-nums; }
.feishu-entry-time > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feishu-entry-author { color: var(--color-text-strong); font-size: var(--text-sm); font-weight: var(--font-weight-semibold); line-height: 1.4; }
.feishu-entry-source { color: var(--color-text-muted); font-size: var(--text-xs); }
.feishu-entry-content { min-width: 0; display: grid; gap: 16px; padding-left: 0; }
.feishu-entry-block p { max-width: 75ch; margin: 0; color: var(--color-text); line-height: 1.85; overflow-wrap: anywhere; }
.feishu-entry-speaker { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; margin-bottom: 5px; }
.feishu-entry-speaker strong { color: var(--color-text-strong); font-size: var(--text-body); font-weight: var(--font-weight-semibold); }
.feishu-entry-speaker span { color: var(--color-text-muted); font-size: var(--text-xs); }
.feishu-entry-speaker .feishu-entry-reply-to { color: var(--color-accent-strong); font-size: var(--text-xs); font-weight: var(--font-weight-semibold); }
/* BBS 嵌套回复：缩进 + 左侧竖线 + 浅底 */
.feishu-entry-block.is-reply { margin-left: 34px; padding: 8px 12px; border-left: 1px solid var(--color-line-strong); background: var(--color-surface-soft); border-radius: 0 var(--radius-control) var(--radius-control) 0; }
.feishu-entry-assets { margin-top: 10px; }
.feishu-entry-assets .post-img-link { max-width: 280px; }
.feishu-entry-assets img { min-width: 64px; min-height: 48px; max-height: 360px; object-fit: contain; background: var(--color-surface-soft); }
.feishu-entry-table { max-width: 100%; overflow-x: auto; border: var(--border-default); border-radius: var(--radius-control); }
.feishu-entry-table table { min-width: 100%; border-collapse: collapse; background: var(--color-surface); }
.feishu-entry-table th,
.feishu-entry-table td { min-width: 120px; padding: 8px 10px; border-right: var(--border-default); border-bottom: var(--border-default); color: var(--color-text); font-size: var(--text-sm); line-height: 1.55; text-align: left; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.feishu-entry-table th { background: var(--color-surface-soft); color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.feishu-entry-table tr:last-child > * { border-bottom: 0; }
.feishu-entry-table tr > *:last-child { border-right: 0; }
.feishu-entry-table .post-img-link { display: block; width: fit-content; margin-top: 8px; }
.feishu-entry-table:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.feishu-attachment { min-height: 40px; padding: 0 12px; border: var(--border-strong); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text-strong); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.feishu-timeline-more { display: grid; justify-items: center; gap: 8px; padding: 18px 0 8px; }
.feishu-timeline-more button { min-height: 44px; }
.feishu-timeline-load-error { margin: 0; color: var(--color-danger); font-size: var(--text-sm); }
.feishu-source-open { grid-column: 1 / -1; margin: 0; padding-top: 4px; color: var(--color-text-muted); font-size: var(--text-xs); }
.feishu-source-open.is-blocked { color: var(--color-danger); }
.feishu-date-nav { overflow-y: auto; padding: 14px 12px; border-left: var(--border-default); background: var(--color-surface-soft); }
.feishu-date-nav a { display: block; min-height: 36px; padding: 8px; border-radius: var(--radius-2xs); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-medium); text-decoration: none; }
.feishu-date-nav a:hover, .feishu-date-nav a:focus-visible { background: var(--color-accent-soft); color: var(--color-accent-text); }
.feishu-doc-day { position: sticky; top: 0; z-index: 2; margin: 26px 0 6px; padding-bottom: 6px; border-bottom: var(--border-default); background: var(--color-surface); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-semibold); letter-spacing: .04em; scroll-margin-top: 12px; }
.feishu-doc-entry { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 6px 0; }
.feishu-doc-time { display: block; padding-top: 3px; color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; text-align: right; }
.feishu-doc-content { min-width: 0; display: grid; gap: 10px; }
.feishu-timeline-body.is-doc-mode .feishu-entry-block p { max-width: 78ch; margin: 0; color: var(--color-text); line-height: 1.85; overflow-wrap: anywhere; }
.feishu-new-content { flex: 0 0 auto; min-height: 40px; border: 0; border-bottom: var(--border-default); background: var(--color-accent-soft); color: var(--color-accent-text); font: inherit; font-size: var(--text-sm); font-weight: var(--font-weight-semibold); cursor: pointer; }
.feishu-latest-fab { display: none; }
@media (max-width: 800px) {
  .feishu-latest-fab { position: fixed; right: 14px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: var(--border-strong); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text-strong); font: inherit; font-size: var(--text-sm); font-weight: var(--font-weight-semibold); box-shadow: var(--shadow-sm); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity var(--ease-standard), transform var(--ease-standard); }
  .feishu-latest-fab.is-visible { opacity: 1; pointer-events: auto; transform: none; }
}

.kb-lib-row {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.kb-lib-row.has-unsub {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}
.kb-lib-open {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.kb-lib-row:hover { background: var(--color-surface-accent-soft); }
.kb-lib-row.is-selected {
  background: var(--color-accent-soft);
  color: var(--color-accent-text);
}
.kb-lib-row.is-selected .kb-lib-name,
.kb-lib-row.is-selected .kb-lib-meta { color: var(--color-accent-text); }
.kb-lib-row.is-available {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: default;
}
.kb-lib-row:focus-visible,
.kb-lib-open:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.kb-lib-copy { min-width: 0; display: grid; gap: 2px; }
.kb-lib-name {
  overflow: hidden;
  color: var(--color-text-strong);
  font-weight: var(--font-weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kb-lib-meta { color: var(--color-text-muted); font-size: var(--text-xs); }
.kb-lib-unsub {
  width: auto;
  min-height: 32px;
  padding: 0 8px;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}
#ima-doc-day-nav-slot { display: flex; flex: 0 0 auto; align-items: center; }
.kb-desk-day {
  flex: 0 0 auto;
  min-width: 4.5em;
  min-height: 36px;
  margin-left: 4px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--color-text-strong);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kb-desk-day:hover { background: var(--color-surface-soft); }
.kb-desk-day:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}
.kb-desk-day-menu {
  position: fixed;
  z-index: 50;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: var(--border-default);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.kb-desk-day-option {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-2xs);
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-sm);
  text-align: left;
}
.kb-desk-day-option:hover { background: var(--color-surface-soft); }
.kb-desk-day-option.is-selected {
  color: var(--color-accent-text);
  background: var(--color-accent-soft);
  font-weight: var(--font-weight-semibold);
}
.ima-doc-kind {
  display: inline-flex; align-items: center;
  min-height: 22px; padding: 0 8px;
  border: var(--border-default); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text-muted);
  font-size: var(--text-xs); font-weight: var(--font-weight-medium);
}

/* 研报库阅读台（手机）：必须在桌面规则之后声明，否则同优先级被后者覆盖 */
@media (max-width: 768px) {
  .page-main:has(.ima-report-page),
  .page-main:has(.ima-reader-page) {
    height: calc(100vh - 124px);
    height: calc(100dvh - 120px - env(safe-area-inset-bottom));
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .ima-report-search { grid-template-columns: minmax(0, 1fr); }
  .ima-report-filters { flex-wrap: nowrap; }
  .kb-source-pills-desk { display: none !important; }
  .ima-report-filters > .ima-report-source,
  .ima-report-filters > .ima-report-tag {
    flex: 1 1 0;
    min-width: 0;
  }
  .kb-source-select-wrap { display: block; width: 100%; min-width: 0; }
  .kb-source-select-mobile { display: block; width: 100%; }
  .ima-tag-trigger {
    display: flex;
    position: relative;
    width: 100%;
    min-height: 42px;
    align-items: center;
    margin-left: 0;
    padding: 0 28px 0 10px;
    border: var(--border-strong);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .kb-source-select-wrap > .ui-icon,
  .ima-tag-trigger > .ui-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    opacity: 0.55;
  }
  .ima-tag-trigger .ima-tag-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ima-report-tag > .kb-desk-day-menu[data-tag-menu] { max-height: 50dvh; }
  .ima-report-columns,
  .ima-doc-row,
  .ima-report-skeleton-row {
    grid-template-columns: 44px minmax(0, 1fr) 84px;
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .ima-reader--feishu .ima-reader-title { font-size: var(--text-body); }
  .feishu-timeline-toolbar { padding: 0 12px 10px; }
  .feishu-timeline-toolbar label { flex: 1 1 130px; min-width: 0; }
  .feishu-timeline-toolbar select { width: auto; max-width: 160px; min-width: 0; min-height: 44px; }
  .feishu-timeline-toolbar .feishu-display-segment { flex: 1 1 auto; }
  .feishu-source-pills .tl-pill.has-avatar {
    width: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 50%;
  }
  .feishu-source-pills .tl-pill.has-avatar span { display: none; }
  .feishu-source-pills .tl-pill.has-avatar .feishu-source-avatar { width: 28px; height: 28px; }
  .feishu-timeline-toolbar label.feishu-date-badge {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: var(--border-strong);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-strong);
  }
  .feishu-date-badge .feishu-date-ic { width: 20px; height: 20px; }
  .feishu-date-badge .feishu-date-select {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    min-height: 0;
    max-width: none;
    opacity: 0;
    font-size: 16px;
    cursor: pointer;
  }
  .feishu-timeline-layout { grid-template-columns: minmax(0, 1fr); }
  .feishu-date-nav { display: none; }
  .feishu-timeline-panel { --feishu-time-rail: 48px; --feishu-track-gap: 16px; --feishu-entry-pad: 18px; }
  .feishu-timeline-body { padding: 12px 14px 32px 12px; }
  .feishu-day-heading { margin-top: 20px; }
  .feishu-entry { padding: var(--feishu-entry-pad) 0; }
  .feishu-entry-time { padding-right: 2px; }
  .feishu-entry-source { display: none; }
  .feishu-entry-content { padding-left: 0; }
}

.ima-source-stack { display: grid; gap: var(--space-5); }
.ima-source-block { min-width: 0; }
.ima-source-block + .ima-source-block {
  border-top: var(--border-default);
  padding-top: var(--space-5);
}
.ima-source-block-head { margin-bottom: var(--space-3); }
.ima-source-title {
  margin: 0;
  color: var(--color-text-strong);
  font-size: var(--text-title);
  font-weight: var(--font-weight-semibold);
}
.ima-source-block-head .section-meta { margin-top: 4px; }
.knowledge-settings {
  display: grid;
  gap: 18px;
}
.ks-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ks-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 14px;
  border: var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  cursor: pointer;
}
.ks-tab.is-on {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}
.ks-tab:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.ks-panel { display: none; }
.ks-panel.is-on { display: grid; gap: 16px; }
.ks-panel[data-panel="storage"].is-on { display: block; }
.ks-advanced { margin-top: 12px; }
.ks-advanced > summary { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.ks-advanced > summary::-webkit-details-marker { display: none; }
.ks-advanced > summary .ui-icon { width: 16px; height: 16px; color: var(--color-text-muted); transition: transform var(--ease-standard); }
.ks-advanced[open] > summary .ui-icon { transform: rotate(90deg); }
.ks-advanced .cfg-fields { margin-top: 10px; }
.cicc-collect { margin-top: 10px; }
.ima-storage-bar {
  background: var(--color-surface-soft);
  height: 8px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 6px 0 12px;
}
.ima-storage-bar > div { height: 100%; }
.ima-storage-alerts {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ima-storage-alerts input[type="number"] { width: 56px; }
.ima-acl-picker { display: grid; gap: 8px; min-width: 0; }
#ima-group-acl .ima-acl-picker.is-compact .ima-acl-chips {
  max-height: 80px;
  overflow: hidden;
}
#ima-group-acl .ima-acl-picker.is-compact.is-expanded .ima-acl-chips { max-height: none; }
.ima-acl-more {
  justify-self: start;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-accent-text);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
}
.ima-acl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}
.ima-acl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  cursor: pointer;
}
.ima-acl-chip:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
}
.ima-acl-chip:focus-visible {
  border-color: var(--color-accent-text);
  box-shadow: var(--shadow-focus-ring);
  outline: none;
}
.knowledge-settings .ima-acl-search,
.modal-card .ima-acl-search { margin: 0; }
.ima-acl-suggest {
  display: grid;
  max-height: 240px;
  overflow: auto;
  border: var(--border-default);
  border-radius: var(--radius-control);
  background: var(--color-surface);
}
.ima-acl-suggest[hidden] { display: none; }
.ima-acl-suggest-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
}
.ima-acl-suggest-item:hover,
.ima-acl-suggest-item:focus-visible,
.ima-acl-suggest-item.is-on {
  background: var(--color-accent-soft);
  color: var(--color-accent-text);
}
.ima-acl-suggest-item:focus-visible {
  box-shadow: var(--shadow-focus-ring);
  outline: none;
}
.ima-acl-picker[data-busy] { opacity: 0.72; pointer-events: none; }
.ima-acl-empty { margin: 0; }
.knowledge-settings .ima-credential-actions {
  margin-top: var(--space-3);
}
.feishu-config { display: grid; gap: 12px; }
.feishu-config-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.feishu-config .cfg-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-4); margin-top: 0; }
.feishu-config .cfg-field { min-width: 0; display: grid; gap: 6px; }
.feishu-config .feishu-field--wide { grid-column: 1 / -1; }
.feishu-config-actions { justify-content: flex-end; }
.feishu-source-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.feishu-source-add .form-control { width: 100%; min-width: 0; }
.feishu-document-preview { grid-column: 1 / -1; min-height: 24px; color: var(--color-text-muted); font-size: var(--text-xs); }
.feishu-preview-status { display: flex; align-items: center; gap: 8px; min-height: 24px; overflow-wrap: anywhere; }
.feishu-preview-status strong { color: var(--color-text-strong); font-size: var(--text-sm); }
.feishu-preview-status.is-ready { color: var(--color-success); }
.feishu-preview-status.is-loading { color: var(--color-text-muted); }
.feishu-preview-status.is-invalid { color: var(--color-danger); }
.feishu-source-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; color: var(--color-text-muted); font-size: var(--text-sm); }
.feishu-source-list { border-top: var(--border-default); }
.feishu-source-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 20px; padding: 16px 0; border-bottom: var(--border-default); }
.feishu-source-copy { min-width: 0; }
.feishu-source-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 28px; }
.feishu-source-title strong { min-width: 0; overflow: hidden; color: var(--color-text-strong); font-size: var(--text-body); text-overflow: ellipsis; white-space: nowrap; }
.feishu-title-rename { flex: 0 0 auto; border: none; background: none; color: var(--color-text-muted); font: inherit; font-size: var(--text-xs); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.feishu-title-rename:hover { color: var(--color-text-strong); }
.feishu-source-state { min-height: 22px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--color-surface-soft); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-medium); }
.feishu-source-state[data-status="succeeded"] { color: var(--color-success); }
.feishu-source-state[data-status="failed"],
.feishu-source-state[data-status="authorization_required"] { color: var(--color-danger); }
.feishu-source-copy p { margin: 4px 0 0; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.5; }
.feishu-source-copy .feishu-source-error { color: var(--color-danger); }
.feishu-source-toggle { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 44px; color: var(--color-text-muted); font-size: var(--text-sm); cursor: pointer; }
.feishu-source-toggle input { appearance: none; position: relative; width: 40px; height: 24px; margin: 0; border: 1px solid var(--color-line-strong); border-radius: var(--radius-pill); background: var(--color-surface-soft); cursor: pointer; transition: background var(--ease-standard), border-color var(--ease-standard); }
.feishu-source-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--color-surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .18); transition: transform var(--ease-standard); }
.feishu-source-toggle input:checked { border-color: var(--color-accent); background: var(--color-accent); }
.feishu-source-toggle input:checked::after { transform: translateX(16px); }
.feishu-source-toggle input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.feishu-source-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feishu-display-label { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-medium); }
.feishu-display-segment { display: inline-flex; min-height: 44px; overflow: hidden; border: var(--border-strong); border-radius: var(--radius-control); background: var(--color-surface); }
.feishu-display-option { min-width: 68px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 0; background: transparent; color: var(--color-text-muted); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.feishu-display-option + .feishu-display-option { border-left: var(--border-default); }
.feishu-display-option:hover { color: var(--color-accent-text); }
.feishu-display-option.is-selected { background: var(--color-accent); color: var(--color-white); font-weight: var(--font-weight-semibold); }
.feishu-action { min-height: 44px; padding: 0 12px; gap: 7px; white-space: nowrap; }
.feishu-action .refresh-icon,
.feishu-action .external-link-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.feishu-action.danger { margin-left: 0; }

@media (max-width: 800px) {
  .ks-tab { min-height: 44px; }
  .feishu-config .cfg-fields { grid-template-columns: minmax(0, 1fr); }
  .feishu-config-actions { justify-content: flex-start; }
  .feishu-config-actions .btn-normal { width: 100%; }
  .feishu-source-add { grid-template-columns: minmax(0, 1fr); }
  .feishu-source-add .btn-normal { width: 100%; }
  .feishu-source-summary { align-items: flex-start; }
  .feishu-source-row { grid-template-columns: minmax(0, 1fr) auto; }
  .feishu-source-toggle { grid-column: 2; grid-row: 1; }
  .feishu-source-actions { grid-column: 1 / -1; justify-content: flex-start; }

  .feishu-source-actions { gap: 8px; }
  .feishu-action { flex: 1 1 auto; }
  .feishu-display-label { flex: 0 0 100%; }
  .knowledge-settings .ima-credential-actions,
  .knowledge-settings .ima-collector-foot .toolbar,
  .knowledge-settings .ima-storage-toolbar {
    width: 100%;
  }
  .knowledge-settings .ima-credential-actions .btn-normal,
  .knowledge-settings .ima-collector-foot .btn-normal,
  .knowledge-settings #pc-zq-save,
  .knowledge-settings #ima-storage-backup {
    flex: 1 1 100%;
  }
}
.ima-polling-save-row { justify-content: flex-end; margin-top: var(--space-4); }
.ima-collector-stack { display: grid; gap: var(--space-4); }
.ima-collector-connection,
.ima-groups-block,
.ima-group-row { min-width: 0; }
.ima-collector-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
}
.ima-collector-fields .cfg-field { min-width: 0; }
.ima-collector-fields .ima-field--wide { grid-column: 1 / -1; }
.ima-groups-head,
.ima-group-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.ima-groups-head .cfg-group-title,
.ima-group-row-head .cfg-group-title { margin: 0; }
.ima-groups-toolbar { margin: 0; }
.ima-groups-list { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.ima-mount-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  min-width: 0;
  margin-top: var(--space-3);
  border: var(--border-default);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  overflow: hidden;
}
.ima-mount-rail {
  min-width: 0;
  border-right: var(--border-default);
  background: var(--color-surface-soft);
}
.ima-mount-detail { min-width: 0; background: var(--color-surface); }
.ima-kb-select { display: none; }
.ima-selected-head,
.ima-detail-section,
.ima-collector-runtime,
.ima-collector-savebar {
  padding: var(--space-3) var(--space-4);
  border-top: var(--border-default);
}
.ima-selected-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border-top: 0;
}
.ima-selected-head > div { display: grid; gap: 3px; min-width: 0; }
.ima-detail-section h3 { margin: 0; font-size: var(--text-sm); color: var(--color-text-strong); }
.ima-frequency-section,
.ima-selected-interval,
.ima-collector-savebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.ima-selected-head .refresh-icon,
.ima-groups-toolbar .refresh-icon { width: 16px; height: 16px; flex-shrink: 0; }
.ima-folder-panel-toggle {
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}
.ima-folder-panel-toggle > span:first-child { display: grid; gap: 3px; }
.ima-collector-runtime { display: grid; gap: 6px; }
.ima-unsaved-status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-xs); color: var(--color-text-muted); }
.ima-unsaved-status > span { width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--color-accent); }
.ima-mount-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 52px;
  padding: 8px 12px;
}
.ima-mount-pane-head > * { min-width: 0; }
.ima-mount-pane-head strong { overflow-wrap: anywhere; }
.ima-mount-pane-head .muted {
  flex: 0 0 auto;
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}
.ima-kb-list,
.ima-folder-tree {
  max-height: 460px;
  overflow: auto;
  min-width: 0;
}
.ima-mount-empty { margin: 12px; }
.ima-mount-kb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}
.ima-mount-kb-row:hover { background: var(--color-surface-soft); }
.ima-mount-kb-row.is-selected {
  background: var(--color-accent-soft);
  color: var(--color-text-strong);
}
.ima-mount-kb-copy { display: grid; gap: 2px; min-width: 0; }
.ima-mount-kb-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--color-text-strong);
  font-weight: var(--font-weight-medium);
  line-height: 1.35;
}
.ima-mount-kb-meta {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: 1.35;
}
.ima-mount-kb-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 6px;
  border: var(--border-default);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}
.ima-interval-seg {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
}
.ima-interval-seg button {
  min-height: 32px;
  min-width: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-xs);
  cursor: pointer;
}
.ima-interval-seg button.is-on {
  background: var(--color-accent);
  color: var(--color-white);
}
.ima-collector-foot-main { display: grid; gap: 6px; min-width: 0; flex: 1 1 220px; }
.ima-progress { display: grid; gap: 6px; min-width: 0; }
.ima-progress-label { color: var(--color-text); font-size: var(--text-sm); }
.ima-progress-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-soft);
  overflow: hidden;
}
.ima-progress-bar span {
  display: block;
  height: 100%;
  background: var(--color-accent);
}
.ima-folder-node {
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 44px;
}
.ima-folder-row {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  min-height: 44px;
  padding: 0 10px 0 var(--ima-folder-indent, 8px);
  border-top: var(--border-default);
}
.ima-folder-row:hover { background: var(--color-surface-soft); }
.ima-folder-expand,
.ima-folder-expand-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
}
.ima-folder-expand {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 22px;
  line-height: 1;
}
.ima-folder-expand:hover { color: var(--color-text-strong); background: var(--color-bg-muted); }
.ima-folder-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  cursor: pointer;
}
.ima-folder-choice input,
.ima-folder-orphan input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  accent-color: var(--color-accent);
}
.ima-folder-icon { display: inline-flex; flex: 0 0 auto; color: var(--color-accent-text); }
.ima-folder-icon svg { width: 17px; height: 17px; }
.ima-folder-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--color-text-strong);
  line-height: 1.35;
}
.ima-folder-choice input:disabled + .ima-folder-icon,
.ima-folder-choice input:disabled ~ .ima-folder-name { color: var(--color-text-muted); }
.ima-folder-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 44px;
  padding: 12px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.ima-folder-state-title {
  margin: 0;
  padding: 10px 12px 4px;
  color: var(--color-warning-strong);
  font-size: var(--text-xs);
}
.ima-folder-error { color: var(--color-danger); }
.ima-folder-error .btn-sm { flex: 0 0 auto; min-height: 44px; }
.ima-folder-orphans { border-top: var(--border-default); }
.ima-folder-orphan {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 12px;
  color: var(--color-warning-strong);
  font-size: var(--text-xs);
}
.ima-group-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
}
.ima-group-fields .cfg-field { min-width: 0; }
.ima-group-enabled { grid-column: 1 / -1; }
.ima-code-field .form-control {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.ima-credential-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.ima-credential-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--color-text-strong);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
}
.ima-credential-field--wide { grid-column: 1 / -1; }
.ima-credential-field .form-control { margin: 0; }
.ima-credential-actions { margin-top: var(--space-4); }
.ima-collector-foot .toolbar { margin-top: 0; }

@media (max-width: 800px) {
  .ima-collector-fields,
  .ima-group-fields,
  .ima-credential-fields { grid-template-columns: 1fr; }
  .ima-collector-fields .ima-field--wide,
  .ima-group-enabled,
  .ima-credential-field--wide { grid-column: auto; }
  .ima-kb-list,
  .ima-folder-tree { max-height: 360px; }
}

@media (max-width: 768px) {
  .kb-lib-row,
  .kb-lib-row .btn-normal,
  .kb-lib-unsub { min-height: 44px; }
  .ima-doc-group-tabs { display: none !important; }
  .ima-doc-group-select { display: block !important; }
  .ima-doc-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .ima-doc-search-form { grid-column: 1; width: 100%; }
  .ima-doc-search { width: 100%; }
  .ima-doc-toolbar > .btn-ghost { grid-column: 2; grid-row: 1; }
  .ima-doc-filters { display: block; }
  .ima-doc-tag-filter { width: 100%; }
  .ima-pdf-panel iframe { min-height: calc(100vh - 220px); }
  .ima-text-view { max-height: none; }
  .ima-polling-save-row .btn-normal { width: 100%; }
  .ima-collector-foot { align-items: stretch; }
  .ima-collector-foot .toolbar,
  .ima-credential-actions { width: 100%; }
  .ima-collector-foot .toolbar button,
  .ima-credential-actions button { flex: 1 1 160px; min-height: 44px; }
  .ima-groups-head { align-items: flex-start; flex-direction: column; }
  .ima-groups-toolbar { width: auto; }
  .ima-groups-toolbar button { width: auto; }
}

/* ========== AI 分析页面样式 ========== */

.ai-analysis-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 紧凑表格布局：AI 分析任务列表 */
.ai-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-new-task-btn { flex-shrink: 0; }

.ai-task-cell-main {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
}

.ai-task-cell-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: normal;
  max-width: 320px;
}

.ai-task-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
}

.ai-task-status-badge.enabled {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.ai-task-status-badge.disabled {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

/* 连续失败被自动停用：区别于手动禁用的中性灰，用警示橙提示需要人工介入 */
.ai-task-status-badge.disabled.auto-stopped {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

.ai-task-run-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.ai-task-run-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.ai-task-run-status.success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.ai-task-run-status.success::before {
  background: #22c55e;
}

.ai-task-run-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.ai-task-run-status.error::before {
  background: #ef4444;
}

.ai-task-run-status.neutral {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.ai-task-run-status.neutral::before {
  background: #6b7280;
}

.ai-task-run-time {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.ai-analysis-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.ai-analysis-empty .empty-state-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  opacity: 0.4;
  color: var(--text-color);
}

.ai-analysis-empty h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
}

.ai-analysis-empty p {
  font-size: 15px;
  color: var(--muted-color);
  margin-bottom: 24px;
}

/* AI 任务模态框样式 */
.ai-task-modal {
  max-width: 680px;
  width: 100%;
  overflow: hidden;
}

.ai-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.ai-modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.ai-modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-color);
  border: none;
  cursor: pointer;
  color: var(--muted-color);
  transition: all 0.2s ease;
}

.ai-modal-close:hover {
  background: var(--border-color);
  color: var(--text-color);
}

.ai-modal-close svg {
  width: 20px;
  height: 20px;
}

.ai-modal-body {
  padding: 24px 0;
  max-height: calc(80vh - 200px);
  overflow-y: auto;
}

.ai-form-section {
  margin-bottom: 28px;
}

.ai-form-section:last-child {
  margin-bottom: 0;
}

.ai-form-section-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-color);
}

.ai-form-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-form-row {
  display: flex;
  gap: 16px;
}

.ai-form-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ai-form-label-half {
  flex: 1;
}

.ai-form-label span {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-color);
}

.ai-form-label .required {
  color: #ef4444;
}

.ai-form-input,
.ai-form-textarea,
.ai-form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-color);
  background: var(--card-bg);
  transition: all 0.2s ease;
}

.ai-form-input:focus,
.ai-form-textarea:focus,
.ai-form-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ai-form-select {
  cursor: pointer;
  background-color: var(--card-bg) !important;
  color: var(--text-color) !important;
}

.ai-form-select option {
  background-color: var(--card-bg) !important;
  color: var(--text-color) !important;
}

/* 针对深色模式的额外保障 */
.theme-dark .ai-form-select,
.theme-dark .ai-form-select option {
  background-color: #1f2937 !important;
  color: #f3f4f6 !important;
}

/* 针对浅色模式的额外保障 */
html:not(.theme-dark) .ai-form-select,
html:not(.theme-dark) .ai-form-select option {
  background-color: white !important;
  color: #111827 !important;
}

.ai-form-textarea {
  resize: vertical;
  min-height: 80px;
}

.ai-prompt-textarea {
  min-height: 160px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: var(--text-sm);
}

.ai-form-hint {
  font-size: 13px;
  color: var(--muted-color);
  padding: 10px 14px;
  background: var(--bg-color);
  border-radius: 8px;
  line-height: 1.5;
}

.ai-form-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent-color);
  background: rgba(59, 130, 246, 0.1);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-form-btn-secondary:hover {
  background: rgba(59, 130, 246, 0.15);
}

.ai-form-btn-secondary svg {
  width: 16px;
  height: 16px;
}

.ai-days-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-day-checkbox {
  position: relative;
  cursor: pointer;
}

.ai-day-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ai-day-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-color);
  background: var(--card-bg);
  transition: all 0.2s ease;
}

.ai-day-checkbox:hover .ai-day-label {
  border-color: var(--accent-color);
  background: rgba(59, 130, 246, 0.05);
}

.ai-day-checkbox.checked .ai-day-label {
  border-color: #3b82f6 !important;
  background: #3b82f6 !important;
  color: white !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.ai-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.ai-modal-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-modal-btn-cancel {
  background: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.ai-modal-btn-cancel:hover {
  background: var(--border-color);
}

.ai-modal-btn-primary {
  background: #3b82f6 !important;
  color: white !important;
  border: none;
}

.ai-modal-btn-primary:hover {
  background: #2563eb !important;
}

/* AI 日志模态框样式 */
.ai-report-content {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--text-color);
}

.ai-logs-modal {
  max-width: 640px;
  width: 100%;
  overflow: hidden;
}

.ai-logs-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.ai-logs-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 4px 0;
}

.ai-logs-subtitle {
  font-size: var(--text-sm);
  color: var(--muted-color);
  margin: 0;
}

.ai-logs-content {
  max-height: 500px;
  overflow-y: auto;
  padding: 16px 0;
}

/* 运行日志：紧凑单行摘要 + 点击展开详情 */
.ai-log-row {
  border-bottom: 1px solid var(--border-color);
}

.ai-log-row:last-child {
  border-bottom: none;
}

.ai-log-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 6px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-color);
  text-align: left;
}

.ai-log-row-main:hover {
  background: var(--bg-color);
}

.ai-log-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-color);
}

.ai-log-row.success .ai-log-dot {
  background: #22c55e;
}

.ai-log-row.error .ai-log-dot {
  background: #ef4444;
}

.ai-log-row.running .ai-log-dot {
  background: #f59e0b;
}

.ai-log-row-time {
  flex: none;
  color: var(--muted-color);
  font-variant-numeric: tabular-nums;
}

.ai-log-row-brief {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-log-row.error .ai-log-row-brief {
  color: #ef4444;
}

.ai-log-row-meta {
  flex: none;
  font-size: 12px;
  color: var(--muted-color);
  font-variant-numeric: tabular-nums;
}

.ai-log-chevron {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--muted-color);
  transition: transform 0.15s ease;
}

.ai-log-row.open .ai-log-chevron {
  transform: rotate(180deg);
}

.ai-log-detail {
  display: none;
  padding: 2px 6px 14px 24px;
}

.ai-log-row.open .ai-log-detail {
  display: block;
}

.ai-log-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12px;
  color: var(--muted-color);
}

.ai-log-facts b {
  font-weight: 500;
  color: var(--text-color);
  font-variant-numeric: tabular-nums;
}

.ai-log-msg {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg-color);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-color);
  word-break: break-word;
  white-space: pre-wrap;
}

.ai-log-row.error .ai-log-msg {
  color: #ef4444;
}

.ai-log-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
}

.ai-log-detail-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--accent-color);
  text-decoration: none;
}

.ai-log-detail-actions a:hover {
  color: var(--accent-hover-color);
}

.ai-log-detail-actions svg {
  width: 14px;
  height: 14px;
}

.ai-logs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted-color);
}

.ai-logs-empty svg {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.ai-logs-empty p {
  margin: 0;
  font-size: 15px;
}

.ai-logs-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* 按钮样式增强 */
.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

.btn-primary {
  background: #3b82f6 !important;
  color: white !important;
  border: none;
}

.btn-primary:hover {
  background: #2563eb !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .ai-form-row {
    flex-direction: column;
  }
  
  .ai-days-container {
    justify-content: center;
  }
  
  .ai-day-label {
	    min-width: 56px;
	    padding: 10px 14px;
	  }
	}

	/* KOL 下拉框样式 */
	.ai-kol-dropdown {
	  position: relative;
	  width: 100%;
	}

	.ai-kol-dropdown-trigger {
	  display: flex;
	  align-items: center;
	  justify-content: space-between;
	  gap: 12px;
	  width: 100%;
	  padding: 12px 14px;
	  border: 1px solid var(--border-color);
	  border-radius: 10px;
	  font-size: 15px;
	  color: var(--text-color);
	  background: var(--card-bg);
	  cursor: pointer;
	  transition: all 0.2s ease;
	}

	.ai-kol-dropdown-trigger:hover {
	  border-color: var(--accent-color);
	}

	.ai-kol-dropdown-trigger.open {
	  outline: none;
	  border-color: var(--accent-color);
	  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
	}

	.ai-kol-selected-text {
	  flex: 1;
	  font-size: var(--text-body);
	  color: var(--color-text);
	  overflow: hidden;
	  text-overflow: ellipsis;
	  white-space: nowrap;
	}

	.ai-kol-selected-text.placeholder {
	  color: var(--color-text-muted);
	}

	.ai-kol-dropdown-arrow {
	  width: 20px;
	  height: 20px;
	  flex-shrink: 0;
	  color: var(--color-text-muted);
	  transition: transform 0.15s ease;
	}

	.ai-kol-dropdown-trigger.open .ai-kol-dropdown-arrow {
	  transform: rotate(180deg);
	}

		.ai-kol-dropdown-menu {
		  position: absolute;
		  top: calc(100% + 4px);
		  left: 0;
		  right: 0;
		  z-index: 1000;
		  display: none;
		  grid-template-columns: repeat(3, 1fr);
		  gap: 8px;
		  max-height: 400px;
		  overflow-y: auto;
		  padding: 12px;
		  background: var(--color-surface);
		  border: 1px solid var(--color-line);
		  border-radius: var(--radius-sm);
		  box-shadow: var(--shadow-lg);
		}

		.ai-kol-dropdown-menu.open {
		  display: grid;
		}

	.ai-kol-item {
	  display: flex;
	  align-items: center;
	  gap: 8px;
	  padding: 10px 12px;
	  border-radius: 8px;
	  cursor: pointer;
	  transition: background 0.15s ease;
	  border: 1px solid transparent;
	}

	.ai-kol-item:hover {
	  background: var(--color-surface-hover);
	}

	.ai-kol-item.checked {
	  background: var(--color-accent-soft);
	}

	.ai-kol-checkbox {
	  width: 18px;
	  height: 18px;
	  accent-color: var(--color-accent);
	  flex-shrink: 0;
	}

	.ai-kol-content {
	  display: flex;
	  flex-direction: column;
	  gap: 2px;
	  cursor: pointer;
	  flex: 1;
	  pointer-events: none;
	}

	.ai-kol-name {
	  font-size: var(--text-body);
	  font-weight: var(--font-weight-medium);
	  color: var(--color-text);
	}

	.ai-kol-platform {
	  font-size: var(--text-sm);
	  color: var(--color-text-muted);
	}

/* 大V 屏蔽词：查看拦截详情 */
.ak-kw-view {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.ak-kw-chip {
  display: inline-block;
  padding: 2px 12px;
  margin: 0 6px 6px 0;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: var(--text-sm);
  background: var(--color-bg-muted);
}
.ak-block-list {
  max-height: 46vh;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 4px 14px;
}
.ak-block-item { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.ak-block-item:last-child { border-bottom: none; }
.ak-block-meta { font-size: var(--text-sm); margin-bottom: 2px; }
.ak-block-title { font-weight: var(--font-weight-medium); margin: 2px 0; }
.ak-block-content {
  font-size: var(--text-sm);
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 900px) {
  .ima-mount-layout { grid-template-columns: 1fr; }
  .ima-mount-rail { border-right: 0; border-bottom: var(--border-default); }
  .ima-kb-list { display: none; }
  .ima-kb-select {
    display: block;
    width: calc(100% - 24px);
    min-height: 44px;
    margin: 12px;
  }
  .ima-frequency-section { align-items: stretch; flex-direction: column; }
  .ima-selected-interval { align-items: stretch; flex-direction: column; }
  .ima-selected-interval .ima-interval-seg { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
  .ima-selected-interval .ima-interval-seg button { min-height: 40px; }
  .ima-collector-savebar { position: sticky; bottom: 0; z-index: 2; background: var(--color-surface); }
  .ima-collector-savebar .toolbar .btn-ghost { display: none; }
  .ima-selected-head .btn-ghost span,
  .ima-groups-toolbar .btn-ghost span { display: none; }
  .ima-selected-head .btn-ghost,
  .ima-groups-toolbar .btn-ghost { width: 44px; padding: 0; }
}

.news-admin-page { display: grid; gap: 12px; }
.news-admin-settings { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.news-admin-settings-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.news-admin-interval { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-muted); font-size: var(--text-sm); }
.news-admin-interval .form-control { width: 92px; min-height: 42px; }
.news-admin-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; align-items: start; min-width: 0; }
.news-admin-source-rail,
.news-admin-detail-panel { min-width: 0; border: var(--border-default); border-radius: var(--radius-panel); background: var(--color-surface); }
.news-admin-source-rail { padding: 12px; }
.news-admin-source-toolbar { display: grid; gap: 8px; }
.news-admin-source-toolbar .form-control { min-height: 42px; min-width: 0; }
.news-admin-archived-toggle { display: flex; align-items: center; gap: 7px; min-height: 42px; color: var(--color-text-muted); font-size: var(--text-sm); }
.news-admin-add-source { width: 100%; margin: 10px 0; min-height: 42px; }
.news-admin-source-list { display: grid; gap: 4px; }
.news-admin-source-row { display: grid; gap: 5px; width: 100%; min-width: 0; padding: 10px; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--color-text); text-align: left; cursor: pointer; }
.news-admin-source-row:hover { background: var(--color-surface-muted); }
.news-admin-source-row.is-selected { border-color: var(--color-accent); background: var(--color-accent-soft); }
.news-admin-source-row.is-archived { opacity: .7; }
.news-admin-source-name { overflow-wrap: anywhere; font-weight: var(--font-weight-medium); }
.news-admin-source-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--color-text-muted); font-size: var(--text-xs); }
.news-admin-status { color: var(--color-text-muted); font-size: var(--text-xs); }
.news-admin-status-ok { color: var(--color-success); }
.news-admin-status-delayed { color: var(--color-warning-strong); }
.news-admin-status-unavailable { color: var(--color-danger); }
.news-admin-detail-panel { padding: 16px; }
.news-admin-detail-head,
.news-admin-feed-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.news-admin-detail-head .section-title { overflow-wrap: anywhere; }
.news-admin-actions { justify-content: flex-end; }
.news-admin-metrics { display: flex; flex-wrap: wrap; gap: 18px; margin: 16px 0; padding: 12px 0; border-top: var(--border-default); border-bottom: var(--border-default); color: var(--color-text-muted); font-size: var(--text-sm); }
.news-admin-metrics strong { color: var(--color-text-strong); }
.news-admin-feed-head { align-items: center; margin-bottom: 10px; }
.news-admin-feeds { display: grid; gap: 8px; }
.news-admin-feed-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: var(--border-default); border-radius: var(--radius-control); }
.news-admin-feed-row.is-archived { opacity: .72; }
.news-admin-feed-main { min-width: 0; }
.news-admin-feed-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-admin-feed-url { margin-top: 5px; color: var(--color-text-muted); font-family: var(--font-mono); font-size: var(--text-xs); overflow-wrap: anywhere; }
.news-admin-feed-meta,
.news-admin-feed-error { margin: 5px 0 0; color: var(--color-text-muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.news-admin-feed-error { color: var(--color-danger); }
.news-admin-feed-actions { display: flex; align-items: flex-start; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.news-admin-feed-actions button { min-height: 42px; }
.news-admin-preview { max-height: 180px; overflow: auto; padding: 8px; border: var(--border-default); background: var(--color-surface-muted); color: var(--color-text-muted); font-size: var(--text-sm); }
.news-admin-modal .modal-card { width: min(560px, calc(100vw - 28px)); }
.news-admin-modal .form-label { display: grid; gap: 6px; margin-top: 12px; }
.news-admin-page .btn-normal .nav-svg { width: 16px; height: 16px; display: inline-block; flex: 0 0 auto; }
.news-admin-modal .form-control { width: 100%; min-height: 42px; }

.news-page { max-width: 1120px; margin: 0 auto; min-width: 0; }
.news-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.news-list-toolbar { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
.news-list-toolbar .form-control,
.news-list-toolbar .search-bar { min-height: 42px; width: 100%; }
.news-list { display: grid; gap: 8px; min-width: 0; }
.news-list-item { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 14px; border: var(--border-default); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text); cursor: pointer; }
.news-list-item:hover { border-color: var(--color-accent); }
.news-list-item:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.news-list-copy { min-width: 0; flex: 1 1 auto; }
.news-list-thumb { width: 96px; height: 64px; flex: 0 0 96px; object-fit: cover; border-radius: var(--radius-control); background: var(--color-surface-muted); }
.news-list-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--color-text-muted); font-size: var(--text-xs); }
.news-list-item h3 { margin: 5px 0 3px; color: var(--color-text-strong); font-size: var(--text-body); line-height: 1.45; overflow-wrap: anywhere; }
.news-list-item p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-new-label { padding: 1px 5px; border-radius: var(--radius-sm); background: var(--color-accent-soft); color: var(--color-accent); font-weight: var(--font-weight-medium); }
.news-load-sentinel { min-height: 24px; }
/* 财经资讯双栏目：实时资讯（默认）/ 财经新闻 */
.news-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: var(--border-default); overflow-x: auto; }
.news-tab { flex: none; padding: 10px 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--color-text-muted); font: inherit; font-size: var(--text-body); cursor: pointer; white-space: nowrap; }
.news-tab:hover { color: var(--color-text-strong); }
.news-tab.active { color: var(--color-accent); border-bottom-color: var(--color-accent); font-weight: var(--font-weight-medium); }
.news-rt-list { display: block; }
.news-rt-list .post-item { padding: 14px 2px; }
/* 实时资讯：第一行去头像，仅大V名+时间；大V名不加粗放大（常规字重） */
.news-rt-list .post-item .p-name { font-weight: 400; }
/* 调研纪要：与实时资讯同口径同布局 */
.news-research-list { display: block; }
.news-research-list .post-item { padding: 14px 2px; }
.news-research-list .post-item .p-name { font-weight: 400; }
/* 管理后台「实时资讯大V」勾选面板（下拉多选复用 ai-kol/mxva-kol 样式） */
.news-kol-dropdown { max-width: 760px; }
/* 菜单容器不挂 .mxva-kol-menu（智囊团管理面板的钩子 class，误挂会撞上它的点外收起
   监听导致下拉打不开），这里补齐原先由该 class 提供的单列布局 */
.news-kol-menu { grid-template-columns: 1fr; }
.news-kol-menu.open { display: block; }
.news-kol-panel .mxva-note { margin-top: 8px; }
.news-article-page { max-width: 780px; margin: 0 auto; min-width: 0; }
.news-article-head { position: relative; padding-bottom: 16px; border-bottom: var(--border-default); }
.news-article-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--color-text-muted); font-size: var(--text-sm); }
.news-article-head h1 { margin: 10px 0 8px; color: var(--color-text-strong); font-size: 28px; line-height: 1.3; overflow-wrap: anywhere; }
.news-original-link { display: inline-flex; align-items: center; gap: 5px; min-height: 42px; margin-top: 10px; white-space: nowrap; }
.news-article-body { min-width: 0; padding-top: 20px; color: var(--color-text); font-size: 17px; line-height: 1.85; overflow-wrap: anywhere; }
.news-article-body p { margin: 0 0 1em; }
.news-article-body img { display: block; max-width: 100%; height: auto; margin: 14px 0; }
.news-article-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.news-article-body th,
.news-article-body td { padding: 6px 10px; border: var(--border-default); white-space: nowrap; }
.news-article-body a { color: var(--color-accent); }
/* 财经新闻文章弹窗（替代整页跳转） */
.news-article-modal .modal-card { width: min(780px, calc(100vw - 28px)); max-height: 90vh; max-height: 90dvh; padding: 0; overflow: hidden; }
.news-article-modal-close { position: absolute; top: 10px; right: 10px; z-index: 1; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: none; border-radius: var(--radius-control); background: var(--color-surface-muted); color: var(--color-text-muted); cursor: pointer; transition: all 0.15s ease; }
.news-article-modal-close:hover { background: var(--color-border); color: var(--color-text-strong); }
/* 卡片 overflow:hidden（5999 行）+ 内容区独立滚动：整个弹窗只有这一个滚动容器。
   内容区 max-height 与卡片一致（90dvh），卡片 padding 为 0，正好单滚动容器填满；
   overscroll-behavior:contain 让内容滚到头后不把滚动链给页面（双保险，主锁是 JS body 锁） */
.news-article-modal-content { max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; padding: 28px 28px 24px; }
.news-article-modal-content .news-article-page { max-width: none; }
.news-article-modal-content .admin-skeleton { min-height: 200px; }
@media (max-width: 640px) {
  /* 手机端随通用弹窗改底部抽屉：必须显式回到 width:100%（上方 min(780px,…) 同为单元素选择器但
     更靠后会盖过通用规则，两侧会漏 14px 遮罩缝）；dvh 兜底 iOS Safari 地址栏收展导致的 vh 偏大 */
  .news-article-modal .modal-card { width: 100%; max-height: 85vh; max-height: 85dvh; }
  .news-article-modal-content { max-height: 85vh; max-height: 85dvh; padding: 28px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .news-article-modal-close { top: 14px; right: 12px; width: 40px; height: 40px; }
  .news-article-modal-content .news-article-head h1 { font-size: 22px; }
  .news-article-modal-content .news-article-body { font-size: 16px; padding-top: 16px; }
}
.news-source-modal .modal-card { width: min(520px, calc(100vw - 28px)); }
.news-source-options { display: grid; max-height: 360px; gap: 4px; margin: 12px 0; overflow-y: auto; }
.news-source-option { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px; border-radius: var(--radius-control); }
.news-source-option:hover { background: var(--color-surface-muted); }
.news-source-option em { margin-left: auto; color: var(--color-text-muted); font-size: var(--text-xs); font-style: normal; }

@media (max-width: 768px) {
  .news-admin-layout { grid-template-columns: 1fr; }
  .news-admin-settings,
  .news-admin-detail-head,
  .news-admin-feed-head { align-items: stretch; flex-direction: column; }
  .news-admin-settings-controls { justify-content: flex-start; }
  .news-admin-feed-row { flex-direction: column; }
  .news-admin-feed-actions { justify-content: flex-start; }
  .news-page-head { align-items: stretch; flex-direction: column; }
  .news-list-toolbar { grid-template-columns: 1fr; }
  .news-list-item { padding: 12px; }
  .news-list-thumb { width: 84px; height: 56px; flex-basis: 84px; }
  .news-article-body { font-size: 16px; }
  .news-article-head h1 { font-size: 24px; }
}

/* 研报结构化抽取徽章（评级/目标价/标的） */
.ima-ex-badge {
  display: inline-block;
  padding: 1px 7px;
  border: var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  white-space: nowrap;
}
.ima-ex-badge.ima-ex-rating {
  border-color: var(--color-accent);
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
}
.ima-ex-badge.ima-ex-ticker { color: var(--color-text); }

/* 标的综述页：/ticker/<code> 一页聚合该标的多篇研报（时间线 + 编译综述） */
.ima-tk-page { max-width: 860px; margin: 0 auto; padding: 16px; }
.ima-tk-head { margin-bottom: 12px; }
.ima-tk-title { margin: 0 0 4px; color: var(--color-text-strong); font-size: var(--text-lg); }
.ima-tk-digest {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: var(--border-default);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
}
.ima-tk-digest-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; color: var(--color-text-strong); }
.ima-tk-consensus { margin: 0 0 8px; color: var(--color-text); font-size: var(--text-sm); line-height: 1.55; }
.ima-tk-steps { margin: 0 0 8px; padding-left: 18px; color: var(--color-text); font-size: var(--text-sm); line-height: 1.5; }
.ima-tk-step { margin-bottom: 2px; }
.ima-tk-step time { margin-right: 8px; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ima-tk-divergence { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.5; }
.ima-tk-row .ima-report-meta { margin-top: 2px; }
a.ima-ex-badge.ima-ex-ticker { text-decoration: none; }
a.ima-ex-badge.ima-ex-ticker:hover { border-color: var(--color-accent); color: var(--color-accent); }
@media (max-width: 640px) {
  .ima-tk-row { grid-template-columns: 52px minmax(0, 1fr); }
  .ima-tk-row .ima-report-source { display: none; }
}
