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

* { 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: var(--outline-focus);
  outline-offset: 2px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}
.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: 40px 24px;
  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;
  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: var(--text-brand-mark); 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-accent-text);
}
.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: var(--color-success);
  display: inline-block;
  box-shadow: 0 0 0 2px var(--color-success-soft);
}

.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; }
}
/* 密码可见性切换 */
.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,
.form-control:focus-visible {
  border-color: var(--color-accent-text);
  box-shadow: var(--shadow-focus-ring);
}
.form-control:disabled {
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  opacity: 0.7;
}
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:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}
.btn-normal:active { background: var(--color-accent-strong); transform: translateY(1px); }
.btn-normal:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.btn-normal[aria-busy="true"],
.btn-ghost[aria-busy="true"],
.btn-sm[aria-busy="true"] {
  cursor: progress;
  opacity: 0.72;
}
.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:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}
.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: background-color var(--ease-standard), border-color var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard), opacity var(--ease-standard), transform 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: background-color var(--ease-standard), border-color var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard), opacity var(--ease-standard), transform 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: var(--border-default);
  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 { --topbar-height: calc(56px + env(safe-area-inset-top, 0px)); 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:focus-visible {
  outline: var(--outline-focus);
  outline-offset: -2px;
}
.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; }
/* 底部：主题切换器在上，GitHub+版本号并排在下 */
.sidebar-foot-links { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.sidebar-gh-link {
  width: 26px; height: 26px; border-radius: 50%;
  border: var(--border-strong); background: var(--color-surface);
  color: var(--color-text-faint);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color var(--ease-standard), border-color var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard), opacity var(--ease-standard), transform var(--ease-standard);
}
.sidebar-gh-link:hover { border-color: var(--color-accent-text); color: var(--color-accent-text); }
.sidebar-gh-link.has-update { position: relative; border-color: var(--color-accent-text); color: var(--color-accent-text); }
.sidebar-gh-link.has-update::after {
  content: ""; position: absolute; top: -2px; right: -2px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--color-accent); border: 2px solid var(--color-bg);
}
.sidebar-gh-icon { width: 14px; height: 14px; }
.sidebar-user-meta { font-size: var(--text-xs); color: var(--color-text-faint); letter-spacing: 0.3px; }
.sidebar-update { color: var(--color-accent-text); font-weight: var(--font-weight-semibold); text-decoration: none; margin-left: 2px; }
.sidebar-update:hover { text-decoration: underline; }

/* 主题切换（侧边栏底部三态）：纯图标的 .seg-track，居中放在 GitHub 圆钮上方 */
.theme-switcher.seg-track { display: flex; margin-inline: auto; }
.seg-track > .theme-mode {
  width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  color: var(--color-text-muted);
}
.theme-mode .theme-ic { width: 17px; height: 17px; }
.seg-track > .theme-mode.selected { 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: background-color var(--ease-standard), border-color var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard), opacity var(--ease-standard), transform 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: var(--topbar-height);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  /* 沉浸式状态栏（安卓 15 强制 edge-to-edge）下内容不顶进状态栏 */
  padding-top: env(safe-area-inset-top, 0px);
  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 - var(--topbar-height));
  max-height: calc(100vh - var(--topbar-height));
  padding-top: 16px;
  padding-bottom: 16px;
  overflow: hidden;
}

/* Android 推荐：普通文档流，主内容之后；关闭后只保留设置入口。 */
.android-promotion {
  margin: 0 24px 96px;
  padding: var(--space-4);
  border: var(--border-default);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}
.android-promotion h2 { margin: 0; font-size: var(--text-body); font-weight: var(--font-weight-semibold); }
.android-promotion p { margin: var(--space-2) 0; color: var(--color-text-subtle); font-size: var(--text-sm); line-height: 1.7; }
.android-promo-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.android-promo-actions a, .android-promo-actions button {
  display: inline-flex; align-items: center; min-height: 44px; font-size: var(--text-sm);
}
.android-promo-actions button { border: 0; padding: 0 var(--space-2); background: transparent; color: var(--color-text-subtle); }
.android-promo-actions a:hover { text-decoration: underline; }
.android-promo-actions button:hover { color: var(--color-text); text-decoration: underline; }
.android-promo-actions a:focus-visible { outline: var(--outline-focus); outline-offset: 2px; }
/* 设置页底部的 Android 客户端卡片 */
.android-card-body { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; }
.android-card-icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: var(--shadow-xs); align-self: start; }
.android-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.android-card-title .section-title { margin: 0; }
.android-card-version {
  padding: 1px 8px; border-radius: var(--radius-pill); background: var(--color-surface-accent-soft);
  color: var(--color-accent-text); font-size: var(--text-xs); font-weight: var(--font-weight-semibold);
}
.android-card-main .section-meta { margin: 4px 0 0; }
.android-card-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.android-card-download {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 18px; border-radius: var(--radius-control);
  background: var(--color-accent); color: var(--color-white); font-weight: var(--font-weight-semibold); text-decoration: none;
}
.android-card-download:hover { background: var(--color-accent-strong); }
.android-card-download span { font-weight: var(--font-weight-normal); font-size: var(--text-xs); opacity: .85; }
.android-card-download:focus-visible, .android-card-guide:focus-visible { outline: var(--outline-focus); outline-offset: 2px; }
.android-card-guide { display: inline-flex; align-items: center; text-decoration: none; }
.android-card-meta { margin: var(--space-2) 0 0; font-size: var(--text-xs); color: var(--color-text-muted); }
.android-card-qr { margin: 0; text-align: center; }
.android-card-qr img { display: block; width: 104px; height: 104px; padding: 4px; border-radius: var(--radius-sm); background: #fff; border: var(--border-soft); }
.android-card-qr figcaption { margin-top: 4px; font-size: var(--text-2xs); color: var(--color-text-muted); }
@media (max-width: 768px) {
  .android-card-body { grid-template-columns: auto minmax(0, 1fr); }
  .android-card-qr { display: none; }
  .android-card-icon { width: 48px; height: 48px; border-radius: 12px; }
}
@media (max-width: 768px) { .android-promotion { margin-inline: var(--space-3); } }

/* ---------- 面板 ---------- */
.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; }
/* 超宽屏不再无限拉伸：进度条和表格超过这个宽度只会更难读 */
.admin-group-tabs,
#admin-body { max-width: 1600px; margin-inline: auto; }
.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 { margin-top: 12px; }
.ak-add > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: fit-content; cursor: pointer; }
.ak-add > summary::-webkit-details-marker { display: none; }
.ak-add[open] > summary { margin-bottom: 8px; }
.ak-add-body {
  padding: 12px;
  border: var(--border-default);
  border-radius: var(--radius-control);
  background: var(--color-bg-muted);
}
.ak-add-body .section-meta { margin: 0 0 8px; }
.ak-kol-table td { vertical-align: middle; }
.ak-kol-table .ak-name { font-weight: var(--font-weight-medium); color: var(--color-text-strong); }
.ak-kol-table .ak-name > span { margin-right: 6px; }
.ak-ext { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-num { text-align: right; font-variant-numeric: tabular-nums; }
.ak-badge {
  display: inline-block;
  margin-right: 4px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  vertical-align: 1px;
}
.ak-badge.is-warn { background: var(--color-warning-soft); color: var(--color-warning-strong); }
.ak-tier.form-control { width: auto; min-width: 72px; margin: 0; padding-block: 4px; min-height: 32px; }
.ak-row-off td:not(.ak-check):not(.ak-actions) { opacity: 0.6; }
.ek-actions .ek-delete { margin-left: auto; }
.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;
}
/* 代理页按模式用 hidden 切换字段；下面的 display:flex 会盖过 hidden */
.cfg-field[hidden] { display: none; }
.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-icon[data-platform="truth"] .pt-icon { color: var(--color-brand-truth); }
.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 { flex-shrink: 0; }
@media (max-width: 640px) {
  .plaza-src { flex-direction: column; align-items: stretch; }
  .plaza-src-modes.seg-track { width: 100%; }
  .plaza-src-modes > .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; }
.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-text); }
/* 平台/筛选角标沿用统一圆底衬：用强调色淡染而不是 bg-muted，浅/深色下都看得见圆。 */
:root {
  --pt-badge-bg: color-mix(in srgb, var(--color-accent-text) 9%, transparent);
  --pt-badge-bg-hover: color-mix(in srgb, var(--color-accent-text) 16%, transparent);
  --live-dot: #16a34a;
}
:root.theme-dark { --live-dot: #4ade80; }
.tl-pill .pt-icon,
.platform-tab .pt-icon {
  width: 22px;
  height: 22px;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--pt-badge-bg);
}
.tl-pill:hover .pt-icon,
.platform-tab:hover .pt-icon { background: var(--pt-badge-bg-hover); }
/* 选中反白时去掉底衬，避免蓝底上再叠灰圆 */
.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-text); }
/* 内联 Truth 图形继承主题强调色，选中后随按钮反白。 */
.platform-tab[data-platform="truth"]:not(.selected) .pt-icon,
.tl-pill[data-platform="truth"]:not(.selected) .pt-icon { color: var(--color-brand-truth); }
/* 快讯呼吸点：未选中时提示「有实时源可看」，选中后隐去（注意力只给未到达的地方）。
   挂在 W 角标圆的右上（45°）像头像在线点，而不是胶囊圆角上——那里正好压在外框线。
   角标圆：左内边距 12px、直径 22px、垂直居中 → 圆心 (23px, 21px)，45° 点约 (31, 13)。 */
.tl-pill[data-platform="live"] { position: relative; }
.tl-pill[data-platform="live"]::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 27px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live-dot);
  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); }

/* ===== 分段控件 .seg-track =====
   同一视图里「多选一」的筛选 / 模式切换统一用它：一条灰底槽 + 选中项白滑块。
   用法分工：换页面 / 板块用实心胶囊 .settings-tab；数据面板里的子视图用下划线（.national-tab / .gq-tab）；
   其余「选一个」都用这里，别再新造一套。
   选中态沿用各视图原有的 JS：.selected / .active / .is-on / .is-selected / [aria-pressed="true"] 任一即可。
   字重不随选中变化，免得切换时宽度跳动。 */
:root {
  --seg-track: color-mix(in srgb, var(--color-text) 6%, transparent);
  --seg-thumb: var(--color-surface);
  --seg-thumb-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 1px 4px rgba(15, 23, 42, 0.06);
}
:root.theme-dark {
  --seg-track: color-mix(in srgb, var(--color-text) 7%, transparent);
  --seg-thumb: color-mix(in srgb, var(--color-text) 14%, var(--color-surface));
  --seg-thumb-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.seg-track {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 3px;
  /* 块级容器里也只包住内容，不铺满整行；放不下时底槽内横向滚动 */
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--seg-track);
}
.seg-track::-webkit-scrollbar { display: none; }
.seg-track > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-subtle);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard);
}
.seg-track > button:hover { color: var(--color-text); }
.seg-track > button:focus-visible { outline: var(--outline-focus); outline-offset: -2px; }
.seg-track > button:disabled { cursor: default; }
.seg-track > button:is(.selected, .active, .is-on, .is-selected, [aria-pressed="true"]) {
  background: var(--seg-thumb);
  color: var(--color-text-strong);
  box-shadow: var(--seg-thumb-shadow);
}
@media (max-width: 768px) {
  .seg-track > button { min-height: 38px; }
}

/* 平台分段：动态筛选栏、订阅广场平台页签、后台大V页签、飞书来源条。
   平台图标本来就是同一个强调色、不承载品牌信息，所以未选中一律灰，选中项是整排唯一的蓝。
   带上容器类提高优先级：后面的 .tl-pills { flex: 1; gap: 8px } 不能盖过底槽。
   ≤768px 动态 / 广场的 .icon-badge-bar 在移动端段落里改成等宽纯图标分段。 */
:is(.tl-pills, .platform-tabs).seg-track {
  display: flex;
  flex: 0 1 auto;
  gap: 2px;
}
.seg-track :is(.tl-pill, .platform-tab) {
  height: 38px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--color-text-subtle);
  font-weight: var(--font-weight-medium);
}
.seg-track :is(.tl-pill, .platform-tab):hover { color: var(--color-text); }
.seg-track :is(.tl-pill, .platform-tab):focus-visible { outline-offset: -2px; }
.seg-track :is(.tl-pill, .platform-tab).selected {
  background: var(--seg-thumb);
  color: var(--color-text-strong);
  font-weight: var(--font-weight-medium);
  box-shadow: var(--seg-thumb-shadow);
}
.seg-track :is(.tl-pill, .platform-tab) .pt-icon,
.seg-track :is(.tl-pill, .platform-tab):hover .pt-icon {
  width: 18px;
  height: 18px;
  padding: 0;
  background: none;
}
.seg-track :is(.tl-pill, .platform-tab):not(.selected) .pt-icon { color: var(--color-text-muted); }
.seg-track :is(.tl-pill, .platform-tab):not(.selected):hover .pt-icon,
.seg-track :is(.tl-pill, .platform-tab).selected .pt-icon { color: var(--color-accent-text); }
/* 快讯点挂在 18px 图标右上：左内边距 14 + 18 − 4，图标顶 10 − 4；底槽半透明，不加描边圈 */
.seg-track .tl-pill[data-platform="live"]::after { top: 6px; left: 28px; box-shadow: none; }

/* 搜索 */
.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; }
.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); }
.kol-card-info .desc { color: var(--color-text-muted); font-size: var(--text-xs); margin-top: 5px; }
.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: background-color var(--ease-standard), border-color var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard), opacity var(--ease-standard), transform 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: var(--radius-pill);
  background: var(--color-surface); cursor: pointer; user-select: none;
  font-size: var(--text-sm); color: var(--color-text-strong);
  transition: background-color var(--ease-standard), border-color var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard), opacity var(--ease-standard), transform 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: background-color var(--ease-standard), border-color var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard), opacity var(--ease-standard), transform 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); }
.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; }
.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 video {
  width: min(320px, 100%); aspect-ratio: 16 / 9; object-fit: contain;
  border-radius: var(--radius-control);
  border: var(--border-soft);
  background: #000; display: block;
}
.post-images { position: relative; }
.post-images-more {
  position: absolute; right: 8px; bottom: 8px;
  background: var(--color-overlay-dark); 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;
}
button.post-images-more {
  border: 0; cursor: pointer; pointer-events: auto;
  min-height: 28px; font-family: inherit;
}
button.post-images-more:focus-visible { outline: 2px solid var(--color-white); outline-offset: 2px; }

/* 组合调仓：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); }
/* 调仓明细六列：操作 / 标的 / 仓位 / 成交价 / 现价 / 较成交。
   列宽用 rem：表头字号比数据行小，用 em 会让两者列宽不同、上下错开。 */
.combo-action {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) 7.2rem 3.8rem 4.2rem 3.8rem;
  align-items: baseline; column-gap: 12px;
  padding: 6px 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-type { color: var(--color-text-muted); white-space: nowrap; }
.combo-action-type.buy { color: var(--color-data-positive); }
.combo-action-type.sell { color: var(--color-data-negative); }
.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-col-pos {
  display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 4px; justify-self: stretch;
  color: var(--color-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.combo-col-pos > :first-child { text-align: right; }
.combo-col-pos > :last-child { text-align: left; }
.combo-action-cols .combo-col-pos > span { grid-column: 2; text-align: center; }
.combo-col-pos b { color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.combo-col-trade, .combo-col-now, .combo-col-vs { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.combo-col-trade { color: var(--color-text); }
.combo-col-now { color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.combo-col-vs { color: var(--color-text-muted); }
/* 行情源暂时取不到时沿用的旧价：淡一点，悬停看原因 */
.combo-col-now.stale { opacity: 0.6; }
.combo-action-cols .combo-col-trade, .combo-action-cols .combo-col-now, .combo-action-cols .combo-col-vs, .combo-action-cols .combo-col-pos { font-weight: inherit; color: inherit; }
.combo-col-now.up, .combo-col-vs.up { color: var(--color-data-positive); }
.combo-col-now.down, .combo-col-vs.down { color: var(--color-data-negative); }
/* 现价下面的今日涨跌：跟随现价颜色，小一号、常规字重 */
.combo-col-day { display: block; font-size: var(--text-2xs, 11px); font-weight: 400; line-height: 1.3; }
/* 现价与较成交包在一层里便于整块回填；桌面上展开成两列 */
.combo-quote { display: contents; }
.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;
  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: pan-y; /* 水平滑动交给 JS 切换图片，垂直保留原生 */
  animation: lightbox-img-in 0.28s ease-out;
}
.lightbox-close {
  position: absolute; top: 18px; right: 18px;
  width: 42px; height: 42px; border-radius: 50%;
  border: none;
  background: var(--color-overlay-light); 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: var(--color-overlay-light-hover); }
/* 多图切换：左右箭头（半透明圆钮，hover 增强）+ 计数 */
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12); 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: var(--color-overlay-light-hover); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-count {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-sm);
  background: var(--color-overlay-dark);
  padding: 4px 12px; border-radius: var(--radius-pill);
}
.lightbox-img { transition: opacity 0.12s ease-out; }
body.lightbox-open { overflow: hidden; }
@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; }
  /* 骨架屏 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; }
.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; }
.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 {
  position: relative;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.post-item .p-meta button.cat-export {
  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 {
  color: var(--color-accent-text);
  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); }

.tl-filterbar {
  position: sticky;
  top: var(--topbar-height);
  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: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
}
.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 .nav-badge { margin-left: auto; }
.tl-ima-entry-btn > span:not(.tl-ima-entry-icon):not(.nav-badge) { min-width: 0; }
.tl-ima-entry-btn strong, .tl-ima-entry-btn small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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-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 {
    height: 64px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: 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: var(--topbar-height);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--topbar-height));
  }
  .tl-rail-head { flex-shrink: 0; }
  .tl-rail-body {
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-line-strong) transparent;
  }
  .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); }
.market-heading .tl-rail-title { margin: 0; font-size: var(--text-body); font-weight: var(--font-weight-semibold); }
.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-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-etf { border-top: 1px solid var(--color-line); margin-top: var(--space-3); padding-top: var(--space-3); }
.market-etf-row { border-top: 1px solid var(--color-line); padding: var(--space-2) 0; }
.market-etf-name, .market-etf-times, .market-etf-alert, .market-etf-empty { display: flex; gap: var(--space-2); align-items: baseline; font-size: var(--text-xs); }
.market-etf-name { justify-content: space-between; }
.market-etf-name span, .market-etf-times, .market-etf-empty { color: var(--color-text-muted); }
.market-etf-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin: var(--space-2) 0; }
.market-etf-values div { min-width: 0; }
.market-etf-values dt { color: var(--color-text-muted); font-size: 11px; }
.market-etf-values dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.market-etf-alert { border-top: 1px solid var(--color-line); padding-top: var(--space-2); margin-top: var(--space-1); flex-wrap: wrap; }
.market-etf-alert strong { color: var(--color-accent-text); }
.market-etf-alert time { 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; }
.market-etf { margin-top: var(--space-4); padding-top: var(--space-3); border-top: var(--border-soft); }
.market-etf-list { margin-top: var(--space-2); }
.market-etf-row { padding: 8px 0; border-bottom: var(--border-soft); }
.market-etf-row:last-child { border-bottom: 0; }
.market-etf-name { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.market-etf-name strong { color: var(--color-text-strong); font-size: var(--text-sm); }
.market-etf-name span, .market-etf-time, .market-etf-empty, .market-etf-note { color: var(--color-text-muted); font-size: var(--text-xs); }
.market-etf-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 6px 0 2px; }
.market-etf-values div { min-width: 0; }
.market-etf-values dt { color: var(--color-text-muted); font-size: var(--text-xs); }
.market-etf-values dd { margin: 1px 0 0; color: var(--color-text-strong); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.market-etf-values dd.positive { color: var(--color-data-positive); }
.market-etf-values dd.negative { color: var(--color-data-negative); }
.market-etf-times { display: grid; gap: 2px; margin-top: 2px; }
.market-etf-time { color: var(--color-text-muted); font-size: var(--text-xs); }
.market-etf-alert { display: grid; gap: 2px; margin-top: var(--space-3); padding-top: var(--space-3); border-top: var(--border-soft); font-size: var(--text-xs); }
.market-etf-alert strong { color: var(--color-text-strong); }
.market-etf-alert span { color: var(--color-text); font-variant-numeric: tabular-nums; }
.market-etf-alert time { color: var(--color-text-muted); }
.market-etf-empty { margin: var(--space-3) 0 0; }
.market-etf-note { margin: 6px 0 0; }
.etf-pct {
  display: grid;
  gap: 3px;
  width: 100%;
  margin: 6px 0 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-xs);
  line-height: 1.35;
  text-align: left;
  cursor: default;
  container-type: inline-size;
  container-name: etf-pct;
}
div.etf-pct { cursor: default; }
.etf-pct-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--color-text);
}
.etf-window-chip {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 7px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 11px;
  line-height: 20px;
  cursor: pointer;
}
.etf-window-chip:hover { color: var(--color-text); }
.etf-estimate { margin: 2px 0 0; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.45; }
.etf-iopv-note { margin: 0; }
.etf-pct .watch-temperature-scale {
  margin: 10px 0 0;
  padding-inline: 12px;
  cursor: default;
  user-select: none;
  pointer-events: none;
}
.etf-pct .watch-temperature-scale-bar,
.etf-pct .watch-temperature-scale-ticks { grid-template-columns: 10fr 20fr 40fr 20fr 10fr; }
.etf-pct .watch-temperature-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.etf-pct .watch-temperature-scale-ticks span { text-align: center; }
.etf-pct .watch-temperature-scale-ticks span:first-child { text-align: left; }
.etf-pct .watch-temperature-scale-ticks span:last-child { text-align: right; }
.etf-premium-pause { margin: 4px 0 0; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.5; }
#tl-etf-premium .market-etf,
#watch-panel-etf .market-etf { margin-top: 0; padding-top: 0; border-top: 0; }
a.market-etf-simple {
  display: block;
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
}
a.market-etf-simple:hover,
a.market-etf-simple:focus { color: var(--color-text); }
a.market-etf-simple:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.etf-simple-row { padding: 10px 0 8px; border-bottom: var(--border-soft); }
.etf-simple-row:last-child { padding-bottom: 0; border-bottom: 0; }
.etf-simple-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.etf-simple-name { min-width: 0; }
.etf-simple-name strong { display: block; color: var(--color-text-strong); font-size: var(--text-sm); }
.etf-simple-name span, .etf-simple-band, .etf-simple-premium small { color: var(--color-text-muted); font-size: var(--text-xs); }
.etf-simple-premium { flex: 0 0 auto; text-align: right; }
.etf-simple-premium small { display: block; line-height: 1.35; }
.etf-simple-premium b {
  display: block;
  color: var(--color-text-strong);
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.etf-simple-band { margin: 4px 0 6px; }
.etf-mini-bar {
  position: relative;
  display: grid;
  grid-template-columns: 10fr 20fr 40fr 20fr 10fr;
  gap: 2px;
  height: 6px;
}
.etf-mini-bar .watch-temperature-segment { height: 6px; }
.etf-mini-marker {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-strong);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.etf-pct-range, .etf-pct-empty, .etf-alert-scale, .etf-alert-ref {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}
.etf-pct-empty {
  margin: 6px 0 2px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: default;
}
p.etf-pct-empty { cursor: default; }
.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); }
/* 推荐关注：标题行右侧「换一批」；按钮保留 44px 点击区，用负边距不撑高标题行 */
.tl-rail-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: 12px; }
.tl-rail-card-head .tl-rail-title { margin: 0; }
.tl-rail-shuffle { gap: 4px; margin: -12px 0; font-size: var(--text-sm); }
.tl-rail-shuffle .refresh-icon { width: 14px; height: 14px; }
.tl-rail-rec-why { color: var(--color-text); }
/* 推荐理由带大V名字，一行放不下：最多两行，再长才省略 */
#tl-rail-recs .tl-rail-rec-meta {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  line-height: 1.4;
}
.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%;
  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); }
:is(.post-item, .kol-card) .p-name-line .p-platform[data-platform="truth"] .pt-icon { color: var(--color-brand-truth); }

/* 表格 */
.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 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  padding: 0 12px;
  min-height: 32px;
  border: var(--border-strong);
  border-radius: var(--radius-control);
  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:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}
.btn-sm:disabled { opacity: 0.55; cursor: not-allowed; }
td .btn-sm { margin-right: 6px; }
.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-code code {
  font-family: ui-monospace, monospace;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
  color: var(--color-text-strong);
}
.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: 20%; }
.rc-table th:nth-child(2) { width: 16%; }
.rc-table th:nth-child(3) { width: 10%; }
.rc-table th:nth-child(4) { width: 12%; }
.rc-table th:nth-child(5) { width: 22%; }
.rc-table th:nth-child(6) { width: 20%; }
.rc-table td { vertical-align: middle; }
.rc-table .rc-actions { white-space: nowrap; }
.rc-table .rc-actions .btn-sm { margin-right: 0; }
.rc-table .rc-actions .btn-sm + .btn-sm { margin-left: 6px; }
.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: background-color var(--ease-standard), border-color var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard), opacity var(--ease-standard), transform 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;
}
/* X 抓取身份：多身份表 + Cookie / App 两组录入并列，窄屏自动堆叠 */
.x-id-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px 24px;
  margin-top: 16px;
}
.x-id-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.x-id-form .form-control { margin: 0; }
.x-id-form .section-meta { margin: 0; }
.x-id-form .toolbar { margin-top: 2px; }
.x-id-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
}
.x-id-route .section-meta { margin: 0; }
/* 窄屏先收掉尾号这一列，操作按钮别被挤出可视区（表格其余列仍可横向滚动） */
@media (max-width: 640px) {
  .x-id-table th:nth-child(2),
  .x-id-table td:nth-child(2) { display: none; }
  .x-id-table th,
  .x-id-table td { padding: 10px 8px; }
  .x-id-table td .btn-sm { margin-right: 4px; }
}
#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);
}
.fs-bind-step {
  margin: 4px 0 12px;
  padding: 16px;
  border: var(--border-strong);
  border-radius: var(--radius-card, 12px);
  background: var(--color-surface-accent);
}
.fs-bind-step-kicker {
  margin: 0 0 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-accent-text);
}
.fs-bind-step-title {
  margin: 0;
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
  line-height: 1.6;
  color: var(--color-text-strong);
}
.fs-bind-step .bind-code {
  font-size: 1.05rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--color-surface);
}
.fs-bind-countdown {
  margin: 10px 0 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text-strong);
}
.fs-bind-countdown span { font-family: var(--font-mono); }
.fs-bind-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
#fs-listener-error { margin-top: 12px; }
.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: var(--border-default); border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  width: min(480px, 100%); padding: 24px; max-height: 90vh; overflow: auto;
}

@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-line-strong);
    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: var(--shadow-lg);
  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; }

/* 管理员：新的大V添加申请提醒（常驻到点击或关闭） */
.kol-request-notice {
  position: fixed;
  top: 68px;
  right: 18px;
  z-index: 190;
  display: flex;
  align-items: stretch;
  max-width: min(420px, calc(100vw - 32px));
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--border-default);
  border-left: 3px solid var(--color-accent);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  animation: kol-request-notice-in 0.18s ease-out;
}
.kol-request-notice button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.kol-request-notice-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px 10px 14px;
  text-align: left;
  min-width: 0;
}
.kol-request-notice-text { overflow: hidden; text-overflow: ellipsis; }
.kol-request-notice-go {
  flex: none;
  color: var(--color-accent-text);
  font-weight: var(--font-weight-semibold);
}
.kol-request-notice-close {
  flex: none;
  padding: 0 12px;
  font-size: var(--text-body);
  color: var(--color-text-faint) !important;
}
.kol-request-notice button:focus-visible { outline: var(--outline-focus); outline-offset: -2px; }
@media (max-width: 900px) {
  .kol-request-notice { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); left: 16px; right: 16px; max-width: none; }
}
@keyframes kol-request-notice-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .kol-request-notice { animation: none; } }
@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-inline: 16px; }
  .page-main { padding: 16px; --page-pad-x: 16px; }
}

@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-badge {
  position: absolute;
  top: -7px;
  right: -11px;
  min-width: 18px;
  padding: 0 5px;
  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: 18px;
  text-align: center;
}
.bnav-item .bnav-icon svg { width: 24px; height: 24px; }
.bnav-item.active { color: var(--color-white); font-weight: var(--font-weight-semibold); }
.bnav-item.active::before { opacity: 1; background: var(--color-accent); }
.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; }
  /* 手机：两行卡片。第一行操作 + 标的；第二行三格带小标题（仓位 / 成交价 / 现价·较成交） */
  /* 仓位「10.2% → 10.0%」比另两格宽，三等分时会压到成交价上，给它多留一点 */
  .combo-action {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 4px; column-gap: 8px; padding: 8px 0;
  }
  .combo-action-cols { display: none; }
  .combo-action-type { grid-column: 1 / -1; grid-row: 1; }
  .combo-action-name { grid-column: 1 / -1; grid-row: 1; padding-left: calc(2em + 8px); }
  .combo-col-pos, .combo-col-trade, .combo-quote { grid-row: 2; }
  /* 屏幕再窄（或系统字体调大）也只在箭头后换行，不再溢出到旁边一格。
     子元素之间没有空白，inline 无处可断，所以用 flex-wrap */
  .combo-col-pos { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 4px; text-align: left; }
  .combo-col-pos::before { flex-basis: 100%; }
  .combo-col-pos b { margin-left: 0; }
  .combo-col-trade { text-align: left; font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
  .combo-quote { display: block; }
  .combo-col-now, .combo-col-vs { display: block; text-align: left; }
  .combo-col-vs { font-size: var(--text-2xs, 11px); }
  /* 现价下已有「今日 ±x%」，较成交这一行补上自己的标签，两个百分比才分得清 */
  .combo-col-vs:not(:empty)::before { content: "较成交 "; color: var(--color-text-muted); }
  .combo-col-pos::before, .combo-col-trade::before, .combo-quote::before {
    display: block; color: var(--color-text-muted); font-size: var(--text-2xs, 11px); font-weight: 400;
  }
  .combo-col-pos::before { content: "仓位"; }
  .combo-col-trade::before { content: "成交价"; }
  .combo-quote::before { content: "现价"; }
  .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-inline: 14px; } /* 左右 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 + env(safe-area-inset-bottom)); --page-pad-x: 14px; }
  .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; }
  /* 动态/订阅/广场：平台是一条等宽纯图标分段（同宽屏 .seg-track 的底槽 + 白滑块），
     筛选/星标是右侧独立圆钮。字只留 aria，禁止改回带字胶囊。 */
  .icon-badge-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .icon-badge-bar .tl-pills.seg-track {
    flex: 1 1 auto;
    width: auto;
  }
  .icon-badge-bar .tl-actions { display: flex; flex: 0 0 auto; gap: 8px; }
  /* 等分底槽；平台多到放不下时每段至少 36px，底槽内横向滚动 */
  .icon-badge-bar .tl-pill {
    flex: 1 0 36px;
    min-width: 36px;
    padding: 0;
  }
  .icon-badge-bar .tl-pill span { display: none; }
  .icon-badge-bar .tl-pill .pt-icon,
  .icon-badge-bar .tl-pill:hover .pt-icon { width: 20px; height: 20px; }
  /* 20px 图标居中：右上角约 (50% + 10px, 9px)，点心落在它外侧一点 */
  .icon-badge-bar .tl-pill[data-platform="live"]::after { top: 6px; left: calc(50% + 5px); }
  .icon-badge-bar > .fav-toggle,
  .icon-badge-bar > .home-filter-toggle,
  .icon-badge-bar .tl-actions button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 50%;
    background: var(--seg-track);
    color: var(--color-text-muted);
    font-size: 0;
    justify-content: center;
  }
  .icon-badge-bar .funnel-icon,
  .icon-badge-bar .star-icon {
    width: 20px;
    height: 20px;
    transition: transform 120ms ease;
  }
  .icon-badge-bar .tl-pill .pt-icon { transition: transform 120ms ease; }
  .icon-badge-bar .tl-pill:active .pt-icon,
  .icon-badge-bar > .fav-toggle:active .star-icon,
  .icon-badge-bar > .home-filter-toggle:active .funnel-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.fav-on,
  .icon-badge-bar > .home-filter-toggle.has-filter,
  .icon-badge-bar .tl-actions button.has-filter {
    background: var(--color-accent);
    color: var(--color-white);
  }
  /* 放在移动端规则之后，同优先级才压得住上面的按压缩放 */
  @media (prefers-reduced-motion: reduce) {
    .icon-badge-bar .tl-pill .pt-icon,
    .icon-badge-bar .funnel-icon,
    .icon-badge-bar .star-icon { transition: none; transform: none !important; }
  }
  .home-head .icon-badge-bar { margin-top: 10px; }
  .tl-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; }
  .kol-card { gap: 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;
  }
  .btn-sm { min-height: 44px; padding: 0 16px; }
  .lightbox-close { width: 44px; height: 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, .rc-table tbody { display: block; width: 100%; }
  .rc-table thead { display: none; }
  .rc-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
    padding: 10px 0;
    border-bottom: var(--border-default);
  }
  .rc-table td {
    display: block;
    padding: 0;
    border: none;
    white-space: normal;
  }
  .rc-batch .table-wrap { overflow: visible; }
  .rc-batch + .rc-batch { margin-top: 12px; padding-top: 12px; }
  .rc-table td.rc-code-cell { order: 1; grid-column: 1; min-width: 0; }
  .rc-table td.rc-status-cell { order: 2; grid-column: 2; font-size: var(--text-sm); font-weight: var(--font-weight-medium); }
  .rc-table td.rc-note-cell { order: 3; grid-column: 1 / -1; color: var(--color-text); font-size: var(--text-sm); }
  .rc-table td.rc-time-cell {
    order: 4;
    grid-column: 1;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
  }
  .rc-table td.rc-actions {
    order: 4;
    grid-column: 2;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
  }
  .rc-table td.rc-user-cell {
    order: 5;
    grid-column: 1;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
  }
  .rc-table td.rc-empty-cell { display: none; }
  .rc-code { min-height: 0; width: 100%; }
  .rc-code code {
    font-size: var(--text-body);
    letter-spacing: 0.06em;
  }
  .rc-table .rc-actions .btn-sm,
  .rc-table .rc-actions .btn-sm + .btn-sm {
    width: auto;
    min-width: 52px;
    min-height: 44px;
    margin: 0;
    padding: 0 12px;
    border-radius: var(--radius-control);
  }
  .rc-batch-actions .btn-sm,
  .rc-result-actions .btn-sm {
    width: 100%;
    min-height: 44px;
    margin: 0;
    border-radius: var(--radius-control);
  }
  .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;
  }
}

/* ---------- 全景概览 ---------- */
.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: minmax(0, 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-head-actions { flex-shrink: 0; }
.dash-head-actions .btn-ghost { white-space: nowrap; }
.dash-alerts { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.dash-alerts:empty { display: none; }
.dash-alerts-fresh {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: var(--text-sm);
}
.dash-alert-history > summary {
  cursor: pointer;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  width: fit-content;
}
.dash-alert-history ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.dash-alert-history li { display: flex; gap: 6px; }
.dash-source-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 8px;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.dash-source-summary p { margin: 0; }
.dash-source-summary .btn-sm { flex-shrink: 0; white-space: nowrap; }
#dash-source-tablewrap[hidden] { display: none; }
.dash-err-kind { font-weight: var(--font-weight-semibold); color: var(--color-warning-strong); white-space: nowrap; }
.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-group + .dash-stale-group {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-line-soft);
}
.dash-stale-group .section-meta { margin: 0 0 4px; }
.dash-stale-count {
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--color-danger);
}
.dash-stale-all { min-height: 0; margin-top: 6px; font-size: var(--text-sm); }
.dash-stale-verdict {
  margin: 0 0 4px;
  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-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.dash-kpis .dash-stat { min-width: 0; padding: 12px 14px; }
.dash-metric-notes > summary {
  cursor: pointer;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  width: fit-content;
}
.dash-metric-notes .section-meta { margin: 6px 0 0; }
.dash-channel-table th[scope="row"] { font-weight: var(--font-weight-medium); color: var(--color-text-strong); white-space: nowrap; }
.dash-channel-table td { font-variant-numeric: tabular-nums; }
.dash-channel-rate { white-space: nowrap; }
.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-trend-col.is-partial .dash-trend-ok {
  background: repeating-linear-gradient(135deg, var(--color-success) 0 4px, color-mix(in srgb, var(--color-success) 45%, transparent) 4px 8px);
}
.dash-trend-col.is-partial .dash-trend-date { color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.dash-push-legend, .dash-push-legend > span { display: flex; align-items: center; gap: var(--space-2); }
.dash-push-legend { flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.dash-push-legend i { width: 10px; height: 10px; }
.dash-push-detail > summary { min-height: var(--control-height-touch); padding-block: var(--space-3); cursor: pointer; font-size: var(--text-xs); color: var(--color-text-muted); }
.dash-push-detail > summary:focus-visible, .dash-trend-col:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.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: 120px; 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) {
  /* minmax(0, 1fr)：长 URL、表格等不可断内容不能把整列撑出屏幕 */
  .dash-duty-grid,
  .dash-duty-grid:has(#dash-stale-panel[hidden]) { grid-template-columns: minmax(0, 1fr); }
}
@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-kind { flex-shrink: 0; white-space: nowrap; }
.dash-events-title { margin: 0 0 2px; }
.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; }
.etf-alert-list { display: grid; gap: 12px; }
.etf-alert-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: var(--border-default);
  border-radius: var(--radius-card);
  background: var(--color-bg-muted);
}
.etf-alert-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.etf-alert-id { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.etf-alert-id strong { color: var(--color-text-strong); font-size: var(--text-sm); }
.etf-alert-id span { color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.etf-alert-live { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; color: var(--color-text); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.etf-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-strong);
  font-size: var(--text-xs);
}
.etf-alert-chip .watch-temperature-dot { margin-top: 0; }
.etf-alert-scale { margin: 0; color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; line-height: 1.5; }
.etf-alert-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.etf-alert-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 10px;
  border: var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
.etf-alert-field-label { color: var(--color-text-strong); font-size: var(--text-sm); font-weight: var(--font-weight-semibold); }
.etf-alert-switch { min-height: 36px; flex: 0 0 auto; }
.etf-alert-threshold { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--color-text-muted); font-size: var(--text-sm); white-space: nowrap; }
.etf-alert-threshold .form-control { width: 84px; min-height: 36px; padding: 6px 8px; }
.etf-alert-controls .btn-ghost { min-height: 40px; padding-inline: 16px; }
.etf-alert-result { min-height: 0; margin: 0; color: var(--color-data-negative); font-size: var(--text-xs); }
.etf-alert-result:empty { display: none; }
.etf-alert-footnote { margin: 4px 0 0; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.6; }
@media (max-width: 640px) {
  .etf-alert-head { flex-direction: column; gap: 6px; }
  .etf-alert-live { justify-content: flex-start; }
  .etf-alert-controls { grid-template-columns: 1fr; }
  .etf-alert-controls .btn-ghost { justify-self: end; }
}
.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-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;
}
/* 交互态：全站胶囊共用一套。hover 只在有指针的设备上给，避免触屏点完粘住。 */
@media (hover: hover) {
  .settings-tab:not(.active):hover { border-color: var(--color-line-strong); color: var(--color-text-strong); }
}
.settings-tab:not(.active):active { border-color: var(--color-accent-soft); background: var(--color-surface-accent-soft); }
.settings-tab:disabled, .settings-tab[disabled] {
  border-color: var(--color-line-soft);
  background: var(--color-bg-muted);
  color: var(--color-text-faint);
  cursor: not-allowed;
}

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

/* ---- 组合详情：状态 / 持仓 / 净值曲线 ---- */
.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: var(--radius-pill); 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-extraction-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  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-page .ima-pdf-panel.ima-pdf-panel--action {
  flex: 0 0 auto;
  min-height: 0;
  contain: none;
  align-items: stretch;
  justify-content: flex-start;
  margin: 0;
  padding: 4px 16px 16px;
  border-top: 0;
  background: transparent;
  overflow: visible;
}
.ima-pdf-panel--action .btn-normal {
  width: 100%;
  min-height: 44px;
}
.ima-pdf-panel--action .ima-reader-empty {
  margin: 0;
  padding: 8px 0 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-col: 44px; 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; flex-wrap: wrap; 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-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; }
/* 跳到日期：「日历 11月17日 ⌄」文字按钮，字跟着滚动变；透明 select 盖在上面接点击（桌面和手机同一个入口） */
.feishu-timeline-toolbar label.feishu-date-badge { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 11px; border: var(--border-strong); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text-strong); font-size: var(--text-sm); font-weight: var(--font-weight-medium); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.feishu-date-caret { width: 6px; height: 6px; margin: -3px 0 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; opacity: 0.7; transform: rotate(45deg); }
.feishu-timeline-toolbar label.feishu-date-badge:hover { background: var(--color-surface-soft); }
.feishu-timeline-toolbar label.feishu-date-badge:focus-within { outline: 2px solid var(--color-accent); outline-offset: 2px; }
/* 搜索：圆形按钮和日历按钮一个样子；点开后在工具栏下面整行出输入框 */
.feishu-tool-btn { display: inline-flex; flex: 0 0 40px; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: var(--border-strong); border-radius: 50%; background: var(--color-surface); color: var(--color-text-strong); cursor: pointer; }
.feishu-tool-btn:hover { background: var(--color-surface-soft); }
.feishu-tool-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.feishu-tool-btn.is-active { border-color: var(--color-accent-text); background: var(--color-accent-soft); color: var(--color-accent-text); }
.feishu-tool-btn .search-ic { width: 18px; height: 18px; }
.feishu-search-row { display: flex; flex: 1 0 100%; align-items: center; gap: var(--space-2); }
.feishu-search-row[hidden] { display: none; }
.feishu-timeline-toolbar label.feishu-searchbox { display: flex; flex: 1 1 auto; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding: 0 10px; border: var(--border-strong); border-radius: var(--radius-control); background: var(--color-surface); }
.feishu-searchbox:focus-within { border-color: var(--color-accent-text); box-shadow: var(--shadow-focus-ring); }
.feishu-searchbox .search-ic { width: 16px; height: 16px; flex: 0 0 auto; color: var(--color-text-muted); }
.feishu-searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--color-text); font: inherit; font-size: 16px; }
.feishu-search-cancel { flex: 0 0 auto; min-height: 40px; padding: 0 6px; border: 0; background: none; color: var(--color-accent-text); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.feishu-search-status { margin: 12px 0 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.feishu-search-status span { color: var(--color-text-faint); }
mark.feishu-hit { padding: 0 1px; border-radius: 2px; background: color-mix(in srgb, var(--color-warning) 32%, transparent); color: inherit; }
.feishu-date-badge .feishu-date-ic { flex: 0 0 auto; width: 16px; height: 16px; color: var(--color-text-muted); }
.feishu-timeline-toolbar .feishu-date-badge .feishu-date-select { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-height: 0; max-width: none; margin: 0; padding: 0; border: 0; opacity: 0; font-size: 16px; cursor: pointer; }
/* 正文区按自身宽度分栏：够宽时右边出「最近附件 / 提问」栏 */
.feishu-timeline-layout { flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; container-type: inline-size; }
.feishu-timeline-body { flex: 1 1 auto; min-width: 0; overflow-y: auto; scroll-behavior: smooth; padding: 0 28px 40px 24px; }
.feishu-timeline-body .tl-group { margin: 0; }
/* 日期分组头吸在滚动区顶部，往前翻也知道在看哪天；负外边距把底色铺到左右内边距 */
.feishu-timeline-body .feishu-day-head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 12px -28px 0 -24px;
  padding: 10px 28px 8px 24px;
  border-bottom: var(--border-soft);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
}
.feishu-timeline-body .tl-group:first-child .feishu-day-head { margin-top: 0; }
/* 一条记录：左列时间（全部模式下加来源头像），右列正文 → 置顶提问 → 正文 → 评论区 */
.feishu-day-feed { display: flex; flex-direction: column; }
.feishu-entry { display: grid; grid-template-columns: var(--feishu-time-col) minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: var(--border-soft); scroll-margin-top: 48px; }
/* 未读：时间旁一个小圆点；分隔线压在第一条已读前面 */
.feishu-entry-when { position: relative; }
.feishu-unread-dot { position: absolute; top: 0.6em; left: -10px; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); }
.feishu-unread-mark { display: flex; align-items: center; gap: 10px; margin: 2px 0; color: var(--color-accent-text); font-size: var(--text-xs); font-weight: var(--font-weight-semibold); }
.feishu-unread-mark::before,
.feishu-unread-mark::after { content: ""; flex: 1; height: 1px; background: var(--color-accent); opacity: 0.45; }
/* 长正文折叠到 6 行，底部渐隐 */
.feishu-entry-body { display: grid; gap: 10px; min-width: 0; }
.feishu-entry-body.is-clamped { max-height: 10.2em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 3em), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 3em), transparent); }
.feishu-expand { justify-self: start; min-height: 36px; margin-top: -6px; padding: 0; border: 0; background: none; color: var(--color-accent-text); font: inherit; font-size: var(--text-sm); font-weight: var(--font-weight-medium); cursor: pointer; }
.feishu-expand:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.feishu-entry:last-child { border-bottom: 0; }
.feishu-entry-when { display: grid; justify-items: start; align-content: start; gap: 6px; min-width: 0; }
.feishu-entry-when time { color: var(--color-text-strong); font-size: var(--text-sm); font-weight: var(--font-weight-semibold); line-height: 1.95; font-variant-numeric: tabular-nums; }
.feishu-entry.has-source { grid-template-columns: var(--feishu-source-col, 56px) minmax(0, 1fr); }
.feishu-entry-source { display: grid; justify-items: start; gap: 4px; max-width: 100%; min-width: 0; }
.feishu-entry-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.feishu-entry-avatar.is-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--color-accent-soft); color: var(--color-accent-strong); font-size: 11px; font-weight: var(--font-weight-semibold); }
.feishu-entry-source-name { max-width: 100%; overflow: hidden; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.feishu-entry-main { min-width: 0; max-width: 44em; display: grid; gap: 10px; color: var(--color-text); font-size: var(--text-body); line-height: 1.7; }
.feishu-entry-main p { max-width: 72ch; margin: 0; overflow-wrap: anywhere; }
.feishu-entry-main p.feishu-lines { line-height: 1.75; }
.feishu-name { color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.feishu-name.is-owner { color: var(--color-accent-text); }
.feishu-reply-word { color: var(--color-text-muted); }
.feishu-question { display: grid; gap: 6px; max-width: 72ch; margin: 0; padding: 8px 12px; border-left: 3px solid var(--color-accent); border-radius: 0 var(--radius-control) var(--radius-control) 0; background: var(--color-surface-muted); font-size: var(--text-sm); line-height: 1.65; }
.feishu-question cite { color: var(--color-accent-text); font-size: var(--text-xs); font-style: normal; font-weight: var(--font-weight-semibold); }
/* 一问一答：问题卡片的竖条淡下来往下延伸，回答文字和问题文字对齐 */
.feishu-qa { display: grid; max-width: 72ch; }
.feishu-answer { display: grid; gap: 10px; padding: 8px 0 2px 12px; border-left: 3px solid var(--color-accent-soft); }
.feishu-entry.is-flash { animation: feishu-flash 1.6s ease-out; }
@keyframes feishu-flash { from { background: var(--color-accent-soft); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .feishu-entry.is-flash { animation: none; background: var(--color-accent-soft); }
}
.feishu-comments { display: grid; gap: 6px; padding-left: 12px; border-left: 2px solid var(--color-line-strong); color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.6; }
.feishu-comments-head { color: var(--color-text-faint); font-size: var(--text-xs); }
.feishu-comment { display: grid; gap: 6px; }
.feishu-comments .feishu-name { font-weight: var(--font-weight-medium); }
.feishu-comments-more { display: grid; gap: 6px; }
.feishu-comments-more > summary { width: fit-content; min-height: 28px; color: var(--color-accent-text); font-size: var(--text-xs); line-height: 28px; cursor: pointer; list-style: none; }
.feishu-comments-more > summary::-webkit-details-marker { display: none; }
.feishu-comments-more[open] > summary { display: none; }
.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-teaser { display: grid; gap: 4px; max-width: 72ch; padding: 10px 12px; border: var(--border-default); border-radius: var(--radius-control); background: var(--color-surface-muted); }
.feishu-teaser-title { color: var(--color-text-strong); font-size: var(--text-sm); font-weight: var(--font-weight-semibold); line-height: 1.4; }
.feishu-entry-main .feishu-teaser p { color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.65; }
/* 附件卡片：类型色块 + 文件名 + 类型/操作提示 */
.feishu-entry-files { display: grid; gap: 8px; }
.feishu-attachment { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 420px; min-height: 56px; padding: 8px 12px 8px 8px; border: var(--border-strong); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text-strong); font: inherit; text-align: left; cursor: pointer; }
.feishu-attachment:hover { border-color: var(--color-accent-text); background: var(--color-surface-soft); }
.feishu-attachment:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.feishu-attachment:disabled { opacity: 0.6; cursor: progress; }
.feishu-attachment-ic { display: inline-flex; flex: 0 0 40px; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-2xs); background: var(--color-surface-soft); color: var(--color-text-muted); font-size: 11px; font-weight: var(--font-weight-semibold); letter-spacing: 0.02em; }
.feishu-attachment[data-kind="pdf"] .feishu-attachment-ic { background: var(--color-danger-soft); color: var(--color-danger); }
.feishu-attachment[data-kind="doc"] .feishu-attachment-ic { background: var(--color-accent-soft); color: var(--color-accent-text); }
.feishu-attachment[data-kind="sheet"] .feishu-attachment-ic { background: var(--color-success-soft); color: var(--color-success); }
.feishu-attachment-ic[data-kind="pdf"] { background: var(--color-danger-soft); color: var(--color-danger); }
.feishu-attachment-ic[data-kind="doc"] { background: var(--color-accent-soft); color: var(--color-accent-text); }
.feishu-attachment-ic[data-kind="sheet"] { background: var(--color-success-soft); color: var(--color-success); }
/* 宽屏右栏：最近 7 天的附件和提问，点一项跳到那条 */
.feishu-digest { display: none; }
@container (min-width: 960px) {
  .feishu-digest:not([hidden]) { display: flex; flex: 0 0 272px; flex-direction: column; gap: 20px; min-width: 0; overflow-y: auto; padding: 14px 20px 32px; border-left: var(--border-default); }
}
.feishu-digest-title { margin: 0; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-semibold); }
.feishu-digest-section { display: grid; gap: 4px; }
.feishu-digest-section h3 { margin: 0 0 2px; color: var(--color-text-strong); font-size: var(--text-sm); font-weight: var(--font-weight-semibold); }
.feishu-digest-section h3 span { margin-left: 4px; color: var(--color-text-faint); font-weight: var(--font-weight-normal); font-variant-numeric: tabular-nums; }
.feishu-digest ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.feishu-digest-item { display: grid; gap: 2px; width: calc(100% + 16px); margin: 0 -8px; padding: 8px; border: 0; border-radius: var(--radius-control); background: none; color: var(--color-text); font: inherit; font-size: var(--text-sm); line-height: 1.5; text-align: left; cursor: pointer; }
.feishu-digest-item:hover { background: var(--color-surface-soft); }
.feishu-digest-item:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.feishu-digest-item.is-file { grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.feishu-digest-item .feishu-attachment-ic { flex-basis: 32px; width: 32px; height: 32px; font-size: 10px; }
.feishu-digest-text { display: -webkit-box; min-width: 0; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.feishu-digest-who { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.feishu-digest-who cite { min-width: 0; overflow: hidden; color: var(--color-accent-text); font-size: var(--text-xs); font-style: normal; font-weight: var(--font-weight-semibold); white-space: nowrap; text-overflow: ellipsis; }
.feishu-digest-day { color: var(--color-text-faint); font-size: var(--text-xs); white-space: nowrap; }
.feishu-digest-more { margin: 0; color: var(--color-text-faint); font-size: var(--text-xs); }
.feishu-attachment-copy { display: grid; gap: 2px; min-width: 0; }
.feishu-attachment-name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: var(--text-sm); font-weight: var(--font-weight-medium); line-height: 1.4; overflow-wrap: anywhere; }
.feishu-attachment-meta { color: var(--color-text-faint); font-size: var(--text-xs); line-height: 1.3; }
.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-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 - var(--topbar-height) - 68px);
    height: calc(100dvh - var(--topbar-height) - 64px - 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: 38px;
    min-width: 38px;
    padding: 0;
  }
  .feishu-source-pills .tl-pill.has-avatar:not(.selected) span { display: none; }
  .feishu-source-pills .tl-pill.has-avatar .feishu-source-avatar { width: 28px; height: 28px; }
  /* 选中的来源展开成「头像 + 名字」，不用靠标题去猜选的是谁 */
  .feishu-source-pills .tl-pill.has-avatar.selected { width: auto; padding: 0 12px 0 5px; gap: 6px; }
  .feishu-timeline-toolbar label.feishu-date-badge { height: 44px; padding: 0 12px; }
  .feishu-timeline-toolbar label.feishu-date-badge .feishu-date-ic { display: none; }
  .feishu-tool-btn { flex-basis: 44px; width: 44px; height: 44px; }
  .feishu-timeline-toolbar label.feishu-searchbox { flex: 1 1 auto; min-height: 44px; }
  .feishu-search-cancel { min-height: 44px; }
  .feishu-expand { min-height: 44px; margin-top: -10px; }
  .feishu-timeline-panel { --feishu-time-col: 40px; --feishu-source-col: 52px; }
  .feishu-timeline-body { padding: 0 14px 32px 12px; }
  .feishu-timeline-body .feishu-day-head { margin-right: -14px; margin-left: -12px; padding-right: 14px; padding-left: 12px; }
  .feishu-entry { gap: 10px; }
  /* 手机上去掉阅读卡片的外框和左右留白，正文铺满屏宽 */
  .page-main:has(.ima-reader--feishu) { padding-right: 0; padding-left: 0; padding-top: 4px; padding-bottom: 0; }
  .ima-reader-page:has(.ima-reader--feishu) { border: 0; border-radius: 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-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);
}
/* 上面的 display:flex 会盖过 hidden 属性，没改动时保存栏也一直显示 */
.ima-collector-savebar[hidden] { display: none; }
.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; }
/* 超过下载上限、被同步跳过的 PDF 列表 */
.ima-oversized { padding: var(--space-3) var(--space-4); border-top: var(--border-default); font-size: var(--text-sm); }
.ima-oversized > summary { cursor: pointer; color: var(--color-warning); min-height: 32px; display: flex; align-items: center; }
.ima-oversized-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-2); max-height: 320px; overflow-y: auto; }
.ima-oversized-list li { display: grid; gap: 2px; min-width: 0; }
.ima-oversized-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-strong); }
.ima-oversized-list .muted { font-size: var(--text-xs); }
.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-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; }
}

@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); width: auto; 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-card); 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-idle { color: var(--color-text-muted); }
.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 { min-width: 0; }
.news-stream-head { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 20px; align-items: center; margin-bottom: 12px; min-width: 0; }
.news-stream-title { display: none; }
.news-stream-actions { display: flex; grid-row: 1; grid-column: 1; align-items: center; gap: 8px; min-width: 0; }
.news-search-toggle { display: none; }
.news-search-toggle .search-ic { width: 18px; height: 18px; }
.news-search-toggle.is-on { color: var(--color-accent-text); }
.news-stream-search { display: flex; grid-row: 1; grid-column: 2; align-items: center; width: 100%; min-height: 42px; gap: 8px; padding: 0 12px; border: var(--border-default); border-radius: var(--radius-control); background: var(--color-surface); order: 2; }
.news-stream-search .search-ic { width: 16px; height: 16px; flex: 0 0 16px; color: var(--color-text-muted); }
.news-stream-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--color-text); font: inherit; }
.news-stream-search:focus-within { border-color: var(--color-accent-text); box-shadow: var(--shadow-focus-ring); }
.news-stream-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.news-source-rail { position: sticky; top: calc(var(--topbar-height) + 16px); display: flex; flex-direction: column; max-height: calc(100dvh - var(--topbar-height) - 36px); overflow: hidden; min-width: 0; padding: var(--space-3); border: var(--border-default); border-radius: var(--radius-card); background: var(--color-surface); }
.news-source-rail-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 var(--space-2); margin-bottom: var(--space-2); }
.news-source-rail-head strong { color: var(--color-text-strong); font-size: var(--text-body); font-weight: var(--font-weight-semibold); }
.news-source-rail-head .icon-btn { width: 36px; height: 36px; min-height: 36px; border-radius: var(--radius-2xs); }
.news-source-head-actions { display: flex; align-items: center; gap: var(--space-1); }
.news-source-dismiss { display: none; }
.news-source-groups { min-height: 0; margin-top: var(--space-2); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--color-line-strong) transparent; }
.news-source-empty { padding: var(--space-3) var(--space-2); margin: 0; font-size: var(--text-sm); }
.news-source-manage { display: none; }
.news-source-switch,
.news-source-backdrop { display: none; }
.news-filter-summary { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; color: var(--color-text-muted); font-size: var(--text-xs); }
.news-filter-summary[hidden] { display: none; }
.news-filter-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.news-filter-chips b { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--color-accent-soft); color: var(--color-accent-text); font-weight: var(--font-weight-medium); }
.news-filter-summary .btn-ghost,
.news-filter-clear { min-height: 28px; height: 28px; padding: 0 10px; border-radius: var(--radius-pill); }
.news-source-group + .news-source-group { margin-top: var(--space-1); border-top: var(--border-soft); padding-top: var(--space-1); }
.news-source-group > summary { display: flex; align-items: center; gap: var(--space-2); min-height: 54px; padding: var(--space-2); border-radius: var(--radius-2xs); color: var(--color-text-strong); cursor: pointer; list-style: none; }
.news-source-group > summary::-webkit-details-marker { display: none; }
.news-source-group[open] > summary { position: sticky; top: 0; z-index: 1; background: var(--color-surface); }
.news-source-group > summary:hover { background: var(--color-surface-muted); }
.news-source-group > summary:focus-visible,
.news-source-row:focus-visible { outline: 2px solid var(--color-accent-text); outline-offset: -2px; }
.news-source-group > summary > .chevron-down-icon { width: 14px; height: 14px; flex: 0 0 14px; color: var(--color-text-muted); }
.news-source-group:not([open]) > summary > .chevron-down-icon { transform: rotate(-90deg); }
.news-source-publisher { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: var(--radius-2xs); background: var(--color-bg-muted); color: var(--color-text-subtle); }
.news-source-publisher .news-platform { width: 20px; height: 20px; flex: 0 0 20px; background: transparent; color: inherit; }
.news-source-publisher > .nav-svg { width: 16px; height: 16px; }
.news-source-group-title { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 2px; }
.news-source-group-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); font-weight: var(--font-weight-semibold); line-height: 1.4; }
.news-source-group-title small { color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.4; }
.news-source-group.has-current > summary .news-source-group-name { color: var(--color-accent-text); }
.news-source-children { padding: 0 var(--space-1) var(--space-2) calc(var(--space-5) + var(--space-4)); }
.news-source-row { display: flex; flex: 0 0 auto; align-items: center; width: 100%; min-height: 34px; gap: var(--space-2); padding: 6px var(--space-2); border: 0; border-radius: var(--radius-2xs); background: transparent; color: var(--color-text-muted); font: inherit; font-size: var(--text-sm); line-height: 1.5; text-align: left; cursor: pointer; }
.news-source-row .nav-svg,
.news-source-rail-head .nav-svg,
.news-stream-actions .nav-svg { width: 16px; height: 16px; flex: 0 0 16px; }
/* Only the label grows. The old `span` selector also stretched the platform mark. */
.news-source-row > .news-source-name { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-source-row > .news-platform { flex: 0 0 20px; width: 20px; height: 20px; }
.news-source-count,
.news-source-group-count { flex: 0 0 auto; min-width: 20px; text-align: right; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-medium); font-variant-numeric: tabular-nums; }
.news-source-count[hidden],
.news-source-group-count[hidden] { display: none; }
.news-source-row.has-unread { color: var(--color-text-subtle); font-weight: var(--font-weight-medium); }
.news-source-row:hover { color: var(--color-text); background: var(--color-surface-muted); }
.news-source-row.is-on { background: var(--color-accent-soft); color: var(--color-accent-text); font-weight: var(--font-weight-semibold); }
.news-source-row.is-on .news-source-count { color: inherit; }
.news-source-all { min-height: 42px; padding-inline: var(--space-3); gap: var(--space-3); }
.news-stream-main { min-width: 0; }
.news-new-badge { position: sticky; top: calc(var(--topbar-height) + 8px); z-index: 5; display: flex; justify-content: center; height: 0; }
.news-new-badge[hidden] { display: none; }
.news-new-badge button { height: 32px; margin-top: 8px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-white); font: inherit; font-size: var(--text-xs); cursor: pointer; }
.news-unread-toggle { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text); font-size: var(--text-sm); cursor: pointer; white-space: nowrap; }
.news-unread-toggle .eye-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.news-unread-toggle b { min-width: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--color-accent-soft); color: var(--color-accent-text); font-weight: var(--font-weight-semibold); font-size: var(--text-xs); line-height: 1.6; text-align: center; }
.news-unread-toggle:hover { border-color: var(--color-accent); }
.news-unread-toggle.is-on { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-white); }
.news-unread-toggle.is-on b { background: rgba(255, 255, 255, 0.22); color: var(--color-white); }
.news-read-all { flex: 0 0 auto; }
.news-item-topics { display: flex; flex: 0 1 auto; gap: 4px; min-width: 4.5em; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--color-line-strong) transparent; }
.news-item-topics::-webkit-scrollbar { height: 3px; }
.news-item-topics::-webkit-scrollbar-thumb { border-radius: 99px; background: var(--color-line-strong); }
.news-item-topics i,
.news-item-topics button { padding: 1px 6px; border: 0; border-radius: 4px; background: var(--color-surface-accent); color: var(--color-accent-text); font: inherit; font-size: var(--text-xs); font-style: normal; line-height: 1.5; white-space: nowrap; cursor: pointer; }
.news-item-topics button.is-on { background: var(--color-accent); color: var(--color-white); }
.news-magazine { background: var(--color-surface); }
.news-magazine-year > summary { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: var(--border-default); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-semibold); letter-spacing: 1px; cursor: pointer; }
.news-magazine-year > summary span { font-weight: var(--font-weight-medium); letter-spacing: 0; }
.news-issue { border-bottom: var(--border-default); }
.news-issue-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.news-issue-head::-webkit-details-marker { display: none; }
.news-issue-cover { width: 46px; height: 62px; flex: 0 0 auto; object-fit: cover; border-radius: 2px; background: var(--color-surface-muted); }
.news-issue-cover.is-blank { display: block; }
.news-issue-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.news-issue-meta b { color: var(--color-text-strong); font-size: var(--text-body); }
.news-issue-meta em { color: var(--color-text); font-style: normal; font-weight: var(--font-weight-medium); }
.news-issue-meta small { color: var(--color-text-muted); font-size: var(--text-xs); }
.news-issue-section { padding: 10px 16px 2px; color: var(--color-text-muted); font-size: var(--text-xs); letter-spacing: 1px; }
.news-issue-article { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-top: var(--border-default); color: inherit; text-decoration: none; }
.news-issue-article strong { color: var(--color-text-strong); font-size: var(--text-body); font-weight: var(--font-weight-medium); }
.news-issue-article.is-read strong { color: var(--color-text-muted); font-weight: var(--font-weight-normal, 400); }
.news-issue-article span { color: var(--color-text-muted); font-size: var(--text-xs); }
.news-day-sep { display: flex; align-items: center; padding: 8px 16px; border-bottom: var(--border-default); background: var(--color-surface-muted); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-semibold); letter-spacing: 1px; }
.news-list { display: grid; gap: 0; min-width: 0; overflow: hidden; border: var(--border-default); border-radius: var(--radius-card); background: var(--color-surface); }
.news-list > .empty-state { border: 0; }
.news-list .admin-skeleton { gap: 0; }
.news-list .admin-sk-card { flex-direction: row; align-items: center; gap: 16px; min-height: 108px; padding: 14px 16px; border: 0; border-bottom: var(--border-default); border-radius: 0; }
.news-list .news-sk-copy { flex: 1 1 auto; min-width: 0; display: grid; gap: 8px; }
.news-list .admin-sk-head { width: 72%; }
.news-list .news-sk-thumb { width: 112px; height: 75px; flex: 0 0 112px; border-radius: 8px; background: var(--color-surface-muted); }
.news-list-item { display: flex; align-items: flex-start; gap: 16px; min-width: 0; padding: 14px 16px; border-bottom: var(--border-default); background: var(--color-surface); color: var(--color-text); cursor: pointer; transition: background-color 150ms ease; }
.news-list-item:last-child { border-bottom: 0; }
.news-list-item:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.news-list-copy { min-width: 0; flex: 1 1 auto; max-width: 46em; }
.news-item-open { display: block; min-width: 0; color: inherit; text-decoration: none; }
.news-item-open:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }
.news-list-thumb-link { position: relative; z-index: 1; flex: 0 0 auto; line-height: 0; color: inherit; }
.news-item-title-row { display: flex; align-items: flex-start; gap: 8px; }
.news-item-unread-dot { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 8px; border-radius: 50%; background: var(--color-accent); }
.news-item-unread-dot.is-off { visibility: hidden; }
.news-list-item h3 { display: -webkit-box; margin: 0 0 6px; overflow: hidden; color: var(--color-text-muted); font-size: var(--text-body); font-weight: var(--font-weight-medium); line-height: 1.42; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-list-item.is-unread h3 { color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.news-list-item.is-read h3 { color: var(--color-text-muted); font-weight: var(--font-weight-normal, 400); }
.news-list-item p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--color-text-muted); font-size: 0.84rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-list-meta { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-top: 8px; min-width: 0; color: var(--color-text-faint, var(--color-text-muted)); font-size: 0.75rem; }
.news-item-source { display: inline-flex; align-items: center; gap: 4px; max-width: 12.5em; min-width: 1.75em; flex: 0 1 auto; overflow: hidden; font-weight: var(--font-weight-semibold); }
.news-item-source-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.news-list-item.is-unread .news-item-source { color: var(--color-accent-text); }
.news-platform {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  background: var(--color-bg-muted); color: var(--color-accent-text);
}
.news-platform .pt-icon { width: 12px; height: 12px; }
.news-platform[data-platform="ft"] .pt-icon { width: 15px; height: auto; }
.news-platform-img { width: 14px; height: 14px; object-fit: contain; border-radius: 3px; display: block; }
.news-platform-fallback { display: inline-flex; align-items: center; justify-content: center; }
.news-platform-fallback[hidden] { display: none; }
.news-article-source { display: inline-flex; align-items: center; gap: 4px; }
.news-article-title-src { margin: 6px 0 0; color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.45; }
.news-article-original { margin-top: 24px; border-top: var(--border-default); padding-top: 12px; }
.news-article-original > summary { cursor: pointer; color: var(--color-text-muted); font-size: 0.85rem; }
.news-article-original .news-article-body { margin-top: 12px; }
.news-list-meta time { flex: 0 0 auto; }
.news-list-thumb { width: 112px; height: 75px; flex: 0 0 112px; object-fit: cover; border-radius: 8px; background: var(--color-surface-muted); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.news-list-thumb.is-pending { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.news-list-thumb-link:not(:has(.news-list-thumb:not(.is-pending))) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:root.theme-dark .news-list-thumb { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.news-mark-read { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 44px; min-height: 44px; margin: -8px -8px -8px auto; padding: 0; border: 0; background: transparent; color: var(--color-accent-text); cursor: pointer; }
.news-mark-read .ui-icon { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) {
  .news-list-item:hover { background: var(--color-surface-muted); }
  .news-mark-read { opacity: 0; }
  .news-list-item:hover .news-mark-read,
  .news-list-item:focus-within .news-mark-read { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .news-list-item { transition: none; }
}
.news-read-undo { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: var(--border-default); border-radius: var(--radius-control); background: var(--color-text-strong); color: var(--color-surface); box-shadow: var(--shadow-lg); }
.news-read-undo[hidden] { display: none; }
.news-read-undo button { border: 0; background: transparent; color: var(--color-accent-text); font-weight: var(--font-weight-semibold); cursor: pointer; }
.news-new-label { padding: 1px 5px; border-radius: var(--radius-sm); background: var(--color-accent-soft); color: var(--color-accent-text); font-weight: var(--font-weight-medium); }
.news-load-sentinel { min-height: 24px; }
.news-article-page { max-width: 780px; margin: 0 auto; min-width: 0; position: relative; }
.news-read-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; background: transparent; }
.news-read-progress i { display: block; width: 100%; height: 100%; background: var(--color-accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 80ms linear; }
@media (prefers-reduced-motion: reduce) { .news-read-progress i { transition: none; } }
.news-article-head { position: relative; padding-bottom: 16px; border-bottom: var(--border-default); }
.news-article-meta { display: flex; align-items: center; 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: var(--text-heading); line-height: 1.3; overflow-wrap: anywhere; }
.news-article-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.news-original-link { display: inline-flex; align-items: center; gap: 5px; min-height: 42px; margin-top: 0; }
.news-article-body { min-width: 0; max-width: 700px; padding-top: 20px; color: var(--color-text); font-size: var(--text-article); line-height: 1.85; overflow-wrap: anywhere; }
.news-article-body.news-font-small { font-size: var(--text-article-small); }
.news-article-body.news-font-large { font-size: var(--text-article-large); line-height: 1.9; }
.news-article-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 16px; border-top: var(--border-default); }
.news-source-group-label { margin: 10px 4px 2px; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-semibold); letter-spacing: 1px; }
.news-source-group-label:first-child { margin-top: 0; }
.news-admin-source-group { margin-left: 8px; color: var(--color-text-muted); font-size: var(--text-xs); font-style: normal; font-weight: var(--font-weight-normal); }
.news-article-body p { margin: 0 0 1em; text-indent: 2em; }
.news-article-body p:has(> img:only-child) { text-indent: 0; }
.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-text); }
.news-article-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 16px; border-top: var(--border-default); }
.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: 1100px) {
  .news-stream-head,
  .news-stream-layout { grid-template-columns: minmax(0, 1fr) 220px; column-gap: 16px; }
}
@media (max-width: 768px) {
  .news-stream-head { display: flex; align-items: center; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  .news-stream-title { display: block; flex: 0 0 auto; min-width: 0; order: 1; }
  .news-stream-actions { order: 3; width: auto; margin-left: auto; gap: 6px; align-items: center; }
  .news-search-toggle { display: inline-flex; width: 40px; height: 40px; }
  .news-read-all { position: relative; width: 40px; height: 40px; min-height: 40px; padding: 0; }
  .news-read-all span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .news-stream-search { display: none; order: 4; width: 100%; }
  .news-page.is-searching .news-stream-search { display: flex; flex: 1 0 100%; }
  .news-unread-toggle { height: 40px; padding: 0 12px 0 10px; }
  .news-stream-layout { grid-template-columns: 1fr; gap: 12px; }
  .news-source-switch { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 52vw; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--color-text-strong); font: inherit; font-size: var(--text-title); font-weight: var(--font-weight-semibold); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .news-source-switch span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .news-source-switch .chevron-down-icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--color-text-muted); transition: transform var(--ease-standard); }
  .news-page.is-sources-open .news-source-switch .chevron-down-icon { transform: rotate(180deg); }
  .news-source-rail { position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 91; max-height: 72vh; padding: 20px 12px calc(16px + env(safe-area-inset-bottom)); border-bottom: 0; border-radius: var(--radius-card) var(--radius-card) 0 0; box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18); overscroll-behavior: contain; visibility: hidden; transform: translateY(100%); transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 260ms; }
  .news-source-rail::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; border-radius: var(--radius-pill); background: var(--color-line-strong); opacity: 0.8; transform: translateX(-50%); }
  .news-page.is-sources-open .news-source-rail { visibility: visible; transform: none; transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1); }
  .news-source-row { min-height: var(--control-height-touch); }
  .news-source-rail-head .icon-btn { width: var(--control-height-touch); height: var(--control-height-touch); }
  .news-source-dismiss { display: inline-flex; align-items: center; min-height: var(--control-height-touch); padding: 0 var(--space-2); color: var(--color-accent-text); }
  .news-source-backdrop { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, 0.45); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
  .news-page.is-sources-open .news-source-backdrop { opacity: 1; pointer-events: auto; }
  .news-day-sep { padding: 8px 12px; }
  .news-list-item { gap: 10px; padding: 12px 12px 10px; }
  .news-list-item p { -webkit-line-clamp: 1; }
  .news-list .admin-sk-card { min-height: 84px; padding: 12px; }
  .news-list-copy { overflow: hidden; }
  .news-list-meta { overflow: hidden; }
  /* 来源至少放下图标加两个字；多出来的宽度给标签，标签在自己的滚动口里横滑。 */
  .news-item-source { max-width: 8em; min-width: 4.5em; flex: 0 1 auto; }
  .news-item-source-name { min-width: 2em; }
  .news-item-topics { flex: 1 1 2.5em; min-width: 2.5em; }
  .news-item-topics i,
  .news-item-topics button { display: inline-flex; align-items: center; min-height: 32px; padding: 0 8px; }
  .news-mark-read { position: relative; width: 32px; min-width: 32px; height: 32px; min-height: 32px; margin: 0 0 0 auto; }
  .news-list-thumb { object-position: center 22%; }
  .news-list-thumb,
  .news-list .news-sk-thumb { width: 96px; height: 72px; flex-basis: 96px; }
  .news-mark-read span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .news-read-undo { right: 12px; bottom: calc(var(--mobile-nav-height, 64px) + 12px); left: 12px; justify-content: space-between; }
  .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-article-body { font-size: 16px; }
  .news-article-head h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
  .news-source-rail, .news-page.is-sources-open .news-source-rail, .news-source-backdrop { transition: none; }
}

/* 研报结构化抽取徽章（评级/目标价/标的） */
.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-text);
  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-title); }
.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-text); }
@media (max-width: 640px) {
  .ima-tk-row { grid-template-columns: 52px minmax(0, 1fr); }
  .ima-tk-row .ima-report-source { display: none; }
}

/* ---------- 行情 / 自选股 ---------- */
.watchlist-page { max-width: 1120px; margin: 0 auto; }
.watch-panel[hidden] { display: none; }
.watch-panel > .watchlist-intro-actions { margin-bottom: 14px; }
.watchlist-intro, .watch-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.watchlist-intro { margin: 4px 0 20px; }
.watchlist-intro .section-title, .watch-section-heading .section-title { margin: 0; }
.watchlist-intro-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
/* 板块胶囊横滑提示：JS 按滚动位置打 can-left / can-right（只有一行放不下时才会出现），
   有内容的一侧渐隐，右侧另给一个 ›；胶囊本身仍是公共 .settings-tab。 */
.watch-tabs-rail { position: relative; margin-bottom: var(--space-4); }
.watch-tabs-rail > .settings-tabs { margin-bottom: 0; }
@media (max-width: 768px) { .watch-tabs-rail { margin-bottom: var(--space-3); } }
.watch-tabs-rail.can-right > .settings-tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.watch-tabs-rail.can-left > .settings-tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px); mask-image: linear-gradient(90deg, transparent, #000 32px); }
.watch-tabs-rail.can-left.can-right > .settings-tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 48px), transparent); }
.watch-tabs-more { display: none; }
.watch-tabs-rail.can-right .watch-tabs-more { position: absolute; inset-block: 0; right: 2px; display: flex; align-items: center; pointer-events: none; color: var(--color-text-muted); }
.watch-tabs-more::before { content: ""; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.watch-fetch-time { color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.watch-settings-link, .market-open-link { color: var(--color-accent-text); font-size: var(--text-sm); font-weight: var(--font-weight-medium); }
.watch-settings-link:hover, .market-open-link:hover { text-decoration: underline; }
.watch-search-panel { margin-bottom: 24px; }
.watch-search-form { display: grid; grid-template-columns: 132px minmax(180px, 1fr) auto; gap: 10px; align-items: center; }
.watch-search-form .form-control { min-height: var(--control-height-2xl); }
.watch-search-note { margin: 10px 0 0; color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-search-results { margin-top: 10px; }
.watch-search-result-list { border-top: var(--border-soft); }
.watch-search-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: var(--border-soft); }
.watch-search-result > div { display: grid; gap: 2px; min-width: 0; }
.watch-search-result strong { color: var(--color-text-strong); font-size: var(--text-sm); }
.watch-search-result span { color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-search-result .btn-ghost { min-height: 34px; padding: 0 12px; }
.watch-search-error { margin: 10px 0 0; color: var(--color-danger); font-size: var(--text-sm); }
.watchlist-section { margin-bottom: 24px; }
.watch-section-heading { align-items: baseline; margin-bottom: 10px; }
.watch-list-state { color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
.watch-item { padding: 16px; border: var(--border-default); border-radius: var(--radius-card); background: var(--color-surface); }
.watch-item-top, .watch-rule-heading, .watch-rule-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.watch-identity { display: grid; gap: 3px; min-width: 0; }
.watch-identity strong { color: var(--color-text-strong); font-size: var(--text-body); overflow-wrap: anywhere; }
.watch-identity span, .watch-quote-label, .watch-state > span:last-child, .watch-rule-note, .watch-delivery { color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-delete { border: 0; background: transparent; color: var(--color-text-muted); font-size: var(--text-xs); padding: 6px 4px; }
.watch-delete:hover { color: var(--color-danger); }
.watch-quote { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(86px, .7fr) minmax(150px, 1fr); align-items: center; gap: 12px; padding: 16px 0 14px; border-bottom: var(--border-soft); }
.watch-price, .watch-change, .watch-state { display: grid; gap: 3px; }
.watch-price-value { color: var(--color-text-strong); font-size: var(--text-title); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.watch-price-value.is-unavailable { color: var(--color-text-muted); }
.watch-change { justify-items: start; font-size: var(--text-body); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.watch-change.positive { color: var(--color-data-positive); }
.watch-change.negative { color: var(--color-data-negative); }
.watch-change.flat { color: var(--color-text-muted); }
.watch-change span:last-child { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: normal; }
.watch-state { justify-items: end; text-align: right; }
.watch-status { display: inline-flex; width: fit-content; padding: 2px 7px; border-radius: var(--radius-pill); background: var(--color-bg-muted); color: var(--color-text-muted); font-size: var(--text-xs); white-space: nowrap; }
.watch-status-live { color: var(--color-success); background: var(--color-success-soft); }
.watch-status-stale { color: var(--color-warning-text, var(--color-text-muted)); }
.watch-status-unavailable { color: var(--color-danger); background: var(--color-danger-soft); }
.watch-rules { display: grid; gap: 10px; padding-top: 12px; }
.watch-rule { display: grid; gap: 7px; }
.watch-rule-heading { align-items: baseline; }
.watch-rule-heading strong { color: var(--color-text); font-size: var(--text-sm); }
.watch-rule-controls { display: grid; grid-template-columns: auto minmax(100px, 1fr) auto; align-items: center; gap: 8px; }
.watch-target-label { color: var(--color-text-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.watch-target { min-height: 36px; padding: 0 9px; }
.watch-enabled { min-height: 36px; white-space: nowrap; }
.watch-rule-actions { align-items: center; padding-top: 2px; }
.watch-save { min-height: 42px; padding: 0 12px; flex-shrink: 0; white-space: nowrap; }
.watch-form-error { min-height: 16px; margin: 0; color: var(--color-danger); font-size: var(--text-xs); }
.watch-state-panel { display: grid; justify-items: center; gap: 7px; padding: 38px 20px; border: var(--border-default); border-radius: var(--radius-card); background: var(--color-surface); color: var(--color-text-muted); text-align: center; }
.watch-state-panel strong { color: var(--color-text-strong); }
.watch-state-panel .btn-ghost { min-height: 36px; margin-top: 4px; }
.watch-state-error strong { color: var(--color-danger); }
.watch-a500 { margin-top: 0; }
.watch-a500-panel-body { display: grid; gap: var(--space-4); }
.watch-a500-score { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.watch-a500-score > div { display: grid; gap: 3px; }
.watch-a500-kicker, .watch-a500-score > div > span:last-child, .watch-a500-source, .watch-a500-muted, .watch-a500-description, .watch-a500-metrics span, .watch-a500-line-grid span, .watch-a500-line-grid small, .watch-a500-indicator small { color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-a500-score > div > strong { color: var(--color-text-strong); font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.watch-a500-score > div > span:last-child { color: var(--color-text); font-size: var(--text-sm); }
.watch-a500-description, .watch-a500-source { margin: 0; }
.watch-a500-metrics, .watch-a500-line-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.watch-a500-metrics > div, .watch-a500-line-grid > div { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: var(--border-soft); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.watch-a500-metrics strong, .watch-a500-line-grid strong { color: var(--color-text-strong); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.watch-a500-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.watch-a500-columns h4, .watch-a500-indicators h4 { margin: 0 0 8px; color: var(--color-text-strong); font-size: var(--text-sm); }
.watch-a500-history { display: grid; gap: 7px; }
.watch-a500-history-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 56px; align-items: center; gap: 8px; color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.watch-a500-history-row i { display: block; height: 6px; overflow: hidden; border-radius: var(--radius-pill); background: var(--color-bg-muted); }
.watch-a500-history-row b { display: block; height: 100%; border-radius: inherit; background: var(--color-accent); }
.watch-a500-history-row strong { color: var(--color-text); text-align: right; }
.watch-a500-indicators { display: grid; gap: 1px; }
.watch-a500-indicator { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px 12px; padding: 8px 0; border-top: var(--border-soft); }
.watch-a500-indicator > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.watch-a500-indicator > div strong { min-width: 0; overflow-wrap: anywhere; }
.watch-data-status { display: inline-flex; align-items: center; flex: 0 0 auto; width: fit-content; padding: 2px 6px; border-radius: var(--radius-sm); background: var(--color-bg-muted); color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.4; white-space: nowrap; }
.watch-data-status.is-auto { color: var(--color-success); background: var(--color-success-soft); }
.watch-data-status.is-stale { color: var(--color-warning-text, var(--color-text-muted)); background: var(--color-warning-soft); }
.watch-a500-indicator > strong { color: var(--color-text-strong); text-align: right; font-variant-numeric: tabular-nums; }
.watch-a500-indicator > small { grid-column: 1 / -1; text-align: left; line-height: 1.5; overflow-wrap: anywhere; }
.watch-a500-unavailable { display: flex; align-items: center; gap: 12px; }
.watch-a500-unavailable p { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }
@media (max-width: 640px) {
  .watch-a500-columns, .watch-a500-metrics, .watch-a500-line-grid { grid-template-columns: 1fr 1fr; }
}

.watch-temperature-card { display: grid; gap: var(--space-4); }
.watch-temperature-hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 18px; }
.watch-temperature-primary, .watch-temperature-quote { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.watch-temperature-score, .watch-temperature-index-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2); min-width: 0; }
.watch-temperature-kicker, .watch-temperature-advice, .watch-temperature-meta, .watch-temperature-scale-label, .watch-temperature-source, .watch-temperature-metrics span { color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-temperature-kicker, .watch-temperature-advice { display: block; }
.watch-temperature-advice { color: var(--color-text); }
.watch-temperature-index { color: var(--color-text-strong); font-size: var(--text-data-md); line-height: 1; font-variant-numeric: tabular-nums; }
.watch-temperature-change { font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.watch-temperature-change.positive { color: var(--color-data-positive); }
.watch-temperature-change.negative { color: var(--color-data-negative); }
.watch-temperature-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.watch-temperature-value { display: inline-block; margin: 0; color: var(--color-text-strong); font-size: var(--text-data-xl); line-height: 1; font-variant-numeric: tabular-nums; }
.watch-temperature-value small { margin-left: 2px; color: var(--color-text-muted); font-size: var(--text-data-sm); font-weight: var(--font-weight-normal); }
.watch-temperature-label { display: inline-block; margin: 0; color: var(--color-text); font-size: var(--text-sm); }
.watch-temperature-scale { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; }
.watch-temperature-marker { position: absolute; top: -4px; z-index: 1; width: 16px; height: 16px; margin-left: -8px; border: 3px solid var(--color-surface); border-radius: 50%; background: var(--color-text-strong); box-shadow: 0 0 0 1px var(--color-line-strong); }
.watch-temperature-scale-label { font-variant-numeric: tabular-nums; text-align: left; }
.watch-temperature-scale-label:nth-last-child(2) { text-align: center; }
.watch-temperature-scale-label:last-child { text-align: right; }
.watch-temperature-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--space-4); }
.watch-temperature-metrics > div { display: grid; gap: var(--space-1); min-width: 0; padding: 9px 0; border-bottom: var(--border-soft); }
.watch-temperature-metrics strong { color: var(--color-text-strong); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.watch-temperature-metrics strong.positive { color: var(--color-data-positive); }
.watch-temperature-metrics strong.negative { color: var(--color-data-negative); }
.watch-temperature-source { padding-top: 2px; }
.watch-temperature-unavailable { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.watch-temperature-unavailable p { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.market-heading .market-open-link { margin-left: auto; font-size: var(--text-xs); }
.market-heading .market-open-link + .market-status { margin-left: 4px; }
@media (max-width: 640px) {
  .watchlist-intro, .watch-section-heading { align-items: flex-start; }
  .watchlist-intro { flex-direction: column; gap: 10px; }
  .watchlist-intro-actions { justify-content: flex-start; gap: 12px; }
  .watch-workspace-tabs { scrollbar-width: none; }
  .watch-workspace-tabs .settings-tab { padding-inline: var(--space-2); }
  .watch-workspace-tabs::-webkit-scrollbar { display: none; }
  .watch-search-form { grid-template-columns: minmax(0, 1fr) auto; }
  .watch-search-form .btn-normal { min-width: 68px; white-space: nowrap; }
  .watch-search-form select { grid-column: 1 / -1; }
  .watch-list { grid-template-columns: 1fr; }
  .watch-item { padding: 14px; }
  .watch-quote { grid-template-columns: 1fr 1fr; gap: 10px; }
  .watch-state { grid-column: 1 / -1; justify-items: start; text-align: left; }
  .watch-temperature-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-temperature-index { font-size: var(--text-data-sm); }
  .watch-temperature-value { font-size: var(--text-data-lg); }
  .watch-temperature-meta .watch-status { flex: none; }
  .watch-temperature-card .watch-a500-columns { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 380px) {
  .watch-temperature-hero { gap: 10px; }
  .watch-temperature-index { font-size: var(--text-data-xs); }
  .watch-dividend-spread strong { font-size: var(--text-data-xs); }
}

.watch-a500-guide { overflow: hidden; border: var(--border-default); border-radius: var(--radius-card); background: var(--color-surface); }
.watch-a500-guide summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; color: var(--color-text-strong); font-size: var(--text-sm); font-weight: var(--font-weight-semibold); cursor: pointer; list-style: none; }
.watch-a500-guide summary::-webkit-details-marker { display: none; }
.watch-a500-guide summary::after { content: "›"; color: var(--color-text-muted); transition: transform var(--ease-standard); }
.watch-a500-guide[open] summary::after { transform: rotate(90deg); }
.watch-a500-guide-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; padding: 0 14px 12px; }
.watch-a500-guide-body section { min-width: 0; padding: 10px 0; border-top: var(--border-soft); }
.watch-a500-guide-body h4 { margin: 0 0 6px; color: var(--color-text-strong); font-size: var(--text-sm); }
.watch-a500-guide-body p, .watch-a500-guide-body li { margin: 4px 0; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.6; }
.watch-a500-guide-body strong { color: var(--color-accent-text); font-variant-numeric: tabular-nums; }
.watch-a500-guide-table { display: grid; gap: 1px; }
.watch-a500-guide-table > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 7px; background: var(--color-bg-muted); color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-a500-guide-table > div > * { min-width: 0; }
.watch-a500-guide-table b { text-align: right; color: var(--color-text); font-weight: var(--font-weight-medium); }
.watch-a500-guide-table .positive { color: var(--color-data-positive); }
.watch-a500-guide-table .warning { color: var(--color-warning-text, var(--color-text-muted)); }
.watch-a500-guide-table .negative { color: var(--color-data-negative); }
.watch-a500-guide-body ul { margin: 0; padding-left: 18px; }
.watch-a500-guide-body li b { color: var(--color-text); }
@media (max-width: 640px) { .watch-a500-guide-body { grid-template-columns: 1fr; } }

.watch-a500-decision { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: var(--border-soft); }
.watch-a500-decision > div:first-child { display: grid; gap: 3px; }
.watch-a500-decision > div:first-child > strong { color: var(--color-text-strong); font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.watch-a500-decision > div:first-child > span:last-child { color: var(--color-text); font-size: var(--text-sm); }
.watch-a500-etf { display: grid; gap: 3px; min-width: 170px; text-align: right; }
.watch-a500-etf span, .watch-a500-etf small { color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-a500-etf strong { color: var(--color-text-strong); font-size: var(--text-body); font-variant-numeric: tabular-nums; }
.watch-a500-trend-block { min-width: 0; }
.watch-a500-trend-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.watch-a500-trend-heading span { color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.watch-a500-trend-block h4 { margin: 0 0 8px; color: var(--color-text-strong); font-size: var(--text-sm); }
.watch-dividend { min-width: 0; }
.watch-dividend-scale .watch-temperature-scale-bar,
.watch-dividend-scale .watch-temperature-scale-ticks { grid-template-columns: 30fr 40fr 30fr; }
.watch-dividend-legend.watch-temperature-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.watch-dividend-hero .watch-temperature-primary { border-top-color: var(--color-line); }
.watch-dividend-hero[data-dividend-signal="buy"] .watch-temperature-primary { border-top-color: #00b473; }
.watch-dividend-hero[data-dividend-signal="hold"] .watch-temperature-primary { border-top-color: #d6a900; }
.watch-dividend-hero[data-dividend-signal="wait"] .watch-temperature-primary { border-top-color: #dc3f3f; }
.watch-dividend-signal { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.watch-dividend-signal .watch-temperature-dot { margin-top: 0; }
.watch-dividend-signal .watch-temperature-label { color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.watch-dividend-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-dividend-sub b { color: var(--color-text); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.watch-dividend-protect { margin: 0; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.5; }
.watch-dividend-yield { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label pct" "value pct"; align-items: center; gap: 4px 16px; min-width: 0; padding: 12px 14px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); }
.watch-dividend-yield > span { grid-area: label; margin: 0; color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-dividend-yield strong { grid-area: value; color: var(--color-text-strong); font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.watch-dividend-yield small { grid-area: pct; color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.watch-dividend-spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 16px 18px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); }
.watch-dividend-spread p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; margin: 0; min-width: 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.watch-dividend-spread strong { color: var(--color-text-strong); font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.watch-dividend-spread > div > small { display: block; margin-top: 4px; color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-dividend-factors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.watch-dividend-factor { display: grid; align-content: start; gap: 4px; min-width: 0; min-height: 52px; padding: 10px 11px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.watch-dividend-factor > span, .watch-dividend-factor .watch-dividend-tag { color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-dividend-factor strong { color: var(--color-text-strong); font-size: var(--text-body); line-height: 1.15; font-variant-numeric: tabular-nums; }
.watch-dividend-factor i { display: block; height: 4px; margin-top: 4px; overflow: hidden; border-radius: var(--radius-pill); background: var(--color-line); }
.watch-dividend-factor b { display: block; height: 100%; border-radius: inherit; background: var(--color-text-muted); }
.watch-dividend-factor[data-dividend-tone="good"] b { background: #00b473; }
.watch-dividend-factor[data-dividend-tone="mid"] b { background: #d6a900; }
.watch-dividend-factor[data-dividend-tone="bad"] b { background: #dc3f3f; }
.watch-dividend-sheet { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.watch-dividend-row { display: grid; align-content: start; gap: 4px; min-width: 0; min-height: 52px; padding: 10px 11px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.watch-dividend-row > div { display: grid; gap: 2px; min-width: 0; }
.watch-dividend-row span { color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-dividend-row b { color: var(--color-text-strong); font-size: var(--text-body); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.watch-dividend-tag { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.3; white-space: nowrap; }
.watch-dividend-tag::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--color-text-muted); }
.watch-dividend-tag[data-dividend-tone="good"]::before { background: #00b473; }
.watch-dividend-tag[data-dividend-tone="mid"]::before,
.watch-dividend-tag[data-dividend-tone="neutral"]::before { background: #d6a900; }
.watch-dividend-tag[data-dividend-tone="bad"]::before { background: #dc3f3f; }
.watch-dividend .watch-a500-trend-hit { cursor: pointer; }
.watch-a500-trend { --trend-color: #6366f1; --trend-fill: rgba(99,102,241,.08); min-width: 0; padding: 12px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); }
.watch-a500-trend-chart { position: relative; margin: 6px 0 0 46px; padding-bottom: 22px; }
.watch-a500-trend svg { display: block; width: 100%; height: 110px; overflow: hidden; }
.watch-a500-trend-line { fill: none; stroke: var(--trend-color); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.watch-a500-trend-area { fill: var(--trend-fill); }
.watch-a500-trend-point { fill: var(--trend-color); }
.watch-a500-trend-hit { fill: transparent; }
.watch-a500-trend-grid { fill: none; stroke: var(--color-line-soft, var(--color-line)); stroke-width: .6; vector-effect: non-scaling-stroke; }
.watch-a500-trend-axis { position: absolute; inset: 0 auto auto -46px; width: 40px; height: 110px; }
.watch-a500-trend-axis span, .watch-a500-trend-dates span { position: absolute; color: var(--color-text-muted); font-size: 9px; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.watch-a500-trend-axis span { right: 0; transform: translateY(-50%); }
.watch-a500-trend-dates { position: relative; height: 0; margin-top: 10px; }
.watch-a500-trend-dates span { transform: translateX(-50%); }
.watch-a500-trend-dates span:first-child { transform: none; }
.watch-a500-trend-dates span:last-child:not(:first-child) { transform: translateX(-100%); }
.watch-a500-trend-zone-cold { fill: rgba(59,130,246,.06); }
.watch-a500-trend-zone-normal { fill: rgba(16,185,129,.04); }
.watch-a500-trend-zone-hot { fill: rgba(245,158,11,.06); }
.watch-a500-trend-zone-overheated { fill: rgba(239,68,68,.06); }
.theme-dark .watch-a500-trend, .theme-dark .sentiment .chart { --trend-color: #a5a6ff; --trend-fill: rgba(165, 166, 255, 0.12); }
@media (max-width: 640px) {
  .watch-a500-columns { grid-template-columns: 1fr; }
  .watch-a500-trend-dates span:nth-child(even):not(:last-child) { display: none; }
}
.watch-a500-line-sections { display: grid; gap: 16px; }
.watch-a500-line-section { padding-top: 12px; border-top: var(--border-default); }
/* 经济温度子页：各主线指标收在折叠卡里，外观同下方「经济健康指南」 */
.watch-macro-indicators > .watch-a500-line-sections { padding: 0 14px 14px; }
.watch-a500-line-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.watch-a500-line-heading > div { display: grid; gap: 3px; }
.watch-a500-line-heading strong { color: var(--color-text-strong); font-size: var(--text-sm); }
.watch-a500-line-heading span { color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-a500-line-heading > b { color: var(--color-text-strong); font-size: var(--text-body); font-variant-numeric: tabular-nums; }
.watch-transition-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 16px; }
.watch-transition-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: 5px 8px; min-width: 0; padding: 12px 0; border-top: var(--border-soft); }
.watch-transition-line > div:first-child { display: flex; justify-content: space-between; gap: 5px; color: var(--color-text-strong); font-size: var(--text-sm); }
.watch-transition-line > div:first-child small, .watch-transition-line > small { color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.5; }
.watch-transition-line > b { color: var(--color-text-strong); font-size: var(--text-title); font-variant-numeric: tabular-nums; }
.watch-transition-line > span, .watch-transition-line > .watch-transition-bar, .watch-transition-line > small { grid-column: 1 / -1; }
.watch-transition-line > span { color: var(--color-text); font-size: var(--text-xs); }
.watch-transition-bar { height: 5px; border-radius: var(--radius-pill); background: var(--color-line); }
.watch-transition-bar i { display: block; height: 100%; border-radius: inherit; background: var(--color-accent); }
.watch-transition-warning { margin: 0; padding: 10px 12px; border-top: 2px solid var(--color-warning-strong); color: var(--color-text); background: var(--color-warning-soft); font-size: var(--text-xs); line-height: 1.6; overflow-wrap: anywhere; }
.watch-transition-info { grid-column: 1 / -1; font-size: var(--text-xs); }
.watch-transition-info summary { width: fit-content; color: var(--color-accent-text); cursor: pointer; }
.watch-transition-info > div { padding: 8px 10px; border-left: 2px solid var(--color-line); color: var(--color-text-muted); line-height: 1.6; }
.watch-transition-info h5 { margin: 0 0 6px; color: var(--color-text); font-size: var(--text-xs); }
.watch-transition-info p { margin: 4px 0; }
.watch-transition-guide-indicators { grid-column: 1 / -1; }
.watch-transition-guide-indicator { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2px 12px; padding: 8px 0; border-top: var(--border-soft); color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-transition-guide-indicator > * { min-width: 0; }
.watch-transition-guide-indicator > span:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.watch-transition-guide-indicator strong { color: var(--color-text); }
.watch-transition-guide-indicator > small { grid-column: 1 / -1; overflow-wrap: anywhere; }
@media (max-width: 900px) { .watch-transition-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .watch-transition-overview, .watch-transition-guide-indicator { grid-template-columns: 1fr; }
  .watch-transition-guide-indicator > small { grid-column: 1; }

  .watch-a500-decision { align-items: flex-start; flex-direction: column; gap: 12px; }
  .watch-a500-etf { min-width: 0; text-align: left; }
  .watch-quote { grid-template-columns: minmax(0, 1fr) minmax(82px, .8fr); }
  .watch-rule-actions { align-items: flex-start; flex-direction: column; }
  .watch-rule-note { max-width: 100%; }
}

/* Market workspace：四个页签就是公共胶囊本身（尺寸、描边、选中态、交互态全部由 .settings-tab 给出），
   页面侧只剩研究面板的容器与区块描边。 */
.watch-a500.watch-panel { border: var(--border-default); box-shadow: var(--shadow-sm); }
.watch-a500 .section-head { padding-bottom: 14px; border-bottom: var(--border-default); }
.watch-a500 .section-meta { color: var(--color-text-muted); }
.watch-temperature-primary { padding: 16px 18px; border-top: 2px solid var(--color-accent); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.watch-temperature-quote { padding: 16px 18px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); }
.watch-temperature-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); }
.watch-temperature-metrics > div { padding: 10px var(--space-3); border: var(--border-default); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.watch-temperature-metrics strong { font-size: var(--text-body); }
.watch-temperature-scale { margin: 2px 0 4px; }
.watch-a500-core-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.watch-a500-core-metrics > div { border: 1px solid var(--color-line); }
.watch-a500-decision { padding: 16px 18px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.watch-a500-decision > div:first-child > strong { font-size: 44px; }
.watch-a500-etf { padding-left: 18px; border-left: 1px solid var(--color-line); }
.watch-transition-overview { gap: 0 16px; }
.watch-a500-indicator { padding: 10px 0; }
@media (max-width: 900px) {
  .watch-temperature-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .watch-a500-core-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .watch-a500.watch-panel { box-shadow: none; }
  .watch-temperature-hero { grid-template-columns: 1fr; }
  .watch-temperature-primary, .watch-temperature-quote { padding: 13px 14px; }
  .watch-temperature-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-a500-core-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-a500-etf { padding-left: 0; border-left: 0; }
  .watch-dividend-yield, .watch-dividend-spread { padding: 13px 14px; }
  .watch-dividend-yield { grid-template-columns: 1fr; grid-template-areas: "label" "value" "pct"; justify-items: start; }
  .watch-dividend-yield strong { font-size: 20px; }
  .watch-dividend-spread strong { font-size: 24px; }
  .watch-dividend-yield small { white-space: normal; }
  .watch-dividend-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .watch-dividend-factors { grid-template-columns: 1fr; }
  .watch-dividend-factor { min-height: 0; }
}

/* Shared research surface: one VPush rhythm across all four tabs. */
.watch-temperature-scale { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 0; }
.watch-temperature-scale::before { display: none; }
.watch-temperature-scale-bar { position: relative; display: grid; grid-template-columns: 30fr 30fr 20fr 20fr; gap: 2px; height: 10px; }
.watch-temperature-segment { display: block; height: 10px; }
.watch-temperature-segment:first-child { border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
.watch-temperature-segment:last-of-type { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.watch-temperature-segment-deep { background: #00754b; }
.watch-temperature-segment-cold { background: #00b473; }
.watch-temperature-segment-normal { background: #ffd02f; }
.watch-temperature-segment-hot { background: #ff8a3d; }
.watch-temperature-segment-overheated { background: #ff5a5a; }
.watch-temperature-marker { top: -7px; width: 24px; height: 24px; margin-left: -12px; border: 3px solid var(--color-surface); background: var(--color-text-strong); box-shadow: 0 1px 0 1px var(--color-line-strong); }
.watch-temperature-marker b { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: var(--color-text-strong); font-size: var(--text-xs); font-weight: var(--font-weight-semibold); font-variant-numeric: tabular-nums; }
.watch-temperature-scale-ticks { display: grid; grid-template-columns: 30fr 30fr 20fr 20fr; gap: 0; padding-top: 22px; }
.watch-temperature-scale-ticks span { display: grid; min-width: 0; gap: 2px; color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.watch-temperature-scale-ticks b, .watch-temperature-scale-ticks small { display: block; min-width: 0; white-space: nowrap; }
.watch-temperature-scale-ticks span:nth-child(2), .watch-temperature-scale-ticks span:nth-child(3) { text-align: center; }
.watch-temperature-scale-ticks span:last-child { text-align: right; }
.watch-temperature-scale-ticks b { color: var(--color-text); font-weight: var(--font-weight-medium); }
.watch-temperature-scale-ticks small { font-size: inherit; }
.watch-temperature-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 0; border-top: var(--border-soft); border-bottom: var(--border-soft); color: var(--color-text-muted); font-size: var(--text-xs); }
.watch-temperature-actions span { display: flex; align-items: flex-start; gap: 6px; min-width: 0; line-height: 1.4; }
.watch-temperature-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: var(--color-text-muted); }
.watch-temperature-dot-deep { background: #006b44; }
.watch-temperature-dot-cold { background: #00b473; }
.watch-temperature-dot-normal { background: #d6a900; }
.watch-temperature-dot-hot { background: #e06a00; }
.watch-temperature-dot-overheated { background: #dc3f3f; }
.watch-a500-panel-body, .watch-temperature-card { gap: 20px; }
.watch-a500-source, .watch-temperature-source { margin: 0; padding-top: 10px; border-top: var(--border-soft); }
.watch-a500-columns { gap: 14px; }
.watch-a500-guide { border-radius: var(--radius-sm); }
.watch-a500-guide summary { min-height: 42px; }
.watch-a500-metrics > div, .watch-a500-line-grid > div, .watch-temperature-metrics > div { min-height: 52px; }
.watch-transition-overview > div { min-height: 78px; }
@media (max-width: 900px) {
  .watch-temperature-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 9px; }
}
@media (max-width: 640px) {
  .watch-temperature-actions { gap: 6px; }
  .watch-temperature-scale-ticks { padding-top: 20px; }
  .watch-temperature-scale-ticks span { font-size: var(--text-2xs); }
  .watch-temperature-marker b { top: 24px; font-size: var(--text-2xs); }
  .watch-temperature-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-a500-metrics > div, .watch-a500-line-grid > div, .watch-temperature-metrics > div { min-height: 48px; }
}
@container etf-pct (max-width: 720px) {
  .etf-pct .watch-temperature-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .etf-pct .watch-temperature-scale-ticks { padding-top: 18px; }
  .etf-pct .watch-temperature-scale-ticks span { font-size: 10px; }
  .etf-pct .watch-temperature-marker b { top: 16px; font-size: 11px; }
}
/* ETF 卡片和溢价提醒里的分位尺只读：小圆点，不要行情温度那种大滑块。 */
.etf-pct .watch-temperature-marker {
  top: -1px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border: 0;
  border-radius: 50%;
  background: var(--color-text-strong);
  box-shadow: none;
}
.etf-pct .watch-temperature-marker b { top: 16px; font-size: 11px; }
.etf-pct .watch-temperature-scale-ticks { padding-top: 18px; }

.sentiment { display: grid; gap: 22px; }
.sentiment > .block { display: flex; flex-direction: column; gap: 20px; padding-top: 22px; border-top: 1px solid var(--color-line); }
.sentiment .head h2 { margin: 0; font-size: var(--text-body); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.sentiment .head p { margin: 4px 0 0; }
.sentiment-bar { position: relative; display: grid; grid-template-columns: 10fr 20fr 40fr 20fr 10fr; gap: 2px; height: 10px; margin: 0; }
.sentiment-bar i { display: block; height: 10px; }
.sentiment-bar-even { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sentiment-bar i:first-child { border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
.sentiment-bar i:last-of-type { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.sentiment-legend, .sentiment-chips { display: grid; gap: 8px; margin-top: 0; }
.sentiment-legend { padding: 10px 0; border-top: var(--border-soft); border-bottom: var(--border-soft); }
.sentiment-legend { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sentiment-legend span, .sentiment-chip small, .sentiment .watch-temperature-metrics small { color: var(--color-text-muted); font-size: var(--text-xs); }
.sentiment-legend span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sentiment-legend b, .sentiment-chip b { color: var(--color-text); font-weight: var(--font-weight-medium); }
.sentiment-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.msasi .sentiment-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sentiment-chip { display: grid; gap: 3px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); text-align: left; }
.sentiment-chip[aria-pressed="true"] { border-color: var(--color-accent); background: var(--color-accent-soft); }
.sentiment-chip strong { color: var(--color-text-strong); font-size: var(--text-body); font-variant-numeric: tabular-nums; }
.sentiment-chip[disabled] { opacity: .55; cursor: default; }
.msasi-method { font-size: var(--text-xs); color: var(--color-text-muted); }
.msasi-method summary { cursor: pointer; color: var(--color-text); font-weight: var(--font-weight-medium); }
.msasi-method p, .msasi-method ul { margin: 8px 0 0; line-height: 1.6; }
.msasi-method ul { padding-left: 18px; }
.msasi-method b { color: var(--color-text); font-weight: var(--font-weight-medium); }
.sentiment-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0; }
.sentiment .pill { min-height: 32px; padding: 0 12px; border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text-muted); font-size: var(--text-xs); }
.sentiment .pill[aria-pressed="true"] { border-color: var(--color-accent); background: var(--color-accent); color: var(--color-white); }
.sentiment .factors { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.sentiment .factor { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; min-height: 52px; padding: 10px 11px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.sentiment .factor .name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--color-text-muted); font-size: var(--text-xs); }
.sentiment .factor strong { color: var(--color-text-strong); font-size: var(--text-body); font-variant-numeric: tabular-nums; }
.sentiment .factor small { grid-column: 1 / -1; color: var(--color-text-muted); font-size: var(--text-xs); }
.sentiment .tag { padding: 2px 6px; border-radius: 6px; background: var(--color-surface); color: var(--color-text-muted); font-size: var(--text-xs); }
.sentiment .chart { min-width: 0; padding: 12px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); --trend-color: #6366f1; --trend-fill: rgba(99, 102, 241, 0.08); }
.sentiment .chart-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-top: 0; }
.sentiment .chart-head h3 { margin: 0; font-size: var(--text-sm); color: var(--color-text-strong); }
.sentiment .chart-head span, .sentiment .dates { color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.sentiment .dates { display: flex; justify-content: space-between; }
.sentiment .trend { display: block; width: 100%; height: 148px; }
.sentiment .trend-line { fill: none; stroke: var(--trend-color); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.sentiment .trend-area { fill: var(--trend-fill); }
.sentiment .trend-grid { stroke: var(--color-line-soft); stroke-width: 1; }
.sentiment .trend-axis { fill: var(--color-text-muted); font-size: 11px; }
.sentiment .sentiment-avg { stroke: var(--color-text-faint); stroke-dasharray: 3 3; }
.sentiment-a500, .spread-lines { display: grid; gap: 8px 16px; }
.sentiment-a500 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 0; }
.sentiment-a500 div, .spread-lines span { display: grid; gap: 4px; min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--color-line-soft); }
.sentiment-a500 div { min-height: 52px; padding: 10px 11px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.sentiment-a500 span, .spread-lines span { color: var(--color-text-muted); font-size: var(--text-xs); }
.sentiment-a500 strong { color: var(--color-text-strong); font-size: var(--text-body); font-variant-numeric: tabular-nums; }
.sentiment-us { margin: 0; padding: 0; background: transparent; }
.sentiment-us h2 { margin: 0; color: var(--color-text-strong); }
.watch-us-history .watch-a500-trend-heading { flex-wrap: wrap; margin-bottom: var(--space-2); }
.watch-us-history .watch-a500-trend { --trend-color: var(--color-accent); }
.watch-us-history .watch-a500-trend-chart { padding-bottom: 0; }
.watch-us-history .watch-a500-trend svg { box-sizing: content-box; width: calc(100% - 24px); height: 220px; padding: 12px; overflow: visible; }
.watch-us-history .watch-a500-trend-axis { top: 12px; height: 220px; }
.watch-us-history .watch-a500-trend-axis span { font-size: var(--text-2xs); }
.watch-us-history .watch-a500-trend-line { stroke-width: 2; }
.watch-us-history .watch-a500-trend-grid { stroke-width: 1; }
.watch-us-history-mark, .watch-us-history .watch-a500-trend-hit { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.watch-us-history .watch-a500-trend-point { stroke: var(--trend-color); stroke-width: 8; }
.watch-us-history-ring { stroke: var(--color-surface); stroke-width: 12; }
.watch-us-history .watch-a500-trend-hit { stroke: transparent; stroke-width: 24; pointer-events: stroke; }
.watch-us-history-observation:not([data-us-history-visible]) .watch-us-history-mark { opacity: 0; }
.watch-us-history-observation:hover .watch-us-history-mark,
.watch-us-history-observation:focus .watch-us-history-mark { opacity: 1; }
.watch-us-history-band { fill: var(--color-surface-muted); }
.watch-us-history-band:nth-child(even) { fill: var(--color-surface); }
.watch-us-history-crosshair { display: none; fill: none; stroke: var(--color-text-muted); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.watch-us-history-observation:focus { outline: var(--outline-focus); outline-offset: 2px; }
/* Shared selection for line charts: crosshair + dot in the plot, exact value and date below it. */
.watch-a500-trend svg[data-trend-chart] { touch-action: pan-y; }
.watch-a500-trend svg[data-trend-chart]:focus-visible { outline: var(--outline-focus); outline-offset: 2px; }
.watch-a500-trend svg [hidden] { display: none; }
.watch-trend-crosshair { fill: none; stroke: var(--color-text-muted); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.watch-trend-mark { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.watch-trend-ring { stroke: var(--color-surface); stroke-width: 12; }
.watch-trend-dot { stroke: var(--trend-color); stroke-width: 8; }
.watch-trend-readout { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0 0; color: var(--color-text-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.watch-trend-readout strong { color: var(--color-text-strong); }
.watch-us-history-dates { display: flex; justify-content: space-between; gap: var(--space-2); margin: 0 12px; color: var(--color-text-muted); font-size: var(--text-2xs); font-variant-numeric: tabular-nums; }
.watch-us-history-note { margin: var(--space-2) 0 0; color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.6; }
.watch-us-history-table { margin-top: var(--space-3); color: var(--color-text); font-size: var(--text-sm); }
.watch-us-history-table summary { width: fit-content; min-height: var(--control-height-touch); align-content: center; cursor: pointer; }
.watch-us-history-table summary:focus-visible { outline: var(--outline-focus); outline-offset: 2px; }
.watch-us-history-table table { width: 100%; font-variant-numeric: tabular-nums; }
.watch-us-history-table caption { padding: var(--space-2) 0; text-align: left; color: var(--color-text-muted); }
.watch-us-history-table th, .watch-us-history-table td { padding: var(--space-2); text-align: left; }
.watch-us-history-table td { text-align: right; }
@media (forced-colors: active) {
  .watch-us-history .watch-a500-trend-line, .watch-us-history-crosshair, .watch-trend-crosshair, .watch-trend-dot { stroke: CanvasText; }
  .watch-us-history .watch-a500-trend-point { stroke: CanvasText; }
  .watch-us-history-ring, .watch-trend-ring { stroke: Canvas; }
}
/* FED difference: one primary reading; the percentile and derived temperature are secondary. */
.watch-bond { display: grid; gap: var(--space-4); min-width: 0; }
.watch-bond-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); }
.watch-bond-head > div { min-width: 0; }
.watch-bond-head .section-meta { font-size: var(--text-sm); line-height: 1.6; overflow-wrap: anywhere; }
.watch-bond-head .btn-ghost { min-height: var(--control-height-touch); flex: none; font-size: var(--text-sm); }
.watch-bond-primary { display: grid; gap: var(--space-2); }
.watch-bond-asof { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.watch-bond-query { margin-left: var(--space-2); color: var(--color-text-muted); font-size: var(--text-sm); }
.watch-bond-primary .watch-temperature-value { font-size: 48px; font-variant-numeric: normal; }
.watch-bond-primary .watch-temperature-score > span { color: var(--color-text-muted); font-size: var(--text-sm); }
.watch-bond-primary .watch-bond-rating { color: var(--color-text); }
.watch-bond-note { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.6; overflow-wrap: anywhere; }
.watch-bond [data-bond-read-state]:empty { display: none; }
.watch-bond [data-bond-read-state]:not(:empty) { color: var(--color-text); }
.watch-bond-secondary { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-4); padding-block: var(--space-3); border-block: var(--border-soft); }
.watch-bond-secondary > div { min-width: 0; }
.watch-bond-secondary p { margin: 0; line-height: 1.6; }
.watch-bond-secondary strong { margin-inline: var(--space-1); color: var(--color-text-strong); font-size: var(--text-body); }
.watch-bond-meter { display: flex; align-items: center; gap: var(--space-2); margin-block: var(--space-1); color: var(--color-text-muted); font-size: var(--text-sm); }
.watch-bond-meter meter { width: 100%; height: 12px; accent-color: var(--color-accent); }
.watch-bond-meter meter::-webkit-meter-bar { border: 0; background: var(--color-accent-soft); }
.watch-bond-meter meter::-webkit-meter-optimum-value { background: var(--color-accent); }
.watch-bond-meter meter::-moz-meter-bar { background: var(--color-accent); }
.watch-bond-method { margin-top: 0; }
.watch-bond-method p { line-height: 1.65; overflow-wrap: anywhere; }
.watch-bond-method table th { font-weight: var(--font-weight-medium); }
.watch-bond-history .watch-a500-trend, .theme-dark .watch-bond-history .watch-a500-trend { --trend-color: var(--color-accent); }
.watch-bond-history svg:focus-visible { outline: var(--outline-focus); outline-offset: 2px; }
.watch-bond-history svg [hidden] { display: none; }
.watch-bond-crosshair, .watch-bond-mean { fill: none; stroke: var(--color-text-muted); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.watch-bond-mean { stroke-dasharray: 5 4; }
.watch-bond-mean-key::before { content: ""; display: inline-block; width: 24px; margin-right: var(--space-2); border-top: 1px dashed var(--color-text-muted); vertical-align: middle; }
.watch-bond-tooltip { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.watch-bond-tooltip strong { color: var(--color-text-strong); font-variant-numeric: tabular-nums; }
.watch-bond-history .watch-us-history-table { max-width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--color-text-faint) var(--color-bg-muted); }
@media (max-width: 640px) {
  /* The bond tab already identifies the metric: omit its duplicate heading and signal navigation. */
  .watch-bond-active > .section-head, .watch-bond-active > [data-market-signal="temperature"] { display: none; }
  .watch-bond-active .market-subtabs { margin-bottom: var(--space-5); }
  .watch-bond-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .watch-bond-secondary > div > p { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); font-size: var(--text-sm); }
  .watch-bond-secondary strong { margin: 0; font-size: 20px; line-height: 1.4; }
  .watch-bond-query { margin: 0; }
  .watch-bond-meter { display: none; } /* The same value remains visible as n/100 above. */
  .watch-bond-history .watch-a500-trend-heading { align-items: flex-start; gap: var(--space-2); }
  .watch-bond-head { flex-wrap: nowrap; gap: var(--space-2); }
  .watch-bond-head .btn-ghost { padding-inline: var(--space-3); }
  .watch-bond-method > summary, .watch-bond-history details > summary { width: 100%; line-height: 1.6; }
}
@media (forced-colors: active) {
  .watch-bond-crosshair, .watch-bond-mean { stroke: CanvasText; }
}
.sentiment .watch-temperature-hero { align-items: stretch; }
.sentiment .watch-temperature-hero > :only-child { grid-column: 1 / -1; }
.sentiment .watch-temperature-metrics { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.national-team .watch-temperature-metrics,
.dividend-spread .watch-temperature-metrics { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.dividend-spread { display: grid; gap: 12px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--color-line); }
.dividend-spread h3 { margin: 0; font-size: var(--text-body); color: var(--color-text-strong); }
.spread-lines { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.spread-lines span { padding: 10px 12px; border: 0; border-radius: 12px; background: var(--color-bg-muted); }
.dividend-spread .positive, .national-team .positive { color: var(--color-data-positive); }
.dividend-spread .negative, .national-team .negative { color: var(--color-data-negative); }
.national-team .trend rect.positive { color: var(--color-data-positive); }
.national-team .trend rect.negative { color: var(--color-data-negative); }
.national-team { display: grid; gap: 14px; }
.national-team .watch-workspace-tabs { margin: 0; }
.national-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.national-kpis b.positive { color: var(--color-data-positive); }
.national-kpis b.negative { color: var(--color-data-negative); }
.national-margin-note > span { display: block; }
.national-kpis div { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.national-kpis span, .national-kpis small { color: var(--color-text-muted); font-size: var(--text-xs); }
.national-kpis strong { color: var(--color-text-strong); font-size: 22px; font-variant-numeric: tabular-nums; }
.national-toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.national-toolbar h4, .national-team section h4 { margin: 0; font-size: var(--text-body); color: var(--color-text-strong); }
.national-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--color-text-muted); font-size: var(--text-xs); }
.national-toolbar select { min-height: 36px; }
.national-table-wrap { overflow-x: auto; }
.national-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.national-table th, .national-table td { padding: 8px 6px; border-bottom: 1px solid var(--color-line-soft); text-align: right; white-space: nowrap; }
.national-table th:nth-child(-n+3), .national-table td:nth-child(-n+3), .national-table td.note { text-align: left; }
.national-table td.note { white-space: normal; min-width: 12em; max-width: 22em; }
.national-table button { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.national-table tbody th { background: transparent; color: inherit; }
.national-table tr.is-selected th, .national-table tr.is-selected td { background: var(--color-bg-muted); }
.national-table tr.is-total { font-weight: 600; }
.national-method { color: var(--color-text-muted); font-size: var(--text-xs); }
.national-method summary { cursor: pointer; color: var(--color-text-strong); }
/* National ETF workspace: retain the market tokens; today is emphasized, references use line styles. */
#watch-panel-national, .national-workspace, .national-panel, .national-team > * { min-width: 0; max-width: 100%; }
.national-tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); border-bottom: var(--border-default); }
.national-tab { min-height: var(--control-height-touch); padding: var(--space-2) var(--space-3); margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--color-text-muted); font-size: var(--text-sm); white-space: nowrap; }
.national-tab.active { border-bottom-color: var(--color-accent); color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.national-tab:hover { color: var(--color-text-strong); background: var(--color-bg-muted); }
.national-panel[hidden], .market-subpanel[hidden] { display: none; }
.market-subtabs { min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--color-text-faint) var(--color-bg-muted); }
.market-subtabs .national-tab { flex: 0 0 auto; margin-bottom: 0; }
.market-subtabs .national-tab:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -3px; }
.market-subpanel { display: grid; min-width: 0; gap: var(--space-4); }
.sentiment > .market-subpanel > .block { display: flex; flex-direction: column; gap: var(--space-4); }
[data-a500-dividend]:has(+ .market-subpanel:not([hidden])) { display: none; }

/* 市场冷暖/红利低波：子标签上方的信号条，复用 national-signal-grid 格子 */
.market-signal { margin-bottom: var(--space-3); }
.market-signal .national-signal-grid { margin-bottom: 0; }
.market-signal-tabs button.market-signal-cell { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.market-signal-tabs button.market-signal-cell span { color: var(--color-text-muted); font-size: var(--text-xs); }
.market-signal-tabs button.market-signal-cell strong { color: var(--color-text-strong); font-size: 22px; font-variant-numeric: tabular-nums; }
.market-signal-tabs button.market-signal-cell small { color: var(--color-text-muted); font-size: var(--text-xs); }
.market-signal-tabs button.market-signal-cell:hover { border-color: var(--color-line-strong); }
.market-signal-tabs button.market-signal-cell:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.market-signal-tabs button.market-signal-cell[aria-current="true"] { border-color: var(--color-accent); background: var(--color-accent-soft); }
@media (max-width: 640px) {
  /* 市场冷暖六格：手机上排成 3×2，不压成六行把子标签挤出首屏 */
  .national-signal-grid.market-signal-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-signal-tabs button.market-signal-cell { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .market-signal-tabs button.market-signal-cell > small { grid-column: 1 / -1; }
  .market-signal-tabs button.market-signal-cell strong { font-size: 20px; }
}

.national-team p { margin-block: 0; line-height: 1.65; }
.national-live-head, .national-live-status, .national-live-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.national-live-head { justify-content: space-between; }
.national-live-status { font-size: var(--text-sm); color: var(--color-text-muted); }
.national-live-status .watch-status { display: inline-flex; align-items: center; gap: var(--space-1); }
.national-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.national-live-actions { flex-shrink: 0; gap: var(--space-2); }
.national-live-actions .btn-ghost, .national-toolbar .btn-ghost { min-height: var(--control-height-touch); font-size: var(--text-sm); }
.national-live-meta { overflow-wrap: anywhere; }
.national-cache-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); overflow-wrap: anywhere; }
.national-cache-status strong { color: var(--color-text); font-weight: var(--font-weight-medium); }
.national-warning { display: grid; gap: var(--space-1); padding: var(--space-3); margin-bottom: var(--space-2); border: var(--border-default); border-radius: var(--radius-control); background: var(--color-warning-soft); color: var(--color-text); font-size: var(--text-xs); }
.national-warning .btn-ghost { justify-self: start; margin-top: var(--space-1); }
.national-row-warning { color: var(--color-text-strong); font-weight: var(--font-weight-medium); }
.national-intraday-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.national-intraday-kpis strong.positive, .national-table td.positive { color: var(--color-data-positive); }
.national-intraday-kpis strong.negative, .national-table td.negative { color: var(--color-data-negative); }
.national-intraday-kpis strong { font-size: var(--text-data-xs); font-variant-numeric: normal; overflow-wrap: anywhere; }
.national-intraday-kpis strong small { font-weight: var(--font-weight-normal); }
.national-intraday-kpis .national-core-kpi { grid-column: 1 / -1; }
.national-intraday-empty { padding: var(--space-5) 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.national-intraday-empty strong { display: block; margin-bottom: var(--space-2); color: var(--color-text-strong); }
.national-chart-section { display: grid; gap: var(--space-3); padding-top: var(--space-4); border-top: var(--border-default); }
.national-chart-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-3); }
.national-chart-heading span, .national-chart-hint { color: var(--color-text-muted); font-size: var(--text-xs); }
.national-chart-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: var(--text-xs); color: var(--color-text-muted); }
.national-chart-legend > span { display: inline-flex; align-items: center; gap: var(--space-2); }
.national-series-today { --national-series-color: var(--color-accent); }
.national-series-previous { --national-series-color: var(--color-text-muted); }
.national-series-baseline { --national-series-color: var(--color-text-subtle); }
.national-legend-line { width: 24px; height: 0; border-top: 2px solid var(--national-series-color); }
.national-legend-line.national-series-previous { border-top-style: dashed; }
.national-legend-line.national-series-baseline { border-top-style: dotted; }
.national-plot-section { display: grid; gap: var(--space-2); min-width: 0; }
.national-plot-section h5, .national-plot-empty h5, .national-history h5 { margin: 0; color: var(--color-text); font-size: var(--text-xs); font-weight: var(--font-weight-medium); }
.national-plot { position: relative; min-width: 0; margin-left: 44px; }
.national-plot:focus-visible, .national-table-wrap:focus-visible, .national-data-table summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.national-plot-canvas { position: relative; width: 100%; }
.national-plot svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.national-minute-grid { fill: none; stroke: var(--color-line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.national-minute-line { fill: none; stroke: var(--national-series-color); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.national-minute-line.national-series-previous { stroke-dasharray: 7 5; }
.national-minute-line.national-series-baseline { stroke-dasharray: 2 4; }
.national-minute-bar { fill: var(--color-accent); }
.national-minute-bar.is-current { fill: var(--color-text-strong); }
/* 上午与下午在 11:30/13:00 处首尾相接，只画一条细分隔线 */
.national-session-divider { fill: none; stroke: var(--color-line-strong); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.national-y-axis { position: absolute; top: 0; bottom: 30px; left: -44px; width: 38px; }
.national-y-axis span { position: absolute; right: 0; transform: translateY(-50%); }
.national-x-axis { position: relative; height: 22px; margin-top: var(--space-2); }
.national-x-axis span { position: absolute; transform: translateX(-50%); }
.national-x-axis span:first-child { transform: none; }
.national-x-axis span:last-child { transform: translateX(-100%); }
.national-y-axis span, .national-x-axis span { font-size: var(--text-2xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.national-end-dot { position: absolute; width: 12px; height: 12px; border: 2px solid var(--color-surface); border-radius: 50%; background: var(--national-series-color); transform: translate(-50%, -50%); pointer-events: none; }
.national-end-label { position: absolute; padding-inline: 2px; transform: translate(8px, -50%); background: var(--color-surface); color: var(--color-text); font-size: var(--text-2xs); line-height: 1.4; white-space: nowrap; pointer-events: none; }
.national-end-label.is-before { transform: translate(calc(-100% - 8px), -50%); }
.national-end-leader { fill: none; stroke: var(--color-text-faint); stroke-width: 1; vector-effect: non-scaling-stroke; }
.national-chart-cursor { position: absolute; top: 0; width: 1px; height: 100%; background: var(--color-text-muted); pointer-events: none; }
.national-chart-cursor[hidden] { display: none; }
.national-plot-empty { display: grid; gap: var(--space-2); min-height: 80px; align-content: center; color: var(--color-text-muted); font-size: var(--text-xs); }
.national-chart-tooltip { display: grid; gap: var(--space-2); padding: var(--space-3); border: var(--border-default); border-radius: var(--radius-control); background: var(--color-bg-muted); }
.national-chart-tooltip.is-floating { position: fixed; z-index: 50; width: min(320px, calc(100vw - 16px)); pointer-events: none; background: var(--color-surface); }
.national-chart-tooltip.is-floating > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.national-chart-tooltip > strong { font-size: var(--text-xs); color: var(--color-text); font-weight: var(--font-weight-medium); }
.national-chart-tooltip > div { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2) var(--space-3); }
.national-chart-tooltip span { display: grid; gap: var(--space-1); min-width: 0; }
.national-chart-tooltip b { font-size: var(--text-sm); color: var(--color-text-strong); overflow-wrap: anywhere; }
.national-chart-tooltip small { color: var(--color-text-muted); font-size: var(--text-xs); }
.national-intraday.is-refreshing .national-chart-section { opacity: .7; }
.national-data-table { min-width: 0; color: var(--color-text-muted); font-size: var(--text-xs); }
.national-data-table summary { min-height: var(--control-height-touch); padding-block: var(--space-3); color: var(--color-text); cursor: pointer; }
.national-table-wrap { min-width: 0; max-width: 100%; overscroll-behavior-x: contain; scrollbar-color: var(--color-text-faint) var(--color-bg-muted); scrollbar-width: thin; }
.national-table caption { padding-block: var(--space-2); text-align: left; color: var(--color-text-muted); font-size: var(--text-xs); }
.national-table th[scope="row"] { font-weight: var(--font-weight-normal); }
.national-table .is-total th[scope="row"] { font-weight: var(--font-weight-semibold); }
.national-table small, .national-selected-meta small { display: block; margin-top: var(--space-1); font-size: var(--text-xs); color: var(--color-text-muted); white-space: normal; }
.national-table .national-row-warning { color: var(--color-text-strong); }
.national-table button { min-height: var(--control-height-touch); }
.national-table tr.is-stale small { font-weight: var(--font-weight-medium); }
.national-minute-table th:not(:first-child), .national-minute-table td, .national-history .national-table th:not(:first-child), .national-history .national-table td { text-align: right; }
.national-contributions { display: grid; gap: var(--space-3); min-width: 0; }
.national-toolbar label, .national-toolbar select { min-width: 0; max-width: 100%; }
.national-toolbar select { width: auto; min-height: var(--control-height-touch); }
.national-reference { gap: var(--space-6); }
.national-reference > section { display: grid; gap: var(--space-3); min-width: 0; }
.national-reference .national-method p { margin-top: var(--space-3); }
.national-selected-meta { color: var(--color-text-muted); font-size: var(--text-xs); }
/* Compact daily rows; provenance stays available in a full-width disclosure row. */
.national-daily-ledger { display: grid; gap: var(--space-3); min-width: 0; }
.national-daily-ledger h4 { margin: 0 0 var(--space-2); font-size: var(--text-body); }
.national-daily-table-wrap { container-type: inline-size; width: 100%; }
.national-daily-table { min-width: 960px; }
.national-daily-table thead th, .national-daily-table .national-summary-row > * { padding-block: var(--space-1); vertical-align: middle; }
.national-daily-table .national-summary-row { height: 52px; }
.national-column-unit { display: block; color: var(--color-text-muted); font-size: var(--text-2xs); font-weight: var(--font-weight-normal); line-height: 1.4; }
.national-daily-table thead th:last-child { text-align: left; }
.national-daily-table .national-state-cell { min-width: 116px; text-align: left; }
.national-daily-table .national-state-button { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); width: 100%; text-align: left; color: var(--color-text); line-height: 1.35; }
.national-state-button.has-issue > span { font-weight: var(--font-weight-medium); }
.national-state-secondary { display: block; margin-top: 2px; color: var(--color-text-muted); font-size: var(--text-2xs); font-weight: var(--font-weight-normal); }
.national-state-button svg { flex: 0 0 16px; transition: transform var(--ease-standard); }
.national-state-button[aria-expanded="true"] svg { transform: rotate(90deg); }
.national-state-button:hover, .national-detail-heading button:hover { color: var(--color-accent-text); }
.national-state-button:focus-visible, .national-detail-heading button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.national-daily-table .national-detail-row[hidden] { display: none; }
.national-daily-table .national-detail-row > td { padding: 0; text-align: left; white-space: normal; background: var(--color-bg-muted); }
.national-row-detail { position: sticky; left: 0; width: 100%; max-width: calc(100cqw - 2px); padding: var(--space-3); color: var(--color-text); overflow-wrap: anywhere; }
.national-detail-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.national-detail-heading strong { font-size: var(--text-sm); font-weight: var(--font-weight-medium); }
.national-detail-heading button { padding-inline: var(--space-2); color: var(--color-text-muted); }
.national-detail-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); }
.national-detail-info small { margin: 0; }
.national-holding-note { padding-top: var(--space-3); font-size: var(--text-xs); }
.national-holding-note > strong { display: block; margin-bottom: var(--space-1); color: var(--color-text-muted); font-weight: var(--font-weight-normal); }
.national-daily-table .national-total-state { color: var(--color-text-muted); text-align: left; font-size: var(--text-xs); }
.national-price-diagnostics { min-width: 0; border-top: var(--border-default); color: var(--color-text); font-size: var(--text-sm); }
.national-price-diagnostics > summary { min-height: var(--control-height-touch); padding-block: var(--space-3); cursor: pointer; }
.national-price-diagnostics > summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.national-price-diagnostics-body { display: grid; gap: var(--space-3); padding-bottom: var(--space-3); min-width: 0; }
.national-price-summary { display: grid; gap: var(--space-2); margin: 0; }
.national-price-summary > div { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.national-price-summary dt { min-width: 6em; color: var(--color-text-muted); }
.national-price-summary dd { margin: 0; }
.national-price-table { min-width: 680px; }
.national-price-table th, .national-price-table td { text-align: left; }
.national-price-table small { max-width: 16em; }
.national-arrival-table { min-width: 0; }
.national-arrival-table th, .national-arrival-table td { white-space: normal; }
@container (max-width: 600px) { .national-detail-info { grid-template-columns: 1fr; } }
.national-history { display: grid; gap: var(--space-3); min-width: 0; }
.national-history-plots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.national-history .watch-a500-trend { --trend-color: var(--color-accent); padding: 0; border: 0; border-radius: 0; }
.national-history .watch-a500-trend-heading { align-items: start; flex-wrap: wrap; }
.national-history .watch-a500-trend-hit:focus { fill: var(--color-accent); outline: none; }
.national-history .watch-a500-trend-point { stroke: var(--color-surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
/* Shared alert settings stay below the three research views, without a fourth tab. */
.national-alerts { scroll-margin-top: calc(var(--topbar-height) + var(--space-3)); margin-top: var(--space-6); border-top: var(--border-default); color: var(--color-text); font-size: var(--text-body); line-height: 1.6; overflow-wrap: anywhere; }
.national-alerts summary { min-height: var(--control-height-touch); padding-block: var(--space-3); cursor: pointer; color: var(--color-text-strong); }
.national-alerts-summary { margin-inline-start: var(--space-3); color: var(--color-text-muted); font-size: 14px; }
.national-alerts-body, .national-alerts-form { display: grid; gap: var(--space-5); min-width: 0; }
.national-alerts-body { padding-block: var(--space-2) var(--space-4); }
.national-alerts p, .national-alerts h4, .national-alerts h5 { margin: 0; }
.national-alerts h4, .national-alerts legend { font-size: var(--text-body); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.national-alerts-note, .national-alerts-fields small { color: var(--color-text-muted); font-size: 14px; }
.national-alerts-note:empty { display: none; }
.national-alerts-error { color: var(--color-danger); font-size: 14px; }
.national-alerts [hidden] { display: none; }
.national-alerts-context { display: grid; gap: var(--space-3); margin: 0; }
.national-alerts-evaluation { display: grid; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-4); border-top: var(--border-default); }
.national-alerts-evaluation strong { font-weight: var(--font-weight-medium); }
.national-alerts-context > div { display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: var(--space-3); }
.national-alerts-context dt { color: var(--color-text-muted); }
.national-alerts-context dd { margin: 0; min-width: 0; }
.national-alerts-context dd span { display: block; color: var(--color-text-muted); font-size: 14px; }
.national-alerts a { display: inline-block; min-height: var(--control-height-touch); align-content: center; text-decoration: underline; }
.national-alerts fieldset { display: grid; gap: var(--space-3); min-width: 0; margin: 0; padding: 0; border: 0; }
.national-alerts legend { padding: 0; margin-bottom: var(--space-2); }
.national-alerts-switch { min-height: var(--control-height-touch); justify-self: start; font-size: inherit; }
.national-alerts-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-4); width: min(100%, 36rem); }
.national-alerts-fields label { display: grid; gap: var(--space-1); min-width: 0; }
.national-alerts .form-control { width: 100%; min-height: var(--control-height-touch); margin: 0; font-size: 1rem; font-variant-numeric: tabular-nums; }
.national-alerts .form-control[aria-invalid="true"] { border-color: var(--color-danger); }
.national-alerts-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.national-alerts-actions h4 { margin-inline-end: auto; }
.national-alerts .btn-normal, .national-alerts .btn-ghost { min-height: var(--control-height-touch); height: auto; padding-block: var(--space-2); font-size: inherit; }
.national-alerts-test, .national-alerts-recent { display: grid; gap: var(--space-3); min-width: 0; padding-top: var(--space-4); border-top: var(--border-default); }
.national-alerts-test > button { justify-self: start; }
.national-alerts-events { list-style: none; padding: 0; margin: 0; }
.national-alerts-events > li { padding-block: var(--space-4); border-bottom: var(--border-default); }
.national-alerts-events > li:first-child { padding-top: 0; }
.national-alerts-events > li:last-child { border-bottom: 0; }
.national-alerts-event-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-3); margin-bottom: var(--space-1); }
.national-alerts-event-head h5 { min-width: 0; font-size: inherit; font-weight: var(--font-weight-medium); }
.national-alerts-event-status { font-size: 14px; font-weight: var(--font-weight-semibold); }
.national-alerts-event-detail { font-size: 14px; }
.national-alerts-event-detail > div { display: grid; gap: var(--space-2); padding-bottom: var(--space-2); }
.national-alerts-event-detail ul { padding-inline-start: var(--space-5); margin: 0; }
.national-alerts-event-body { white-space: pre-wrap; }
.national-alerts :is(summary, a, button, .form-control):focus-visible, .national-alerts .switch input:focus-visible + .track { outline: 2px solid var(--color-accent-text); outline-offset: 3px; }
@media (max-width: 640px) {
  .national-alerts { font-size: 1rem; }
  .national-alerts-fields { grid-template-columns: minmax(0, 1fr); }
  .national-alerts-context > div { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }
  .national-alerts-summary { display: block; margin-inline-start: 0; }
}
@media (forced-colors: active) {
  .national-series-today, .national-series-previous, .national-series-baseline { --national-series-color: CanvasText; }
  .national-minute-bar, .national-minute-bar.is-current { fill: CanvasText; }
  .national-chart-cursor { background: CanvasText; }
  .national-end-dot { border-color: Canvas; }
}
@media (max-width: 800px) {
  .national-kpis, .national-intraday-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .national-tabs { gap: 0; }
  .national-tab { flex: 1; padding-inline: var(--space-2); }
  .national-live-status { align-items: flex-start; }
  .national-chart-tooltip > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .national-x-axis .is-intermediate { display: none; }
  .national-history-plots { grid-template-columns: minmax(0, 1fr); }
  .national-toolbar label { width: 100%; }
  .national-toolbar select { flex: 1; }
}
@media (max-width: 640px) {
  .sentiment-a500, .spread-lines { grid-template-columns: 1fr 1fr; }
  .sentiment-legend, .sentiment-chips, .msasi .sentiment-chips { grid-template-columns: 1fr 1fr; }
  .sentiment-legend span:last-child { grid-column: 1 / -1; }
  .sentiment-chip { min-height: 44px; }
  .sentiment .pill { min-height: 44px; }
}
.boot-error {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: var(--color-bg);
  z-index: 1000;
}
.boot-error[hidden] { display: none; }
.boot-error-title { font-size: 17px; font-weight: 600; color: var(--color-text-strong); }
.boot-error-detail { max-width: 420px; color: var(--color-text-muted); }

.update-banner {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--color-bg);
  color: var(--color-text-strong);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  z-index: 1001;
}

/* 旧 Android 壳（net.vpush.twa）里的换装提示 */
.legacy-app-banner { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 120; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: var(--radius-card); background: var(--color-surface); color: var(--color-text-strong); border: var(--border-default); box-shadow: var(--shadow-md, 0 8px 24px rgba(15, 23, 42, 0.16)); }
.legacy-app-banner p { flex: 1; min-width: 0; margin: 0; font-size: var(--text-sm); line-height: 1.5; }
.legacy-app-banner-get { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--color-accent); color: #fff; font-size: var(--text-sm); font-weight: var(--font-weight-semibold); text-decoration: none; }
.legacy-app-banner-close { flex-shrink: 0; width: 36px; height: 36px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-text-muted, inherit); font-size: 22px; line-height: 1; cursor: pointer; }

/* 国家队每日判断：顶部「今日判断」卡与日度页判断日历。颜色按 A 股习惯：出手偏红，降温偏绿 */
.national-verdict-host { margin-bottom: var(--space-3); }
.national-verdict { --nv-tone: var(--color-line-strong); display: grid; gap: var(--space-2); padding: 12px 14px; border: 1px solid var(--color-line); border-left: 4px solid var(--nv-tone); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.national-verdict.is-strong { --nv-tone: var(--color-data-positive); background: var(--color-data-positive-soft); }
.national-verdict.is-suspect { --nv-tone: color-mix(in srgb, var(--color-data-positive) 60%, var(--color-line)); }
.national-verdict.is-cooling { --nv-tone: var(--color-data-negative); background: var(--color-data-negative-soft); }
.national-verdict-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); }
.national-verdict-head h3 { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); font-weight: var(--font-weight-semibold); }
.national-verdict-date { color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.national-verdict-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.national-verdict-level { color: var(--color-text-strong); font-size: 22px; line-height: 1.2; }
.national-verdict.is-strong .national-verdict-level, .national-verdict.is-suspect .national-verdict-level { color: var(--color-data-positive); }
.national-verdict.is-cooling .national-verdict-level { color: var(--color-data-negative); }
.national-verdict-chip { display: inline-block; padding: 1px 8px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-pill); color: var(--color-text); font-size: var(--text-xs); white-space: nowrap; }
.national-verdict-chip.is-special, .national-verdict-chip.is-thin { border-color: var(--color-warning); color: var(--color-warning-strong); background: var(--color-warning-soft); }
.national-verdict-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.national-verdict-stages li { display: grid; gap: 2px; min-width: 0; padding: 4px 8px; border-top: 2px solid var(--color-line); font-size: var(--text-xs); }
.national-verdict-stages li.is-done { border-top-color: var(--nv-tone); }
.national-verdict-stages li span { color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.national-verdict-stages li small { color: var(--color-text-muted); overflow-wrap: anywhere; }
.national-verdict-stages li.is-pending small { color: var(--color-text-faint); }
.national-verdict-evidence { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.national-verdict-evidence li { display: grid; grid-template-columns: 1.2em max-content minmax(0, 1fr); gap: 6px; align-items: baseline; }
.national-verdict-evidence b { color: var(--color-text-strong); font-weight: var(--font-weight-semibold); white-space: nowrap; }
.national-verdict-evidence li > span:last-child { color: var(--color-text); overflow-wrap: anywhere; }
.national-verdict-mark { font-weight: var(--font-weight-semibold); text-align: center; color: var(--color-text-muted); }
.national-verdict-evidence .is-pass .national-verdict-mark { color: var(--color-data-positive); }
.national-verdict-evidence .is-fail .national-verdict-mark { color: var(--color-data-negative); }
@media (max-width: 640px) {
  .national-verdict-evidence li { grid-template-columns: 1.2em minmax(0, 1fr); }
  .national-verdict-evidence li > span:last-child { grid-column: 2; }
}
.national-verdict-muted { margin: 0; color: var(--color-text-muted); font-size: var(--text-xs); }
.national-verdict-note { margin: 0; color: var(--color-text-faint); font-size: var(--text-xs); }
.national-verdict-previous { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; padding-top: var(--space-2); border-top: 1px dashed var(--color-line); font-size: var(--text-xs); color: var(--color-text-muted); }
.national-verdict-previous b { color: var(--color-text); font-weight: var(--font-weight-semibold); }
.national-verdict-previous.is-strong span, .national-verdict-previous.is-suspect span { color: var(--color-data-positive); }
.national-verdict-previous.is-cooling span { color: var(--color-data-negative); }
.national-verdict-stale { color: var(--color-warning-strong); font-size: var(--text-xs); }
.national-verdict-history { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.national-verdict-history-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); }
.national-verdict-history-head h4 { margin: 0; }
.national-verdict-chart { display: block; width: 100%; height: auto; overflow: visible; }
.national-verdict-line { fill: none; stroke: var(--color-text-muted); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.national-verdict-dot { stroke: var(--color-surface); stroke-width: 1; }
.national-verdict-dot.is-strong, .national-verdict-cell.is-strong { fill: var(--color-data-positive); }
.national-verdict-dot.is-suspect, .national-verdict-cell.is-suspect { fill: color-mix(in srgb, var(--color-data-positive) 50%, var(--color-surface)); }
.national-verdict-dot.is-cooling, .national-verdict-cell.is-cooling { fill: var(--color-data-negative); }
.national-verdict-cell.is-none { fill: var(--color-line-strong); }
.national-verdict-cell.is-unknown { fill: none; stroke: var(--color-line); stroke-dasharray: 2 2; }
.national-verdict-range { display: flex; justify-content: space-between; color: var(--color-text-faint); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.national-verdict-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; color: var(--color-text-muted); font-size: var(--text-xs); }
.national-verdict-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 2px; vertical-align: -1px; background: var(--color-line-strong); }
.national-verdict-legend i.is-strong { background: var(--color-data-positive); }
.national-verdict-legend i.is-suspect { background: color-mix(in srgb, var(--color-data-positive) 50%, var(--color-surface)); }
.national-verdict-legend i.is-cooling { background: var(--color-data-negative); }
.national-verdict-legend i.is-unknown { background: none; border: 1px dashed var(--color-line); }
.national-verdict-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; font-size: var(--text-sm); }
.national-verdict-stats span:last-child { color: var(--color-text-muted); }
.national-verdict-table th small, .national-verdict-table td small { display: block; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: normal; }
/* 国家队 ETF：顶部放量信号、热力单元格、数据条、分类发散条、对比日曲线 */
.national-signal:empty { display: none; }
.national-signal { margin-bottom: var(--space-3); }
.national-signal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.national-signal-grid.is-quad { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .national-signal-grid.is-quad { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.national-signal-grid > div { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.national-signal-grid span, .national-signal-grid small { color: var(--color-text-muted); font-size: var(--text-xs); }
.national-signal-grid strong { color: var(--color-text-strong); font-size: 22px; font-variant-numeric: tabular-nums; }
.national-signal-grid strong.positive, .national-signal-grid b.positive { color: var(--color-data-positive); }
.national-signal-grid strong.negative, .national-signal-grid b.negative { color: var(--color-data-negative); }
.national-signal-badge { display: inline-block; margin-right: 4px; padding: 0 6px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-pill); color: var(--color-text); font-weight: var(--font-weight-semibold); }
.national-signal-badge.is-inflow { border-color: var(--color-data-positive); background: var(--color-data-positive-soft); color: var(--color-text-strong); }
.national-signal-badge.is-outflow { border-color: var(--color-data-negative); background: var(--color-data-negative-soft); color: var(--color-text-strong); }
.national-table td.national-heat { background: color-mix(in srgb, var(--color-data-positive) var(--heat, 0%), transparent); }
.national-table td.national-heat.negative { background: color-mix(in srgb, var(--color-data-negative) var(--heat, 0%), transparent); }
.national-table td.national-heat.positive, .national-table td.national-heat.negative { color: var(--color-text-strong); }
.national-table td.national-databar { background: linear-gradient(to left, var(--color-accent-soft) var(--bar, 0%), transparent var(--bar, 0%)); }
.national-heat-table th, .national-heat-table td { text-align: right; }
.national-heat-table th:first-child { text-align: left; }
.national-heat-table sup { margin-left: 1px; color: var(--color-text-muted); }
.national-index-breakdown { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.national-diverge-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.national-diverge-list li { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) 5em; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.national-diverge-list b { text-align: right; font-variant-numeric: tabular-nums; }
.national-diverge-list b.positive { color: var(--color-data-positive); }
.national-diverge-list b.negative { color: var(--color-data-negative); }
.national-diverge-track { position: relative; height: 10px; border-left: 0; background: linear-gradient(var(--color-line-strong), var(--color-line-strong)) 50% 0 / 1px 100% no-repeat; }
.national-diverge-track i { position: absolute; top: 1px; bottom: 1px; border-radius: 4px; background: var(--color-data-positive); }
.national-diverge-track i.negative { background: var(--color-data-negative); }
.national-compare-pick { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text-muted); font-size: var(--text-xs); }
.national-compare-pick select { width: auto; min-width: 9.5em; }
.national-series-compare { --national-series-color: #b7791f; }
:root.theme-dark .national-series-compare { --national-series-color: #c4862a; }
@media (max-width: 640px) {
  .national-signal-grid, .national-signal-grid.is-quad { grid-template-columns: 1fr; }
  .national-signal-grid > div { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .national-signal-grid > div > small { grid-column: 1 / -1; }
  .national-signal-grid strong { font-size: 20px; }
}

/* 手机上把国家队 ETF 的成交贡献排行和日度明细从横滑表格改成卡片：
   名称一行，代码与跟踪指数一行，关键数值三列一排，不再需要横向滚动。 */
@media (max-width: 640px) {
  .national-table-wrap:has(> .national-card-table) { overflow-x: visible; }
  .national-table.national-card-table { min-width: 0; font-size: var(--text-sm); }
  .national-table.national-card-table, .national-table.national-card-table tbody { display: block; width: 100%; }
  .national-table.national-card-table thead { display: none; }
  .national-table.national-card-table tbody > tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2) var(--space-3); height: auto; padding: var(--space-3) 0; border-bottom: 1px solid var(--color-line-soft); }
  .national-table.national-card-table tbody > tr[hidden] { display: none; }
  .national-table.national-card-table tbody > tr > * { padding: 0; border: 0; text-align: left; white-space: normal; }
  .national-table.national-card-table .national-card-name { grid-column: 1 / -1; order: -2; color: var(--color-text-strong); font-size: var(--text-body); font-weight: var(--font-weight-semibold); }
  .national-table.national-card-table tbody > tr > th[scope="row"]:not([colspan]), .national-table.national-card-table .national-card-index { order: -1; color: var(--color-text-muted); font-size: var(--text-xs); }
  .national-table.national-card-table .national-card-index { grid-column: span 2; }
  .national-table.national-card-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-normal); }
  .national-table.national-card-table td[data-label] { font-size: var(--text-body); font-weight: var(--font-weight-medium); }
  .national-table.national-card-table td[data-label] small { margin-top: 2px; }
  .national-table.national-card-table .national-state-cell { grid-column: 1 / -1; min-width: 0; }
  .national-table.national-card-table tr.is-total > th[colspan] { grid-column: 1 / -1; order: -2; font-size: var(--text-body); }
  .national-table.national-card-table .national-card-skip { display: none; }
  .national-table.national-card-table .national-detail-row { display: block; padding: 0; }
  .national-table.national-card-table .national-detail-row > td { display: block; }
  .national-table.national-card-table tbody > tr > td[colspan]:only-child { grid-column: 1 / -1; }
  .national-table.national-card-table tr.is-selected { margin-inline: calc(-1 * var(--space-2)); padding-inline: var(--space-2); border-radius: var(--radius-sm, 8px); background: var(--color-bg-muted); }
  .national-table.national-card-table tr.is-selected > * { background: transparent; }
}

/* ---------- 安全区与减弱动效兜底（前端审查 E5 / E8） ---------- */
/* 刘海屏、横屏时 toast 和模态框不被系统 UI 挡住 */
.toast { top: calc(18px + env(safe-area-inset-top, 0px)); }
.modal-mask {
  padding:
    calc(20px + env(safe-area-inset-top, 0px))
    calc(20px + env(safe-area-inset-right, 0px))
    calc(20px + env(safe-area-inset-bottom, 0px))
    calc(20px + env(safe-area-inset-left, 0px));
}
.modal-card { max-height: calc(90vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
@media (max-width: 768px) {
  /* 手机上有底部导航：更新提示条浮在导航之上，不再盖住它 */
  .update-banner { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}
/* 系统要求减弱动效时，统一压掉过渡和动画（单独写过的 reduce 规则仍然生效） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* 路由切换后程序把焦点移到主区域，不画焦点框（它不是用户可操作的控件） */
#main:focus { outline: none; }

/* ---------- 宏观日历 ---------- */
.push-calendar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: 0; }
.cal-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-3); }
.cal-head .section-title { margin: 0; }
.cal-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.cal-nav { padding-inline: var(--space-2); }
.cal-nav .ui-icon { width: 18px; height: 18px; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-1); margin-bottom: var(--space-3); }
.cal-day {
  display: grid; justify-items: center; gap: 2px; padding: var(--space-2) var(--space-1);
  border: var(--border-soft); border-radius: var(--radius-control); background: var(--color-surface);
  color: var(--color-text-muted); cursor: pointer; font: inherit; min-height: var(--control-height-touch);
}
.cal-day:hover { background: var(--color-surface-hover); }
/* 格子再窄也不让日期溢出到隔壁（系统字号调大时尤其明显） */
.cal-day { min-width: 0; overflow: hidden; }
.cal-day-week, .cal-day-date { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.cal-week-range { display: none; margin: 0 0 4px; font-size: var(--text-xs); color: var(--color-text-muted); }
.cal-day:focus-visible { outline: var(--outline-focus); outline-offset: 2px; }
.cal-day-week { font-size: var(--text-xs); }
.cal-day-date { font-size: var(--text-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); font-variant-numeric: tabular-nums; }
.cal-day-count { font-size: var(--text-2xs); font-variant-numeric: tabular-nums; }
.cal-day.is-today .cal-day-week { color: var(--color-accent-text); font-weight: var(--font-weight-semibold); }
.cal-day.active { border-color: var(--color-accent); background: var(--color-surface-accent-soft); }
.cal-day.active .cal-day-date { color: var(--color-accent-text); }
.cal-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.cal-seg-btn {
  border: 0; background: var(--color-surface); color: var(--color-text-muted); font: inherit; font-size: var(--text-sm);
  padding: 6px 12px; min-height: 36px; cursor: pointer;
}
.cal-seg-btn:hover { color: var(--color-text-strong); }
.cal-seg-btn.active { background: var(--color-surface-accent-soft); color: var(--color-accent-text); font-weight: var(--font-weight-semibold); }
.cal-seg-btn:focus-visible, .cal-chip:focus-visible, .cal-title-btn:focus-visible { outline: var(--outline-focus); outline-offset: 2px; }
.cal-toggle { border: var(--border-soft); border-radius: var(--radius-control); }
.cal-countries { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.cal-chip {
  border: var(--border-soft); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text-muted);
  font: inherit; font-size: var(--text-xs); padding: 4px 10px; min-height: 30px; cursor: pointer;
}
.cal-chip.active { border-color: var(--color-accent); color: var(--color-accent-text); background: var(--color-surface-accent-soft); }
.cal-list { list-style: none; margin: 0; padding: 0; border-top: var(--border-soft); }
.cal-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(240px, auto); gap: var(--space-3);
  align-items: start; padding: var(--space-3) var(--space-1); border-bottom: var(--border-soft);
}
.cal-row.is-important { background: var(--color-surface-panel-soft); }
.cal-time { font-variant-numeric: tabular-nums; font-size: var(--text-sm); color: var(--color-text-muted); padding-top: 2px; }
.cal-row.is-important .cal-time { color: var(--color-text-strong); font-weight: var(--font-weight-semibold); }
.cal-main { min-width: 0; }
.cal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: 4px; }
.cal-flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px var(--color-line-soft); flex: none; }
.cal-flag-empty { display: inline-block; background: var(--color-bg-muted); }
.cal-stars { display: inline-flex; align-items: center; gap: 1px; }
.cal-star { color: var(--color-line-strong); font-size: 11px; line-height: 1; }
.cal-star.on { color: var(--color-warning); }
.cal-stars.is-heavy .cal-star.on { color: var(--color-danger); }
.cal-heavy { margin-left: 4px; padding: 0 5px; border-radius: var(--radius-xs); background: var(--color-danger-soft); color: var(--color-danger-strong); font-weight: var(--font-weight-semibold); }
.cal-kind { padding: 0 6px; border-radius: var(--radius-xs); background: var(--color-bg-muted); color: var(--color-text-subtle); }
.cal-assets { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cal-asset { padding: 0 6px; border: var(--border-soft); border-radius: var(--radius-pill); color: var(--color-text-faint); }
.cal-title { font-size: var(--text-body); color: var(--color-text-strong); line-height: 1.5; }
.cal-title-btn {
  all: unset; cursor: pointer; color: var(--color-text-strong); border-radius: var(--radius-xs);
  text-decoration: underline; text-decoration-color: var(--color-line-strong); text-underline-offset: 3px;
}
.cal-title-btn:hover { color: var(--color-accent-text); text-decoration-color: currentColor; }
.cal-foresight { margin-top: 6px; font-size: var(--text-sm); color: var(--color-text-muted); }
.cal-foresight > summary { cursor: pointer; color: var(--color-accent-text); width: fit-content; }
.cal-foresight p { margin: 6px 0 0; line-height: 1.7; }
.cal-values { display: grid; grid-template-columns: repeat(3, minmax(72px, 1fr)); gap: var(--space-2); margin: 0; text-align: right; }
.cal-values dt { font-size: var(--text-2xs); color: var(--color-text-faint); }
.cal-values dd { margin: 2px 0 0; font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--color-text-subtle); }
.cal-actual { font-size: var(--text-body); color: var(--color-text-strong); }
.cal-actual.is-above { color: var(--color-data-positive); }
.cal-actual.is-below { color: var(--color-data-negative); }
.cal-dir { margin-left: 2px; font-size: 10px; }
.cal-pending { color: var(--color-text-faint); }
.cal-revised { margin-left: 2px; color: var(--color-text-faint); font-size: var(--text-xs); }
.cal-now { display: flex; align-items: center; gap: var(--space-2); padding: 4px 0; color: var(--color-accent-text); font-size: var(--text-xs); font-weight: var(--font-weight-semibold); }
.cal-now::after { content: ""; flex: 1; border-top: 1px dashed var(--color-accent); }
.cal-empty { padding: var(--space-6) var(--space-3); text-align: center; color: var(--color-text-muted); }
.cal-status { margin: var(--space-3) 0 0; font-size: var(--text-xs); color: var(--color-text-faint); }
.cal-status.has-error { color: var(--color-warning-strong); }
.cal-modal { width: min(560px, 100%); }
.cal-modal-head { display: flex; align-items: start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.cal-modal-head h3 { margin: 0; font-size: var(--text-title); }
.cal-modal-close { padding: 4px; }
.cal-detail h4 { margin: var(--space-4) 0 var(--space-1); font-size: var(--text-sm); color: var(--color-text-strong); }
.cal-detail p { margin: 0; font-size: var(--text-sm); line-height: 1.7; color: var(--color-text-subtle); }
.cal-detail-meta { color: var(--color-text-muted) !important; }
.cal-stale { color: var(--color-warning-strong); }
.cal-chart { margin: var(--space-3) 0 0; }
.cal-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.cal-chart-line { fill: none; stroke: var(--color-accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.cal-chart-dot { fill: var(--color-accent); }
.cal-chart-forecast { fill: none; stroke: var(--color-text-faint); stroke-width: 1.5; stroke-dasharray: 2 2; }
.cal-chart-zero { stroke: var(--color-line-strong); stroke-dasharray: 4 4; }
.cal-chart-label { fill: var(--color-text-faint); font-size: 11px; }
.cal-chart figcaption { display: flex; gap: var(--space-3); font-size: var(--text-xs); color: var(--color-text-muted); }
.cal-legend::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.cal-legend-actual::before { background: var(--color-accent); }
.cal-legend-forecast::before { border: 1.5px dashed var(--color-text-faint); }
.cal-history { width: 100%; border-collapse: collapse; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.cal-history th, .cal-history td { padding: 6px 4px; border-bottom: var(--border-soft); text-align: right; background: transparent; }
.cal-history th:first-child, .cal-history thead th:first-child { text-align: left; }
.cal-history thead th { color: var(--color-text-faint); font-weight: var(--font-weight-medium); font-size: var(--text-xs); }
.cal-history tbody th { font-weight: var(--font-weight-normal); color: var(--color-text-muted); }
.cal-source { display: inline-flex; align-items: center; gap: 4px; margin-top: var(--space-3); color: var(--color-link); font-size: var(--text-sm); }
.cal-source .ui-icon { width: 14px; height: 14px; }
@media (max-width: 720px) {
  .cal-row { grid-template-columns: 44px minmax(0, 1fr); }
  .cal-values { grid-column: 2; text-align: left; }
  .cal-values-event { display: none; }
  .cal-day { padding-inline: 0; }
  .cal-day-week { font-size: var(--text-2xs); }
  .cal-day-count { display: none; }
  /* 手机：格子里只放「几号」，月份在周条上方 */
  .cal-day-month { display: none; }
  .cal-day-date { font-size: var(--text-body); }
  .cal-week-range { display: block; }
  .cal-head-actions .btn-ghost[data-cal-export] { display: none; }
  /* 地区一多会占半屏：手机上收成一行横向滑动 */
  .cal-countries { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--space-1)); padding: 2px var(--space-1); }
  .cal-countries::-webkit-scrollbar { display: none; }
  .cal-chip { flex: none; }
}

/* 宏观日历页布局：宽屏日程 + 右栏实时行情；窄屏行情收成日程上方一行横滑报价 */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; max-width: 1360px; margin: 0 auto; }
.cal-board { min-width: 0; }
.cal-aside { position: sticky; top: calc(var(--topbar-height, 56px) + 16px); min-width: 0; }
.gq {
  background: var(--color-surface); border: var(--border-default); border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-4) var(--space-3);
}
.gq-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.gq-title { margin: 0; font-size: var(--text-title); color: var(--color-text-strong); }
.gq-meta { font-size: var(--text-xs); color: var(--color-text-faint); font-variant-numeric: tabular-nums; }
.gq-tabs { display: flex; gap: var(--space-3); margin: var(--space-3) 0 var(--space-2); border-bottom: var(--border-soft); }
.gq-tab {
  border: 0; background: none; font: inherit; font-size: var(--text-sm); color: var(--color-text-muted);
  padding: 6px 0 8px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 36px;
}
.gq-tab:hover { color: var(--color-text-strong); }
.gq-tab.active { color: var(--color-text-strong); font-weight: var(--font-weight-semibold); border-bottom-color: var(--color-accent); }
.gq-tab:focus-visible, .gq-item:focus-visible { outline: var(--outline-focus); outline-offset: 2px; }
.gq-chart { min-height: 132px; }
.gq-chart-svg { display: block; width: 100%; height: auto; }
.gq-area { fill: var(--color-surface-accent-soft); }
.gq-line { fill: none; stroke: var(--color-accent); stroke-width: 1.4; stroke-linejoin: round; }
.gq-last { fill: var(--color-accent); }
.gq-preclose { stroke: var(--color-line-strong); stroke-dasharray: 3 3; }
.gq-axis { fill: var(--color-text-faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.gq-chart-empty { margin: 0; padding: 48px 0; text-align: center; font-size: var(--text-xs); color: var(--color-text-faint); }
.gq-cols, .gq-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 84px; gap: var(--space-2); align-items: center; }
.gq-cols { padding: var(--space-2) var(--space-2) 6px; font-size: var(--text-xs); color: var(--color-text-faint); border-bottom: var(--border-soft); }
.gq-cols span:not(:first-child) { text-align: right; }
.gq-list { list-style: none; margin: 0; padding: 0; }
.gq-list > li { border-bottom: var(--border-soft); }
.gq-item {
  width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  padding: var(--space-2); border-left: 2px solid transparent;
}
.gq-item:hover { background: var(--color-surface-row-hover); }
.gq-item.active { background: var(--color-surface-panel-soft); border-left-color: var(--color-accent); }
.gq-name { display: grid; min-width: 0; }
.gq-name span { font-size: var(--text-sm); color: var(--color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gq-name small, .gq-change small { font-size: var(--text-2xs); color: var(--color-text-faint); }
.gq-price { font-size: var(--text-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); font-variant-numeric: tabular-nums; text-align: right; }
.gq-change { display: grid; justify-items: end; font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.gq-item.is-up .gq-change, .gq-item.is-up .gq-change small { color: var(--color-data-positive); }
.gq-item.is-down .gq-change, .gq-item.is-down .gq-change small { color: var(--color-data-negative); }
.gq-empty { padding: var(--space-4) 0; text-align: center; font-size: var(--text-xs); color: var(--color-text-faint); }
.gq-source { margin: var(--space-2) 0 0; font-size: var(--text-2xs); color: var(--color-text-faint); }
@media (max-width: 1180px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cal-aside { position: static; order: -1; }
  .gq { padding: var(--space-3); }
  .gq-head { display: none; }
  .gq-tabs { margin-top: 0; }
  .gq-chart, .gq-cols, .gq-source { display: none; }
  .gq-list { display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .gq-list::-webkit-scrollbar { display: none; }
  .gq-list > li { border: 0; flex: none; }
  .gq-item {
    grid-template-columns: auto; gap: 2px; padding: 6px 10px; border: var(--border-soft); border-radius: var(--radius-control);
    min-width: 104px;
  }
  .gq-item.active { border-color: var(--color-line-soft); border-left: var(--border-soft); background: none; }
  .gq-name small, .gq-change small { display: none; }
  .gq-price { text-align: left; }
  .gq-change { justify-items: start; }
}

/* 宏观日历提醒：行内铃铛与设置弹窗 */
.cal-time-col { display: grid; justify-items: start; gap: 4px; }
.cal-bell {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; margin-left: -6px;
  border: 0; border-radius: var(--radius-pill); background: none; color: var(--color-text-faint); cursor: pointer;
}
.cal-bell .bell-icon { width: 16px; height: 16px; }
.cal-bell:hover { color: var(--color-text-strong); background: var(--color-surface-hover); }
.cal-bell.active { color: var(--color-accent-text); }
.cal-bell.active .bell-icon { fill: currentColor; }
.cal-bell:focus-visible { outline: var(--outline-focus); outline-offset: 1px; }
.cal-alerts-btn { display: inline-flex; align-items: center; gap: 4px; }
.cal-alerts-btn .bell-icon { width: 16px; height: 16px; }
.cal-alert-modal { width: min(600px, 100%); }
.cal-alert-group { border: 0; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-2); }
.cal-alert-group legend { font-size: var(--text-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); margin-bottom: var(--space-2); }
.cal-alert-toggle { display: flex; align-items: flex-start; gap: var(--space-2); cursor: pointer; }
.cal-alert-toggle input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--color-accent); }
.cal-alert-toggle span { display: grid; gap: 2px; }
.cal-alert-toggle strong { font-size: var(--text-sm); font-weight: var(--font-weight-medium); color: var(--color-text-strong); }
.cal-alert-toggle small, .cal-alert-label small { font-size: var(--text-xs); color: var(--color-text-muted); }
.cal-alert-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.cal-alert-select { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-subtle); }
.cal-alert-select select {
  font: inherit; min-height: 34px; padding: 4px 8px; border: var(--border-default); border-radius: var(--radius-control);
  background: var(--color-surface); color: var(--color-text-strong);
}
.cal-alert-countries { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cal-alert-label { flex-basis: 100%; font-size: var(--text-sm); color: var(--color-text-subtle); }
.cal-chip-check { position: relative; cursor: pointer; }
.cal-chip-check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cal-chip-check span {
  display: inline-block; padding: 4px 10px; border: var(--border-soft); border-radius: var(--radius-pill);
  font-size: var(--text-xs); color: var(--color-text-muted); background: var(--color-surface);
}
.cal-chip-check input:checked + span { border-color: var(--color-accent); color: var(--color-accent-text); background: var(--color-surface-accent-soft); }
.cal-chip-check input:focus-visible + span { outline: var(--outline-focus); outline-offset: 2px; }
.cal-alert-muted { margin: 0; font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.6; }
.cal-alert-delivery {
  display: grid; gap: 2px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-control);
  background: var(--color-surface-panel-soft); font-size: var(--text-xs); color: var(--color-text-muted);
}
.cal-alert-delivery strong { font-size: var(--text-sm); color: var(--color-text-strong); font-weight: var(--font-weight-medium); }
.cal-alert-delivery:not(.is-ready) strong { color: var(--color-warning-strong); }
.cal-alert-delivery a { color: var(--color-link); }
.cal-alert-error { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--color-danger); }
.cal-alert-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.cal-alert-history { margin-top: var(--space-4); padding-top: var(--space-3); border-top: var(--border-soft); }
.cal-alert-history-head { display: flex; align-items: center; justify-content: space-between; }
.cal-alert-history-head h4 { margin: 0; font-size: var(--text-sm); color: var(--color-text-strong); }
.cal-alert-events { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.cal-alert-events li { padding-bottom: var(--space-2); border-bottom: var(--border-soft); }
.cal-alert-event-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }
.cal-alert-kind { color: var(--color-text-subtle); font-weight: var(--font-weight-medium); }
.cal-alert-status { margin-left: auto; }
.cal-alert-status.is-sent { color: var(--color-success); }
.cal-alert-status.is-failed, .cal-alert-status.is-unknown { color: var(--color-danger); }
.cal-alert-status.is-partial, .cal-alert-status.is-suppressed { color: var(--color-warning-strong); }
.cal-alert-event-title { margin: 2px 0; font-size: var(--text-sm); color: var(--color-text-strong); }
@media (max-width: 720px) {
  .cal-time-col { justify-items: start; }
  .cal-alerts-btn span { display: none; }
}

/* 宏观日历 P2：搜索、筛选收起、周条吸顶、关注小点、推送定位、弹窗关注 */
.cal-search { position: relative; margin-bottom: 12px; }
.cal-search-input { width: 100%; min-height: var(--control-height-lg, 40px); margin: 0; }
.cal-search-results {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0;
  max-height: min(420px, 60vh); overflow: auto;
  background: var(--color-surface); border: var(--border-default); border-radius: var(--radius-card); box-shadow: var(--shadow-lg);
}
.cal-search-list { list-style: none; margin: 0; padding: 4px; }
.cal-search-item {
  display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.cal-search-item:hover, .cal-search-item:focus-visible { background: var(--color-surface-row-hover); }
.cal-search-item:focus-visible { outline: var(--outline-focus); outline-offset: -2px; }
.cal-search-name { font-size: var(--text-sm); color: var(--color-text-strong); }
.cal-search-name .cal-country { margin-right: 6px; color: var(--color-text-muted); font-size: var(--text-xs); }
.cal-search-meta { font-size: var(--text-xs); color: var(--color-text-faint); font-variant-numeric: tabular-nums; }
.cal-search-note { margin: 0; padding: 14px; font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; }
.cal-week { position: sticky; top: var(--topbar-height, 56px); z-index: 20; background: var(--color-surface); padding-block: 6px; }
.cal-day { position: relative; }
.cal-day-dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); }
.cal-filters-toggle { display: none; }
.cal-filters-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px;
  border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-white); font-size: var(--text-2xs);
}
.cal-row.is-target { animation: cal-target 2.4s var(--ease-standard, ease) 1; box-shadow: inset 3px 0 0 var(--color-accent); }
@keyframes cal-target { 0%, 40% { background: var(--color-surface-accent-soft); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .cal-row.is-target { animation: none; background: var(--color-surface-accent-soft); } }
.cal-modal-tools { display: flex; align-items: center; gap: var(--space-2); }
.cal-modal-watch { display: inline-flex; align-items: center; gap: 4px; }
.cal-modal-watch .bell-icon { width: 16px; height: 16px; }
.cal-modal-watch.active { color: var(--color-accent-text); border-color: var(--color-accent); }
.cal-modal-watch.active .bell-icon { fill: currentColor; }
@media (max-width: 720px) {
  .cal-filters-toggle { display: inline-flex; align-items: center; margin-bottom: var(--space-2); }
  .cal-filters:not(.is-open) { display: none; }
  .cal-day-dot { top: 4px; right: 4px; }
}
.tl-cal-today-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.tl-cal-today-head .tl-rail-title { margin-bottom: 8px; }
.tl-cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tl-cal-list a {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 2px 8px; padding: 6px 6px; margin-inline: -6px;
  border-radius: var(--radius-sm); color: inherit; text-decoration: none;
}
.tl-cal-list a:hover { background: var(--color-surface-row-hover); }
.tl-cal-list a:focus-visible { outline: var(--outline-focus); outline-offset: 1px; }
.tl-cal-list time { grid-row: span 2; font-size: var(--text-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); font-variant-numeric: tabular-nums; }
.tl-cal-title { font-size: var(--text-sm); color: var(--color-text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-cal-list small { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---------- 市场面板 · 期指贴水 ---------- */
/* 图表配色按品种固定（IF/IH/IC/IM），深色模式单独取阶 */
.fb-root {
  --s-IF: #2a78d6; --s-IH: #eb6834; --s-IC: #1baf7a; --s-IM: #eda100;
  --trend: #6366f1; --trend-band1: rgba(99, 102, 241, 0.14); --trend-band2: rgba(99, 102, 241, 0.06);
  --season: color-mix(in srgb, var(--color-text) 5%, transparent);
  --heat-deep: #00a86b; --heat-premium: #ff5a5a;
  container: fb / inline-size;
}
:root.theme-dark .fb-root {
  --s-IF: #3987e5; --s-IH: #d95926; --s-IC: #199e70; --s-IM: #c98500;
  --trend: #a5a6ff; --trend-band1: rgba(165, 166, 255, 0.18); --trend-band2: rgba(165, 166, 255, 0.08);
  --heat-deep: #1fbf85; --heat-premium: #ff6b6b;
}
.fb-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fb-head-actions { display: flex; align-items: center; gap: 10px; }
.fb-status { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.fb-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-text-faint); }
.fb-status.is-live i { background: var(--color-success, #00b473); }
.fb-signal .market-signal-cell strong { font-size: 22px; }
.fb-signal .market-signal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fb-signal .market-signal-cell span span { color: inherit; font-size: inherit; }
.fb-signal .market-signal-cell span { display: flex; align-items: center; gap: 6px; }
.fb-signal .market-signal-cell > span > span:not(.fb-tenor) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-signal .market-signal-cell span.fb-tenor { margin-left: auto; padding: 0 6px; border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text-muted); font-size: 11px; line-height: 18px; white-space: nowrap; }
.fb-signal .market-signal-cell strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.fb-signal .market-signal-cell small.fb-delta { font-size: var(--text-xs); font-weight: var(--font-weight-normal); white-space: nowrap; }
.fb-signal .market-signal-cell small.fb-delta span { display: inline; }
.fb-est { margin-right: 2px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--color-bg-muted); color: var(--color-text-muted); font-size: 10px; font-weight: var(--font-weight-normal); line-height: 16px; text-decoration: none; cursor: help; }
.fb-adj .seg-track button { white-space: nowrap; }
.fb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fb-root .positive { color: var(--color-data-positive); }
.fb-root .negative { color: var(--color-data-negative); }

.fb-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--color-warning) 40%, transparent); border-radius: var(--radius-sm); background: var(--color-warning-soft); font-size: var(--text-sm); color: var(--color-text-strong); }
.fb-notice small { color: var(--color-text-muted); font-size: var(--text-xs); }
.fb-notice.is-quiet { margin-bottom: 12px; padding: 6px 12px; border-color: var(--color-line); background: var(--color-bg-muted); color: var(--color-text-muted); font-size: var(--text-xs); }
.fb-link { padding: 0; border: 0; background: none; color: var(--color-accent-text); font: inherit; font-size: var(--text-sm); cursor: pointer; white-space: nowrap; }

.fb-block { margin-bottom: 24px; }
.fb-block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; }
.fb-block-head h4 { margin: 0; color: var(--color-text-strong); font-size: var(--text-sm); }
.fb-block-head span { color: var(--color-text-muted); font-size: var(--text-xs); }
.fb-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.fb-controls label { color: var(--color-text-muted); font-size: var(--text-xs); margin-right: 6px; }
.fb-controls > div { display: flex; align-items: center; }

/* 合约矩阵：底色按年化贴水深浅着色 */
.fb-matrix { width: calc(100% + 8px); table-layout: fixed; border-collapse: separate; border-spacing: 4px; margin: -4px; font-variant-numeric: tabular-nums; }
.fb-matrix thead th:first-child { width: 7em; }
.fb-matrix th { background: transparent; padding: 4px 8px; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-normal); text-align: left; white-space: nowrap; }
.fb-matrix th b { display: block; color: var(--color-text-strong); font-size: var(--text-sm); font-weight: var(--font-weight-semibold); }
.fb-matrix tbody th { cursor: pointer; }
.fb-matrix td { height: 1px; padding: 0; }
/* 数字 + 标签一行、基差/天数一行；格子等高，底色只是淡淡一层 */
.fb-cell { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "val tag" "sub sub"; align-content: center; column-gap: 6px; row-gap: 2px; width: 100%; height: 100%; min-height: 52px; padding: 7px 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fb-cell.is-heat { background: color-mix(in srgb, var(--heat-color) var(--heat), var(--color-surface)); }
.fb-cell.is-near { background: var(--color-bg-muted); }
.fb-cell.is-empty { cursor: default; }
.fb-cell strong { grid-area: val; color: var(--color-text-strong); font-size: 16px; }
.fb-cell small { grid-area: sub; color: var(--color-text-muted); font-size: var(--text-xs); }
.fb-cell em { grid-area: tag; align-self: center; padding: 0 6px; border-radius: var(--radius-pill); font-size: 11px; font-style: normal; line-height: 18px; white-space: nowrap; }
.fb-cell.is-best { border-color: var(--color-accent); }
.fb-cell.is-best em { background: var(--color-accent); color: #fff; }
.fb-cell.is-near strong { color: var(--color-text-faint); }
.fb-cell.is-near em { background: var(--color-warning-soft); color: var(--color-warning-strong); }
.fb-matrix tr.is-selected th:first-child b { color: var(--color-accent-text); }
.fb-matrix tr.is-selected .fb-cell:not(.is-best) { border-color: var(--color-line-strong); }

.fb-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.fb-card { min-width: 0; padding: 14px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); }
.national-table.fb-t th:first-child, .national-table.fb-t td:first-child { text-align: left; }
.national-table.fb-t th, .national-table.fb-t td { text-align: right; }
.national-table.fb-t thead th { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--font-weight-normal); }
.national-table.fb-t tr.is-best td { background: var(--color-accent-soft); }
.national-table.fb-t tr.is-near td { color: var(--color-text-faint); }
.national-table.fb-t tbody tr[data-fb-v] { cursor: pointer; }
.fb-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--color-bg-muted); color: var(--color-text-muted); font-size: 11px; line-height: 18px; vertical-align: 1px; }
.fb-tag.accent { background: var(--color-accent); color: #fff; }

.fb-chart { position: relative; }
.fb-chart svg { display: block; width: 100%; height: auto; overflow: visible; font-family: inherit; }
.fb-axis text { fill: var(--color-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.fb-grid line { stroke: var(--color-line-soft); stroke-width: 1; }
.fb-zero { stroke: var(--color-line-strong); stroke-width: 1; }
.fb-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; color: var(--color-text-muted); font-size: var(--text-xs); }
.fb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fb-legend i { display: inline-block; width: 14px; height: 0; border-top: 2px solid currentColor; }
.fb-legend i.dash { border-top-style: dashed; }
.fb-legend i.band { height: 8px; border: 0; border-radius: 2px; }
.fb-show-sm { display: none; }
.fb-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 120px; padding: 8px 10px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); box-shadow: var(--shadow-sm); color: var(--color-text); font-size: var(--text-xs); font-variant-numeric: tabular-nums; line-height: 1.6; white-space: nowrap; }
.fb-tip b { color: var(--color-text-strong); }
.fb-summary { margin: 8px 0 0; color: var(--color-text-muted); font-size: var(--text-xs); }

.fb-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.fb-stats > div { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.fb-stats span, .fb-stats small { color: var(--color-text-muted); font-size: var(--text-xs); }
.fb-stats strong { color: var(--color-text-strong); font-size: 20px; font-variant-numeric: tabular-nums; }

/* 分位尺：右侧 = 贴水深 = 滚动收益高 */
.fb-gauge { margin: 0 0 18px; }
.fb-gauge-bar { position: relative; display: grid; grid-template-columns: 10fr 20fr 40fr 20fr 10fr; gap: 2px; height: 10px; margin-top: 8px; }
.fb-gauge-bar i { display: block; height: 10px; }
.fb-gauge-bar i:first-child { border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
.fb-gauge-bar i:nth-child(5) { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.fb-gauge-bar .marker { position: absolute; top: -7px; width: 24px; height: 24px; margin-left: -12px; border: 3px solid var(--color-surface); border-radius: 50%; background: var(--color-text-strong); box-shadow: 0 1px 0 1px var(--color-line-strong); }
.fb-gauge-ticks { display: grid; grid-template-columns: 10fr 20fr 40fr 20fr 10fr; margin-top: 10px; color: var(--color-text-muted); font-size: 11px; }
.fb-gauge-ticks span { display: grid; gap: 1px; text-align: center; }
.fb-gauge-ticks b { color: var(--color-text); font-weight: var(--font-weight-medium); }

.fb-roll-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; margin-bottom: 20px; }
.fb-count { display: grid; gap: 4px; align-content: start; padding: 14px 16px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.fb-count span, .fb-count small { color: var(--color-text-muted); font-size: var(--text-xs); }
.fb-count strong { color: var(--color-text-strong); font-size: 28px; font-variant-numeric: tabular-nums; }
.fb-cal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fb-cal > div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; }
.fb-cal b { color: var(--color-text-strong); font-size: var(--text-sm); }
.fb-cal span, .fb-cal small { color: var(--color-text-muted); font-size: var(--text-xs); }
.fb-cal .is-next { border-color: var(--color-warning); background: var(--color-warning-soft); }
.fb-notes { margin: 12px 0 0; padding-left: 18px; color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.8; }
.fb-foot { margin-top: 8px; padding-top: 12px; border-top: var(--border-soft); color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.8; }

/* 主内容区宽度随侧栏变化，按面板自身宽度换列 */
@container fb (max-width: 760px) {
  .fb-roll-top { grid-template-columns: minmax(0, 1fr); }
}
@container fb (max-width: 620px) {
  .fb-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .fb-signal .market-signal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-signal.market-signal .market-signal-tabs button.market-signal-cell { grid-template-columns: minmax(0, 1fr); }
  .fb-head-actions { width: 100%; justify-content: space-between; }
  .fb-matrix { width: calc(100% + 6px); border-spacing: 3px; margin: -3px; }
  .fb-matrix th { padding: 2px 4px; }
  .fb-matrix th:first-child, .fb-matrix thead th:first-child { width: 2.4em; }
  .fb-cell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "val" "tag"; min-height: 46px; padding: 6px; }
  .fb-cell em { justify-self: start; }
  .fb-cell strong { font-size: 15px; }
  .fb-root .fb-hide-sm, .fb-signal .market-signal-cell span.fb-hide-sm { display: none; }
  .fb-show-sm { display: inline; }
  .fb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-stats > div:first-child { grid-column: 1 / -1; }
  .fb-cal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-controls { flex-direction: column; align-items: flex-start; }
}
