/* ==========================================================================
   灵创百科 · InkWiki — 简约现代（Minimal Modern）
   设计语言：中性灰阶 + 单一主色 · 无衬线字阶 · 发丝边框 · 克制阴影 · 4/8pt 网格
   ========================================================================== */

/* ------------------------------ 设计令牌 ------------------------------- */
:root {
  /* 表面与文字（中性灰阶） */
  --paper: #f7f8fa;
  --paper-2: #ffffff;
  --paper-3: #f2f4f7;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #55606e;
  --faint: #67717f;
  --line: #eaecf0;
  --line-2: #d8dde5;

  /* 主色（单一蓝）与语义色 */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --on-accent: #ffffff;
  --seal: #e5484d;
  --amber: #b54708;
  --ok: #067647;
  --danger: #d92d20;
  /* 语义浅底与描边由基色派生，自动适配明暗主题 */
  --accent-soft: color-mix(in srgb, var(--accent) 9%, var(--paper-2));
  --accent-line: color-mix(in srgb, var(--accent) 30%, var(--paper-2));
  --seal-soft: color-mix(in srgb, var(--seal) 8%, var(--paper-2));
  --seal-line: color-mix(in srgb, var(--seal) 26%, var(--paper-2));
  --amber-soft: color-mix(in srgb, var(--amber) 10%, var(--paper-2));
  --amber-line: color-mix(in srgb, var(--amber) 28%, var(--paper-2));
  --ok-soft: color-mix(in srgb, var(--ok) 8%, var(--paper-2));
  --ok-line: color-mix(in srgb, var(--ok) 24%, var(--paper-2));
  --danger-line: color-mix(in srgb, var(--danger) 26%, var(--paper-2));

  /* 兼容旧变量名（模板里仍在使用） */
  --jade: var(--accent);
  --jade-soft: var(--accent-soft);
  --jade-deep: var(--accent-hover);

  /* 形状与阴影 */
  --radius-sm: 8px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-2: 0 4px 8px -2px rgba(16, 24, 40, 0.08), 0 16px 40px -12px rgba(16, 24, 40, 0.16);
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.16);

  /* 布局与字体 */
  --sidebar-w: 264px;
  --topbar-h: 56px;
  --font-display: "MiSans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "MiSans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
}

html[data-theme="night"] {
  --paper: #0d0f13;
  --paper-2: #14171d;
  --paper-3: #1c2027;
  --ink: #f2f4f7;
  --ink-2: #d5dae2;
  --muted: #9aa5b4;
  --faint: #94a0b0;
  --line: #232830;
  --line-2: #333a45;

  --accent: #6f9bff;
  --accent-hover: #95b4ff;
  --on-accent: #0b1220;
  --seal: #ff8a80;
  --amber: #f0b357;
  --ok: #4ade80;
  --danger: #ff8a80;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.5);
  --focus: 0 0 0 3px rgba(111, 155, 255, 0.24);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4, h5 { letter-spacing: -0.005em; }
::selection { background: var(--accent-soft); color: var(--accent-hover); }

::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }

/* ------------------------------ 加载态 -------------------------------- */
.app-loading { display: grid; place-items: center; min-height: 100vh; }
.boot { display: grid; gap: 16px; justify-items: center; color: var(--muted); }
.boot-mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 20px; font-weight: 700;
  border-radius: var(--radius-md); animation: pulse 1.4s ease-in-out infinite;
}
.boot-text { font-size: 12px; letter-spacing: 0.04em; }
.boot-mark.has-img { background: transparent; border-radius: 50%; }
.boot-mark img { width: 44px; height: 44px; display: block; object-fit: contain; }
@keyframes pulse { 0%, 100% { opacity: 0.55; transform: scale(0.98) } 50% { opacity: 1; transform: scale(1) } }

/* ------------------------------ 通用组件 ------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink);
  font-size: 13px; font-weight: 500; line-height: 1;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease), transform .12s var(--ease);
  white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--paper-3); border-color: var(--line-2); color: var(--ink); }
.btn:active { transform: scale(0.985); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--on-accent); }
.btn.danger:hover { filter: brightness(0.94); color: var(--on-accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--paper-3); color: var(--ink); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field > label { font-size: 12px; color: var(--muted); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--faint); line-height: 1.6; }
.input, .textarea, .select {
  width: 100%; padding: 8px 12px; background: var(--paper-2);
  border: 1px solid var(--line-2); border-radius: var(--radius); outline: none;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease); font-size: 14px;
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--faint); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.input.mono, .textarea.mono { font-family: var(--font-mono); font-size: 13px; }

.card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-1);
}
.card-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.card-sub { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.6;
  border: 1px solid var(--line-2); color: var(--muted); background: var(--paper-3);
}
.tag.jade { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hover); }
.tag.seal { background: var(--seal-soft); border-color: transparent; color: var(--seal); }
.tag.amber { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.tag.plain { background: transparent; }
.tag.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.tag.todo { background: var(--amber-soft); border-color: transparent; color: var(--amber); }

/* 审核优先级徽标：P1 高危 / P2 中 / P3 低 */
.prio {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; line-height: 1.6;
  padding: 2px 8px; border-radius: 6px; letter-spacing: 0.02em; white-space: nowrap;
  border: 1px solid transparent; background: var(--paper-3); color: var(--faint);
}
.prio-p1 { background: var(--seal-soft); color: var(--seal); }
.prio-p2 { background: var(--amber-soft); color: var(--amber); }
.prio-p3 { background: var(--paper-3); color: var(--faint); }

/* 无意义文本警告：高亮提醒（避免误当正常内容放行） */
.meaningless-alert {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  border: 1px solid var(--amber-line); background: var(--amber-soft); color: var(--amber);
  border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 16px; font-size: 13px; line-height: 1.7;
}
.meaningless-alert b { color: var(--amber); font-size: 13px; }
.rv-item.flagged { border-color: var(--amber-line); background: var(--amber-soft); }
.rv-item.flagged:hover { border-color: var(--amber); }

.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
.kbd {
  font-family: var(--font-mono); font-size: 12px; padding: 2px 8px;
  border: 1px solid var(--line-2); border-radius: 6px; color: var(--muted); background: var(--paper-3);
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: grid; gap: 16px; }
.hidden { display: none !important; }

/* Toast */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; pointer-events: none; }
.toast {
  padding: 12px 16px; border-radius: var(--radius); background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 500; box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(8px); animation: toast-in .22s var(--ease) forwards; max-width: 74vw;
}
.toast.err { background: var(--danger); color: var(--on-accent); }
.toast.ok { background: var(--ok); color: var(--on-accent); }
@keyframes toast-in { to { opacity: 1; transform: translateY(0) } }

/* Modal / Drawer */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, 0.45);
  display: grid; place-items: center; z-index: 150; padding: 24px; animation: fade .16s var(--ease);
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: min(560px, 96vw); max-height: 86vh; overflow: auto; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-2);
  padding: 24px; animation: modal-in .22s var(--ease);
}
.modal.wide { width: min(880px, 96vw); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.99) } to { opacity: 1; transform: none } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.modal-title { font-size: 17px; font-weight: 600; margin: 0; }
.modal-body { font-size: 14px; color: var(--ink-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; color: var(--muted);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.icon-btn:hover { background: var(--paper-3); color: var(--ink); }

/* ------------------------------ 站点外壳 ------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: var(--paper); }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: var(--paper-2);
}
.sidebar-head { padding: 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-size: 16px; font-weight: 700; flex: 0 0 auto;
}
.brand-mark img, .brand-mark.has-img { width: 32px; height: 32px; }
.brand-mark img { display: block; object-fit: contain; }
.brand-mark.has-img { background: transparent; border-radius: 50%; padding: 0; object-fit: contain; }

/* 后台：站点 Logo 预览 */
.logo-field { margin-top: 12px; }
.logo-preview {
  width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  background: var(--paper-3); border: 1px solid var(--line); display: grid; place-items: center;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* 后台：目录拖动排序 */
.ord-box { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 8px; background: var(--paper-2); }
.ord-list { display: grid; gap: 2px; }
.ord-list.nested { margin: 2px 0 4px 22px; padding-left: 10px; border-left: 1px dashed var(--line); }
.ord-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm);
  background: var(--paper); border: 1px solid var(--line); cursor: grab;
}
.ord-row:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.ord-row.dragging { opacity: 0.45; cursor: grabbing; }
.ord-grip { color: var(--faint); font-size: 13px; letter-spacing: -1px; }
.ord-kind {
  flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: var(--paper-2);
}
.ord-kind.dir { color: var(--accent-hover); border-color: var(--accent-line); background: var(--accent-soft); }
.ord-name { flex: 1 1 auto; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-count { font-size: 12px; color: var(--faint); flex: 0 0 auto; }
.ord-ops { display: flex; gap: 4px; flex: 0 0 auto; }
.ord-btn { width: 26px; height: 26px; padding: 0; font-size: 12px; line-height: 1; }
.ord-status.err { color: var(--danger); }
@media (max-width: 640px) {
  .ord-grip { display: none; }
  .ord-row { gap: 8px; padding: 6px 8px; }
  .ord-list.nested { margin-left: 10px; padding-left: 8px; }
  .ord-btn { width: 44px; height: 44px; font-size: 14px; }
}
.logo-fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 26px; font-weight: 700;
}
.brand-text { min-width: 0; }
.brand-name { font-size: 15px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--faint); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tree-scroll { flex: 1; overflow: auto; padding: 12px 8px 8px; }
.tree-group-label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--faint); padding: 8px; text-transform: uppercase; }
.tree-node { user-select: none; }
.tree-row {
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--ink-2); cursor: pointer; transition: background .14s var(--ease), color .14s var(--ease);
}
.tree-row:hover { background: var(--paper-3); color: var(--ink); }
.tree-row.active { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.tree-caret {
  width: 16px; height: 16px; flex: 0 0 auto; display: grid; place-items: center;
  color: var(--faint); transition: transform .16s var(--ease); font-size: 12px;
}
.tree-caret.open { transform: rotate(90deg); }
.tree-caret.leaf { opacity: 0; }
.tree-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tree-children { margin-left: 12px; padding-left: 8px; border-left: 1px solid var(--line); overflow: hidden; }
.tree-children.collapsed { display: none; }

.sidebar-foot { border-top: 1px solid var(--line); padding: 12px 8px; display: grid; gap: 4px; }
.foot-link {
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--muted); transition: background .14s var(--ease), color .14s var(--ease);
}
.foot-link:hover { background: var(--paper-3); color: var(--ink); }
.foot-link .ic { width: 16px; height: 16px; opacity: 0.75; }
.sidebar-close { display: none; }

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

.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
  height: var(--topbar-h); padding: 0 24px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
}
.topbar .crumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); min-width: 0; overflow: hidden; }
.topbar .crumbs a { transition: color .14s var(--ease); }
.topbar .crumbs a:hover { color: var(--accent); }
.topbar .crumbs .sep { opacity: 0.45; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hamburger { display: none; }

.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--paper-3); border: 1px solid var(--line); flex: 0 0 auto; }
.avatar-letter {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-hover); font-size: 12px; font-weight: 600; flex: 0 0 auto;
}
.user-chip {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2); font-size: 13px;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.user-chip:hover { border-color: var(--line-2); background: var(--paper-3); }

/* ------------------------------ 阅读正文 ------------------------------- */
.page-wrap { padding: 40px 40px 140px; max-width: 900px; width: 100%; margin: 0 auto; }
.page-head { padding-bottom: 16px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.page-title {
  font-family: var(--font-display); font-size: clamp(28px, 3vw, 36px); line-height: 1.25;
  margin: 0 0 12px; font-weight: 700; letter-spacing: -0.02em;
}
.page-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--faint); }
.page-meta .dot { opacity: 0.5; }

.prose { font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.prose > *:first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display); color: var(--ink); line-height: 1.35;
  margin: 2em 0 12px; font-weight: 600; letter-spacing: -0.005em; scroll-margin-top: 80px;
}
.prose h1 { font-size: 26px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prose h2 { font-size: 20px; }
.prose h3 { font-size: 17px; }
.prose h4 { font-size: 15px; color: var(--ink); }
.prose p { margin: 0 0 16px; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .14s var(--ease), text-decoration-color .14s var(--ease); }
.prose a:hover { color: var(--accent-hover); text-decoration-color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }
.prose blockquote {
  margin: 20px 0; padding: 4px 16px; border-left: 2px solid var(--line-2);
  color: var(--muted); background: transparent;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--faint); }
.prose code {
  font-family: var(--font-mono); font-size: 0.88em; background: var(--paper-3);
  border-radius: 6px; padding: 2px 8px; color: var(--ink);
}
.prose pre {
  background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 16px; overflow: auto; margin: 20px 0; line-height: 1.65;
}
.prose pre code { background: none; border: 0; padding: 0; color: var(--ink); font-size: 13px; }
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; }
.prose thead th { background: var(--paper-3); font-weight: 600; color: var(--ink); border-top: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose img { max-width: 100%; border-radius: var(--radius-md); border: 1px solid var(--line); display: block; margin: 20px auto; }
.prose .wikilink::after { content: "↗"; font-size: 0.7em; opacity: 0.4; margin-left: 4px; }
.prose .wikilink.missing { color: var(--seal); text-decoration-style: dashed; }
.prose .callout {
  margin: 20px 0; padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--line);
  background: var(--paper-3); font-size: 14px;
}
.prose .callout.info { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink-2); }
.prose .callout.warn { border-color: var(--amber-line); background: var(--amber-soft); }
.prose .callout.danger { border-color: var(--danger-line); background: var(--seal-soft); }
.prose .toc { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; background: var(--paper-3); margin: 0 0 24px; }
.prose .empty-state { color: var(--faint); font-style: italic; }

/* 悬浮球 */
.floatball {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px;
}
.fab {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid transparent;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
  box-shadow: var(--shadow-2);
  transition: transform .2s var(--ease), background .16s var(--ease);
}
.fab:hover { transform: translateY(-2px); background: var(--accent-hover); }
.fab.open { transform: rotate(135deg); }
.fab-menu { display: grid; gap: 8px; justify-items: end; }
.fab-item {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--paper-2); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  font-size: 13px; font-weight: 500; color: var(--ink);
  opacity: 0; transform: translateY(12px) scale(.96); pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease), background .16s var(--ease);
}
.fab-menu.show .fab-item { opacity: 1; transform: none; pointer-events: auto; }
.fab-menu.show .fab-item:nth-child(1) { transition-delay: .03s; }
.fab-menu.show .fab-item:nth-child(2) { transition-delay: .06s; }
.fab-menu.show .fab-item:nth-child(3) { transition-delay: .08s; }
.fab-item:hover { background: var(--paper-3); }

/* ------------------------------ 首页（宣传页） -------------------------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.landing-nav {
  display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 40px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper-2) 88%, transparent); backdrop-filter: blur(12px) saturate(1.4);
}
.landing-nav .links { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hero {
  position: relative; overflow: hidden; padding: 96px 40px 72px; text-align: center;
  border-bottom: 1px solid var(--line); background: var(--paper-2);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(58% 60% at 50% -10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 72%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 820px; margin: 0 auto; }
.hero-seal {
  width: 52px; height: 52px; margin: 0 auto 24px; border-radius: var(--radius-md);
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
  font-size: 24px; font-weight: 700;
  animation: rise .5s var(--ease) both;
}
.hero-seal.has-img { background: transparent; border-radius: 50%; }
.hero-seal img { width: 100%; height: 100%; display: block; object-fit: contain; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(32px, 4.4vw, 52px); line-height: 1.15;
  margin: 0 0 16px; font-weight: 700; letter-spacing: -0.005em;
  animation: rise .5s .04s var(--ease) both;
}
.hero .lede {
  font-size: 16px; line-height: 1.7; color: var(--muted); max-width: 580px; margin: 0 auto 32px;
  animation: rise .5s .08s var(--ease) both;
}
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; animation: rise .5s .12s var(--ease) both; }
.hero .cta .btn { height: 44px; padding: 0 24px; font-size: 14px; border-radius: var(--radius-md); }
.hero-stats {
  display: flex; gap: 40px; justify-content: center; margin-top: 48px; flex-wrap: wrap;
  animation: rise .5s .16s var(--ease) both;
}
.hero-stat { text-align: center; min-width: 64px; }
.hero-stat b {
  display: block; font-size: 24px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.hero-stat span { font-size: 12px; color: var(--faint); }
@keyframes rise { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }

.landing-body { flex: 1; padding: 56px 40px 88px; background: var(--paper); }
.landing-body .prose { max-width: 740px; margin: 0 auto; }
.landing-foot {
  border-top: 1px solid var(--line); padding: 24px 40px; font-size: 12px; color: var(--faint);
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; background: var(--paper-2);
}

/* -------------------------- 官网式首页区块 ---------------------------- */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-hover);
}
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

.nav-anchors { display: flex; gap: 20px; align-items: center; margin-right: 8px; }
.nav-anchor {
  background: none; border: 0; cursor: pointer; font-size: 13px; color: var(--muted);
  padding: 4px 2px; transition: color .14s var(--ease);
}
.nav-anchor:hover { color: var(--accent); }
@media (max-width: 860px) { .nav-anchors { display: none; } }

.mk-section { padding: 80px 40px; }
.mk-section > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.mk-section-tint { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mk-sec-head { text-align: center; margin-bottom: 40px; }
.mk-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; }
.mk-title {
  font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); line-height: 1.3;
  font-weight: 700; letter-spacing: -0.005em; margin: 12px 0 8px; color: var(--ink);
}
.mk-sub { font-size: 15px; line-height: 1.75; color: var(--muted); max-width: 640px; margin: 0 auto; }

.mk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.mk-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; transition: border-color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease);
}
.mk-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-1); transform: translateY(-2px); }
.mk-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.mk-card-title { font-size: 15px; font-weight: 600; margin: 16px 0 8px; color: var(--ink); letter-spacing: -0.01em; }
.mk-card-desc { font-size: 14px; line-height: 1.75; color: var(--muted); margin: 0; }

.mk-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.mk-step {
  display: flex; gap: 16px; align-items: flex-start; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
}
.mk-step-n {
  font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--accent);
  line-height: 1.1; letter-spacing: -0.02em;
}
.mk-step .mk-card-title { margin-top: 0; }

.mk-band { background: var(--ink); color: var(--paper-2); }
html[data-theme="night"] .mk-band { background: var(--paper-3); color: var(--ink); border-block: 1px solid var(--line); }
.mk-band-inner {
  max-width: 1120px; margin: 0 auto; padding: 56px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.mk-band-copy { max-width: 480px; }
.mk-band-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.mk-band-sub { font-size: 14px; line-height: 1.75; opacity: 0.75; margin: 0; }
.mk-band-stats { display: flex; gap: 48px; flex-wrap: wrap; }
.mk-band-stat b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mk-band-stat span { font-size: 12px; opacity: 0.65; }

.mk-faq { max-width: 820px; }
.mk-faq-item { border-bottom: 1px solid var(--line); }
.mk-faq-q {
  cursor: pointer; padding: 16px 0; font-size: 15px; font-weight: 600; color: var(--ink);
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.mk-faq-q::-webkit-details-marker { display: none; }
.mk-faq-q::after { content: "+"; font-size: 18px; color: var(--faint); font-weight: 400; }
.mk-faq-item[open] .mk-faq-q::after { content: "−"; color: var(--accent); }
.mk-faq-a { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 0 0 16px; max-width: 720px; }

.mk-cta { text-align: center; padding: 88px 40px; background: var(--paper-2); border-top: 1px solid var(--line); }
.mk-cta-title { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; }
.mk-cta-sub { font-size: 15px; color: var(--muted); margin: 0 0 28px; }
.mk-cta .cta { margin-bottom: 0; }

.mk-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 48px 40px 24px; }
.mk-footer-top {
  max-width: 1120px; margin: 0 auto; display: grid; gap: 32px;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(120px, 1fr));
}
.mk-footer-desc { font-size: 13px; line-height: 1.8; color: var(--muted); margin: 16px 0 0; max-width: 320px; }
.mk-footer-col { display: grid; gap: 8px; align-content: start; }
.mk-footer-title { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--faint); text-transform: uppercase; margin-bottom: 4px; }
.mk-footer-link { font-size: 13px; color: var(--muted); transition: color .14s var(--ease); }
.mk-footer-link:hover { color: var(--accent); }
.mk-footer-bot {
  max-width: 1120px; margin: 32px auto 0; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--faint);
}

@media (max-width: 860px) {
  .mk-section { padding: 56px 16px; }
  .mk-grid { grid-template-columns: 1fr; }
  .mk-steps { grid-template-columns: 1fr; }
  .mk-band-inner { padding: 40px 16px; flex-direction: column; align-items: flex-start; }
  .mk-band-stats { gap: 28px; }
  .mk-band-stat b { font-size: 24px; }
  .mk-cta { padding: 56px 16px; }
  .mk-footer { padding: 32px 16px 20px; }
  .mk-footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .mk-footer-brand { grid-column: 1 / -1; }
  .mk-footer-bot { flex-direction: column; gap: 8px; }
  .mk-faq-q { font-size: 14px; }
}

/* ------------------------------ 编辑器 -------------------------------- */
.editor-shell { display: flex; flex-direction: column; min-height: 100vh; background: var(--paper); }
.editor-top {
  position: sticky; top: 0; z-index: 45; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 92%, transparent); backdrop-filter: blur(12px) saturate(1.4);
}
.editor-head { display: flex; align-items: center; gap: 12px; padding: 12px 24px 8px; }
.editor-title {
  font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: 0; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.editor-title small { font-family: var(--font-body); font-size: 12px; color: var(--faint); margin-left: 8px; letter-spacing: 0; font-weight: 400; }
.editor-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.save-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); transition: background .2s var(--ease); }
.save-dot.dirty { background: var(--amber); }
.save-dot.saved { background: var(--ok); }

.toolbar { display: flex; align-items: center; gap: 4px; padding: 8px 20px; overflow-x: auto; scrollbar-width: none; }
.toolbar::-webkit-scrollbar { display: none; }
.tool-group { display: flex; align-items: center; gap: 4px; padding-right: 8px; margin-right: 8px; border-right: 1px solid var(--line); }
.tool-group:last-of-type { border-right: 0; padding-right: 0; margin-right: 0; }
.tool {
  height: 32px; min-width: 32px; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: transparent; color: var(--ink-2); font-size: 13px; display: inline-flex; align-items: center; gap: 4px;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.tool:hover { background: var(--paper-3); color: var(--ink); }
.tool.active { background: var(--accent-soft); color: var(--accent-hover); }
.tool .lbl { font-size: 12px; }
.tool svg { width: 16px; height: 16px; }

.editor-canvas { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); }
.editor-scroll { overflow: auto; padding: 40px 0 160px; }
.editor-paper {
  max-width: 780px; margin: 0 auto; padding: 0 32px; min-height: 60vh; outline: none;
  font-size: 16px; line-height: 1.8; color: var(--ink-2);
}
.editor-paper:empty::before {
  content: "从这里开始书写…（可用顶部工具栏插入标题、列表、表格、图片等）";
  color: var(--faint);
}
.editor-paper:focus { outline: none; }
.editor-paper .ink-caret { caret-color: var(--accent); }

.editor-side {
  position: fixed; right: 0; top: 0; height: 100vh; width: 360px; border-left: 1px solid var(--line);
  background: var(--paper-2); box-shadow: var(--shadow-2); transform: translateX(100%);
  transition: transform .24s var(--ease); z-index: 70; display: flex; flex-direction: column;
}
.editor-side.show { transform: none; }
.editor-side-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.editor-side-body { overflow: auto; padding: 16px 16px 40px; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.editor-side-body h4 { font-size: 13px; font-weight: 600; margin: 16px 0 8px; color: var(--ink); letter-spacing: 0; }
.editor-side-body code { font-family: var(--font-mono); font-size: 12px; background: var(--paper-3); border-radius: 6px; padding: 2px 4px; }
.editor-side-body .syntax-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.editor-status {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 16px; padding: 8px 24px;
  border-top: 1px solid var(--line); background: var(--paper-2); font-size: 12px; color: var(--faint);
}
.preview-pane { max-width: 780px; margin: 0 auto; padding: 0 32px 140px; }

/* ------------------------------ 列表 / 表格 ---------------------------- */
.list { display: grid; gap: 4px; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius);
  border: 1px solid transparent; transition: background .14s var(--ease), border-color .14s var(--ease);
}
.list-item:hover { background: var(--paper-2); border-color: var(--line); }
.list-item .t { font-size: 14px; font-weight: 500; color: var(--ink); }
.list-item .s { font-size: 12px; color: var(--faint); }
.list-item .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: 12px; letter-spacing: 0.04em; color: var(--faint); font-weight: 600; text-transform: uppercase; background: var(--paper-3); }
.table tr:hover td { background: color-mix(in srgb, var(--paper-3) 60%, transparent); }

/* ------------------------------ 审核控制台 ----------------------------- */
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: calc(100vh - var(--topbar-h)); }
.review-main { padding: 28px 32px 140px; min-width: 0; }
.review-side {
  border-left: 1px solid var(--line); background: var(--paper-2); display: flex; flex-direction: column;
  max-height: calc(100vh - var(--topbar-h)); position: sticky; top: var(--topbar-h);
}
.review-side-head { padding: 16px; border-bottom: 1px solid var(--line); }
.review-side-list { overflow: auto; flex: 1; padding: 8px; display: grid; gap: 8px; align-content: start; }
.rv-item {
  text-align: left; width: 100%; border: 1px solid var(--line); background: var(--paper-2);
  border-radius: var(--radius-md); padding: 12px; display: grid; gap: 8px;
  transition: border-color .14s var(--ease), background .14s var(--ease), box-shadow .14s var(--ease);
}
.rv-item:hover { border-color: var(--line-2); background: var(--paper-3); }
.rv-item.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rv-item-top { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rv-item-title { font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-item-bot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); }
.risk-badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.risk-normal { background: var(--ok-soft); color: var(--ok); }
.risk-suspect { background: var(--amber-soft); color: var(--amber); }
.risk-violation { background: var(--seal-soft); color: var(--seal); }
.susp-bar { height: 8px; border-radius: 999px; background: var(--paper-3); overflow: hidden; flex: 1; min-width: 40px; }
.susp-fill { height: 100%; border-radius: 999px; transition: width .4s var(--ease); }
.susp-num { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; width: 40px; text-align: right; color: var(--ink-2); }

.verdict { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--paper-2); }
.verdict-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.verdict-score { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.verdict-body { padding: 20px 24px; display: grid; gap: 16px; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px; font-size: 13px; }
.kv .k { color: var(--faint); font-size: 12px; }
.excerpt {
  font-size: 13px; line-height: 1.8; background: var(--paper-3); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 16px; max-height: 320px; overflow: auto; white-space: pre-wrap;
  font-family: var(--font-mono); color: var(--ink-2);
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--muted);
  border: 0; border-bottom: 2px solid transparent; background: none; white-space: nowrap;
  transition: color .14s var(--ease), border-color .14s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent-hover); border-bottom-color: var(--accent); font-weight: 600; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.metric { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; background: var(--paper-2); }
.metric b { display: block; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.metric span { font-size: 12px; color: var(--faint); }

/* ------------------------------ 后台设置 ------------------------------- */
.admin-layout { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: calc(100vh - var(--topbar-h)); }
.admin-nav {
  border-right: 1px solid var(--line); padding: 20px 12px; background: var(--paper-2);
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow: auto;
}
.admin-nav a {
  display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 4px;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.admin-nav a:hover { background: var(--paper-3); color: var(--ink); }
.admin-nav a.active { background: var(--accent-soft); color: var(--accent-hover); }
.admin-body { padding: 28px 32px 140px; min-width: 0; max-width: 1080px; }
.section { margin-bottom: 40px; }
.section > h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; color: var(--ink); }
.section > .desc { font-size: 12px; color: var(--faint); margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }

.warn-box {
  border: 1px solid var(--danger-line); background: var(--seal-soft); color: var(--seal);
  border-radius: var(--radius-md); padding: 16px; font-size: 13px; line-height: 1.7;
}
.warn-box strong { color: var(--danger); }

/* 登录 */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 48px 24px; background: var(--paper); }
.auth-card { width: min(420px, 96vw); }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.auth-switch a { color: var(--accent); font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

.tip { font-size: 12px; color: var(--faint); border-left: 2px solid var(--line-2); padding-left: 12px; line-height: 1.7; }

/* 版本对比 */
.diff { font-family: var(--font-mono); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.diff .add { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.diff .del { background: color-mix(in srgb, var(--danger) 12%, transparent); }

/* 空状态 */
.empty { text-align: center; padding: 64px 24px; color: var(--faint); }
.empty .mark { font-size: 24px; opacity: 0.3; margin-bottom: 12px; }

/* ------------------------------ 响应式 -------------------------------- */
@media (max-width: 1080px) {
  .review-layout { grid-template-columns: minmax(0, 1fr); }
  .review-side { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav {
    position: static; height: auto; display: flex; gap: 8px; overflow-x: auto;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 12px;
  }
  .admin-nav a { white-space: nowrap; margin-bottom: 0; }
}

@media (max-width: 860px) {
  :root { --topbar-h: 56px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 90;
    transform: translateX(-100%); transition: transform .24s var(--ease);
    box-shadow: var(--shadow-2);
  }
  .sidebar.show { transform: none; }
  .hamburger { display: inline-flex; }
  .topbar { padding: 0 16px; gap: 8px; }
  .topbar .crumbs { display: none; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { padding: 0 8px; }
  .user-chip > span:last-child { display: none; }
  .user-chip { padding: 0 4px; }
  .page-wrap { padding: 28px 20px 140px; }
  .page-title { font-size: 26px; }
  .landing-nav { padding: 0 16px; }
  .landing-nav .links .btn span { display: none; }
  .landing-nav .brand-sub { display: none; }
  .hero { padding: 64px 20px 48px; }
  .hero h1 { font-size: clamp(30px, 8vw, 40px); }
  .hero .lede { font-size: 15px; }
  .hero-stats { gap: 28px; margin-top: 36px; }
  .landing-body { padding: 40px 20px 64px; }
  .landing-foot { padding: 20px; }
  .editor-head { padding: 12px 16px 8px; gap: 8px; }
  .editor-head .right .btn span { display: none; }
  .toolbar { padding: 8px 12px; }
  .editor-paper, .preview-pane { padding: 0 20px; }
  .editor-scroll { padding: 24px 0 140px; }
  .editor-status { padding: 8px 16px; gap: 12px; }
  .review-main { padding: 20px 16px 120px; }
  .admin-body { padding: 20px 16px 140px; }
  .floatball { right: 16px; bottom: 16px; }
  .modal { padding: 20px; }

  /* 移动端触控目标 ≥44px（Apple HIG） */
  .btn, .btn.sm, .icon-btn, .fab-item, .input, .select, .tab, .tool, .foot-link { min-height: 44px; }
  .icon-btn { min-width: 44px; }
  .tool { min-width: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* 运行状态页：指标条 */
.rs-bar { height: 6px; border-radius: 999px; background: var(--paper-3); overflow: hidden; margin-top: 10px; }
.rs-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.4s ease; }
.metric > span + .rs-bar { margin-top: 8px; }

/* ============================ 扩展 Markdown 语法 ============================ */
.prose mark { background: #fff3bf; color: inherit; padding: 0.05em 0.25em; border-radius: 3px; box-decoration-break: clone; }
.prose sup, .prose sub { font-size: 0.75em; line-height: 0; }
.prose kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0.1em 0.4em; font-size: 0.86em; background: var(--paper-2); font-family: var(--font-mono, ui-monospace, monospace); }

.md-fold { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-2); margin: 1em 0; overflow: hidden; }
.md-fold > summary { cursor: pointer; padding: 11px 14px; font-weight: 600; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.md-fold > summary::-webkit-details-marker { display: none; }
.md-fold > summary::before { content: '▸'; color: var(--faint); transition: transform 0.15s ease; }
.md-fold[open] > summary::before { transform: rotate(90deg); }
.md-fold > summary:hover { background: color-mix(in srgb, var(--paper-3) 70%, transparent); }
.md-fold-body { padding: 2px 16px 12px; border-top: 1px solid var(--line); }

.md-cols { display: grid; gap: 16px; margin: 1em 0; }
.md-cols > .md-col { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; background: var(--paper-2); min-width: 0; }
.md-cols > .md-col > :first-child { margin-top: 0; }
.md-cols > .md-col > :last-child { margin-bottom: 0; }
@media (max-width: 640px) { .md-cols { grid-template-columns: 1fr !important; } }

.prose .callout-title { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.prose li > input[type="checkbox"] { margin-right: 6px; accent-color: var(--accent); }

/* ============================== 表情库面板 ============================== */
.emoji-pop { position: fixed; z-index: 320; width: 328px; max-width: calc(100vw - 16px); background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius-md); box-shadow: 0 20px 48px -20px rgba(15, 23, 42, 0.35); padding: 10px; }
.emoji-panel .input.sm { width: 100%; padding: 6px 10px; font-size: 13px; margin-bottom: 8px; }
.emoji-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.emoji-tab { border: 0; background: transparent; color: var(--ink-2); font-size: 12.5px; padding: 4px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.emoji-tab:hover { background: var(--paper-3); }
.emoji-tab.active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; }
.emoji-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; max-height: 232px; overflow-y: auto; }
.emoji-item { border: 0; background: transparent; font-size: 19px; line-height: 1; padding: 5px 0; border-radius: 6px; cursor: pointer; }
.emoji-item:hover { background: var(--paper-3); transform: scale(1.08); }
@media (max-width: 640px) { .emoji-grid { grid-template-columns: repeat(7, 1fr); } .emoji-item { font-size: 22px; padding: 8px 0; } }

/* ============================ 评论 Markdown 工具栏 ============================ */
.md-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; border: 1px solid var(--line-2); border-bottom: 0; border-radius: var(--radius-md) var(--radius-md) 0 0; background: var(--paper-2); }
.md-toolbar .mtb { border: 0; background: transparent; color: var(--ink-2); font-size: 12.5px; padding: 5px 8px; border-radius: 6px; cursor: pointer; line-height: 1; min-height: 30px; }
.md-toolbar .mtb:hover { background: var(--paper-3); color: var(--ink); }
.md-toolbar .mtb.active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.md-toolbar .mtb-sep { width: 1px; height: 16px; background: var(--line-2); margin: 0 4px; }
.comment-input-wrap .textarea { border-radius: 0; }
.comment-input-wrap .textarea:focus { outline: none; box-shadow: none; border-color: var(--line-2); }
.comment-preview { border: 1px solid var(--line-2); border-radius: 0; padding: 10px 12px; min-height: 76px; background: var(--paper); font-size: 14px; }
.comment-emoji-pop { position: absolute; z-index: 60; }
@media (max-width: 640px) { .md-toolbar .mtb { min-height: 38px; padding: 8px 10px; font-size: 13px; } }

/* ====================== 服务器官网首页（MTR 城建服务器） ====================== */
.hero-ip { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; padding: 8px 10px 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper-2); }
.hero-ip-label { font-size: 12px; letter-spacing: 0.08em; color: var(--faint); }
.hero-ip-value { font-family: var(--font-mono, ui-monospace, monospace); font-size: 14px; color: var(--ink); background: transparent; padding: 0; }
.mk-cta-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }

.mk-intro { max-width: 780px; margin: 0 auto; }
.mk-intro p { font-size: 15px; line-height: 1.9; color: var(--ink-2); margin: 0 0 14px; }
.mk-meta-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; max-width: 780px; margin: 22px auto 0; }
.mk-meta { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-2); min-width: 0; }
.mk-meta .k { font-size: 11.5px; letter-spacing: 0.08em; color: var(--faint); }
.mk-meta .v { font-size: 13.5px; color: var(--ink); word-break: break-all; }
.mk-note { text-align: center; font-size: 12.5px; color: var(--faint); margin-top: 14px; }

.mk-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.mk-shot { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--paper-2); }
.mk-shot img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.mk-shot-cap { padding: 9px 12px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--line); }
.mk-shot-empty { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 34px 18px; border: 1px dashed var(--line-2); border-radius: var(--radius-md); color: var(--ink-2); text-align: center; }

.mk-rules { max-width: 780px; margin: 0 auto; padding-left: 0; list-style: none; counter-reset: rule; }
.mk-rules li { position: relative; counter-increment: rule; padding: 13px 16px 13px 46px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-2); margin-bottom: 10px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.mk-rules li::before { content: counter(rule); position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (max-width: 640px) { .hero-ip { width: 100%; justify-content: space-between; } .mk-intro p { font-size: 14.5px; } }

/* ============================ 账号入口 / 网页登录 ============================ */
.mk-accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.mk-account { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 26px 26px 22px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease); }
.mk-account::after { content: ''; position: absolute; inset: 0 0 auto; height: 3px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 20%, transparent)); opacity: .85; }
.mk-account:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: var(--shadow-2); }
.mk-account-head { display: flex; align-items: center; justify-content: space-between; }
.mk-account-head .mk-icon { margin: 0; }
.mk-account-tag { font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.mk-account-tag.alt { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.mk-account .mk-card-title { margin: 16px 0 8px; font-size: 17px; }
.mk-account-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 18px; }
.mk-step-accent { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 4%, var(--paper-2)); }
.mk-step-accent .mk-step-n { color: var(--accent); border-color: var(--accent-line); }

/* 统一账号单点登录区块（登录 / 注册页） */
.sso-block { margin-bottom: 6px; }
.sso-btn { width: 100%; height: 44px; gap: 10px; font-size: 14px; font-weight: 600; justify-content: center; border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.sso-btn:hover { background: color-mix(in srgb, var(--accent) 14%, var(--paper-2)); border-color: var(--accent); color: var(--accent-hover); }
.sso-hint { margin: 9px 0 0; text-align: center; font-size: 12px; color: var(--faint); }
.sso-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--faint); font-size: 12px; }
.sso-divider::before, .sso-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sso-divider span { white-space: nowrap; }

/* 网页登录独立页 */
.weblogin-hero { padding-bottom: 56px; }
.wl-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .wl-wrap { grid-template-columns: 1fr; } }
.wl-card { padding: 28px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.wl-label { font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.wl-code { margin: 12px 0 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 40px; font-weight: 700; letter-spacing: .16em; color: var(--accent); }
.wl-hint { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 10px 0 0; }
.wl-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.wl-auto { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.wl-steps { display: grid; gap: 12px; }
.wl-step { display: flex; gap: 14px; padding: 18px 20px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-md); }
.wl-step-n { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--accent-line); color: var(--accent); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wl-step-t { font-size: 14px; font-weight: 600; color: var(--ink); }
.wl-step-d { margin: 6px 0 0; font-size: 13px; line-height: 1.75; color: var(--muted); }
.wl-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.wl-note { max-width: 860px; margin: 20px auto 0; text-align: center; font-size: 12px; line-height: 1.9; color: var(--faint); }

/* ============================= 插件系统 ============================== */
/* ---- 投票卡片（正文 / 评论内嵌） ---- */
.poll-embed { margin: 18px 0; }
.poll-card {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  background: var(--paper-2);
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
}
.poll-card.poll-closed { background: var(--paper-3); }
.poll-disabled, .poll-skeleton { color: var(--faint); font-size: 13px; text-align: center; padding: 18px; }
.poll-head { margin-bottom: 12px; }
.poll-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); line-height: 1.45; }
.poll-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--faint); align-items: center; }
.poll-status {
  padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.poll-status.closed { color: var(--faint); background: var(--paper-3); border-color: var(--line-2); }
.poll-opts { display: flex; flex-direction: column; gap: 8px; }
.poll-opt {
  position: relative; display: grid; grid-template-columns: 18px 1fr auto;
  align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); cursor: pointer; overflow: hidden;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.poll-opt:hover { border-color: var(--accent-line); }
.poll-opt.picked { border-color: var(--accent-line); background: var(--accent-soft); }
.poll-opt input { margin: 0; accent-color: var(--accent); width: 15px; height: 15px; }
.poll-opt input:disabled { cursor: default; }
.poll-opt-text { font-size: 13.5px; color: var(--ink); position: relative; z-index: 1; }
.poll-opt-num { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.poll-bar {
  position: absolute; left: 0; bottom: 0; height: 100%; width: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent);
  pointer-events: none; z-index: 0;
}
.poll-bar-fill { display: block; height: 100%; background: color-mix(in srgb, var(--accent) 12%, transparent); transition: width 0.3s var(--ease); }
.poll-actions { display: flex; align-items: center; gap: 10px; margin-top: 13px; flex-wrap: wrap; }
.poll-hint { font-size: 12px; color: var(--faint); }

/* ---- 插件管理（设置 → 插件管理） ---- */
.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.plugin-card {
  border: 1px solid var(--line-2); border-radius: var(--radius-md);
  background: var(--paper-2); padding: 16px; transition: box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.plugin-card.on { border-color: var(--accent-line); }
.plugin-card:hover { box-shadow: var(--shadow-1); }
.plugin-card-head { display: flex; align-items: flex-start; gap: 10px; }
.plugin-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
  display: grid; place-items: center; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.plugin-name { display: flex; align-items: baseline; gap: 8px; font-size: 15px; color: var(--ink); }
.plugin-ver { font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); }
.plugin-author { font-size: 12px; color: var(--faint); margin-top: 2px; }
.plugin-badge {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  color: var(--faint); background: var(--paper-3); border: 1px solid var(--line-2);
}
.plugin-badge.on { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.plugin-summary { margin-top: 12px; font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.plugin-stat { margin-top: 10px; font-size: 12.5px; color: var(--accent); font-variant-numeric: tabular-nums; }
.plugin-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 11.5px; color: var(--faint); }
.plugin-meta code { font-family: var(--font-mono); background: var(--paper-3); padding: 1px 6px; border-radius: 5px; }
.plugin-desc-body { margin-top: 12px; border-top: 1px dashed var(--line-2); padding-top: 12px; }
.plugin-desc-pre {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: var(--ink-2);
  white-space: pre-wrap; margin: 0 0 10px; background: var(--paper); border-radius: var(--radius-sm);
  padding: 10px 12px; border: 1px solid var(--line);
}
.plugin-provides { display: flex; flex-wrap: wrap; gap: 6px; }
.plugin-chip { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 2px 8px; border-radius: 6px; }

/* ---- 工单 ---- */
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .ticket-layout { grid-template-columns: 1fr; } }
.ticket-form, .ticket-list { padding: 18px; }
.ticket-form-title { font-family: var(--font-display); font-size: 17px; margin: 0 0 6px; color: var(--ink); }
.ticket-form .field { margin-bottom: 12px; }
.ticket-pill {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; font-weight: 600;
  border: 1px solid var(--line-2); color: var(--faint); background: var(--paper-3);
}
.ticket-pill.st-pending { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-line); }
.ticket-pill.st-processing { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.ticket-pill.st-replied { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.ticket-pill.st-closed { color: var(--faint); }
.ticket-item, .ticket-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.ticket-item + .ticket-item, .ticket-row + .ticket-row { margin-top: 8px; }
.ticket-item:hover, .ticket-row:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.ticket-item-title { font-size: 13.5px; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-item-meta { font-size: 11.5px; color: var(--faint); margin-top: 3px; font-variant-numeric: tabular-nums; }
.ticket-excerpt { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-chevron { color: var(--faint); font-size: 18px; line-height: 1; }
.ticket-head { display: flex; gap: 10px; align-items: flex-start; }
.ticket-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--ink); }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--faint); }
.ticket-body { margin-top: 14px; }
.ticket-thread { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ticket-bubble { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--paper); }
.ticket-bubble.author { border-left: 3px solid var(--line-2); }
.ticket-bubble.staff { border-left: 3px solid var(--accent); background: var(--accent-soft); }
.ticket-bubble-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); margin-bottom: 6px; flex-wrap: wrap; }
.ticket-bubble-head b { color: var(--ink); font-size: 12.5px; }
.ticket-bubble-body { font-size: 13.5px; line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.ticket-staff-tag { font-size: 11px; color: var(--accent); background: var(--paper-2); border: 1px solid var(--accent-line); padding: 0 6px; border-radius: 999px; }
.ticket-reply { margin-top: 14px; border-top: 1px dashed var(--line-2); padding-top: 12px; }
.ticket-closed-note { margin-top: 14px; font-size: 12.5px; color: var(--faint); background: var(--paper-3); border-radius: var(--radius-sm); padding: 10px 12px; }
.review-tickets { padding: 2px 0; }
.ticket-review-list { display: flex; flex-direction: column; }
@media (max-width: 640px) {
  .plugin-grid { grid-template-columns: 1fr; }
  .poll-card { padding: 14px; }
  .ticket-item, .ticket-row { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .poll-opt, .poll-bar-fill, .ticket-item, .ticket-row, .plugin-card { transition: none; }
}

/* ============================= 站内信 ============================== */
.notice-bell { position: relative; }
.notice-badge {
  position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; background: var(--seal); color: #fff;
  font-size: 10.5px; line-height: 16px; text-align: center; font-weight: 700;
  box-shadow: 0 0 0 2px var(--paper-2); font-variant-numeric: tabular-nums;
}
.notice-bell.has-unread { color: var(--accent); }
.notice-page { max-width: 900px; }
.notice-head { margin-bottom: 14px; }
.notice-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notice-title { font-family: var(--font-display); font-size: 22px; margin: 0 0 4px; color: var(--ink); }
.notice-list { display: flex; flex-direction: column; gap: 8px; }
.notice-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-2);
  cursor: pointer; transition: border-color 0.16s var(--ease), background 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.notice-item:hover { border-color: var(--accent-line); box-shadow: var(--shadow-1); }
.notice-item.unread { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 4%, var(--paper-2)); }
.notice-icon {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; display: grid; place-items: center;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.notice-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notice-item-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.notice-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--seal); display: inline-block; }
.notice-kind {
  font-size: 11px; padding: 1px 7px; border-radius: 999px; white-space: nowrap;
  color: var(--faint); background: var(--paper-3); border: 1px solid var(--line-2);
}
.notice-kind.kind-ticket { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.notice-kind.kind-poll { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-line); }
.notice-kind.kind-system { color: var(--faint); }
.notice-item-body { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.6; word-break: break-word; }
.notice-item-meta { font-size: 11.5px; color: var(--faint); margin-top: 5px; font-variant-numeric: tabular-nums; }
.notice-item-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
@media (max-width: 640px) {
  .notice-item { flex-wrap: wrap; }
  .notice-item-actions { width: 100%; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .notice-item { transition: none; }
}

/* =====================================================================
   股票市场（插件 stock）— 简约现代：单蓝强调色、发丝线边框、克制阴影
   ===================================================================== */
.stk-page { --stk-up: #d92d20; --stk-down: #067647; }
html[data-theme="night"] .stk-page { --stk-up: #f97066; --stk-down: #3ddc97; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="day"]) .stk-page { --stk-up: #f97066; --stk-down: #3ddc97; }
}

.ta-r { text-align: right; }
.ta-c { text-align: center; }
.stk-page .up { color: var(--stk-up); }
.stk-page .down { color: var(--stk-down); }
.stk-page .flat { color: var(--faint); }
.btn.danger-ghost { color: var(--danger); border-color: var(--danger-line); background: transparent; }
.btn.danger-ghost:hover { background: color-mix(in srgb, var(--danger) 7%, var(--paper-2)); }

/* 头部与页签 */
.stk-head { display: flex; flex-direction: column; gap: 16px; margin: 4px 0 18px; }
.stk-head-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stk-brand { display: flex; align-items: center; gap: 12px; }
.stk-brand-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.stk-title { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
.stk-sub { font-size: 13px; color: var(--muted); margin: 3px 0 0; }
.stk-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.stk-tab {
  padding: 9px 14px 10px; font-size: 13.5px; color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .14s var(--ease), border-color .14s var(--ease);
}
.stk-tab:hover { color: var(--ink-2); }
.stk-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.stk-body { display: flex; flex-direction: column; gap: 16px; }

/* 指标卡 */
.stk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stk-stat {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
}
.stk-stat .k { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--faint); }
.stk-stat .v { font-size: 17px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stk-stat .h { font-size: 11.5px; color: var(--muted); }

/* 两栏布局 */
.stk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
/* 侧栏仅在有内容时占位（成交明细/资产排行已移至页面底部） */
.stk-grid:has(> .stk-side) { grid-template-columns: minmax(0, 1fr) 320px; }
.stk-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stk-side { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 980px) {
  .stk-grid, .stk-grid:has(> .stk-side) { grid-template-columns: minmax(0, 1fr); }
}

/* 卡片 */
.stk-card {
  padding: 16px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 10px;
}
.stk-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stk-card-head b { font-size: 14px; color: var(--ink); }
.stk-card-sub { font-size: 11.5px; color: var(--faint); }
.stk-card-link { font-size: 12px; color: var(--accent); }
.stk-note { font-size: 12px; line-height: 1.7; color: var(--faint); margin: 0; }

/* 表格 */
.stk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stk-table th:first-child, .stk-table td:first-child { min-width: 240px; }
.stk-table th {
  padding: 9px 12px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--faint);
  text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.stk-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.stk-table tr:last-child td { border-bottom: none; }
.stk-table tbody tr { transition: background .12s var(--ease); }
.stk-table tbody tr:hover { background: var(--paper-3); }
.stk-row-link { cursor: pointer; }
.stk-co { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stk-co > div { flex: 1 1 auto; min-width: 0; }
.stk-regime, .stk-index-tag { flex: none; white-space: nowrap; }
.stk-code {
  flex: none; padding: 3px 7px; border-radius: 6px; font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.stk-code.sm { font-size: 10px; padding: 2px 5px; }
.stk-code.lg { font-size: 12.5px; padding: 5px 9px; }
.stk-co-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.stk-co-sub { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.stk-co-main { flex: 1 1 auto; min-width: 0; }
/* 名称行：名称 + 行业必须在同一行，风向徽标空间不够时才换行 */
.stk-co-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.stk-co-title { flex: none; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.stk-co-sector {
  flex: 1 1 auto; min-width: 0; max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; color: var(--faint);
}
.stk-co-name .stk-regime { margin-left: 0; }
.stk-price { display: flex; flex-direction: column; gap: 1px; font-variant-numeric: tabular-nums; }
.stk-price b { font-size: 14px; font-weight: 700; }
.stk-price span { font-size: 11.5px; }
.stk-spark { display: inline-block; width: 84px; height: 26px; }
.stk-spark svg { width: 100%; height: 100%; }
.stk-spark-flat { font-size: 11.5px; color: var(--faint); }

/* 标签 */
.stk-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: var(--muted); background: var(--paper-3); border: 1px solid var(--line);
}
.stk-pill.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.stk-pill.warn { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-line); }
.stk-pill.bad { color: var(--danger); background: var(--seal-soft); border-color: var(--seal-line); }

/* 成交/账本流 */
.stk-feed { display: flex; flex-direction: column; }
.stk-feed-row {
  display: grid; grid-template-columns: auto minmax(52px, auto) minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 7px 0; font-size: 12px; color: var(--ink-2); border-bottom: 1px dashed var(--line);
}
.stk-feed-row:last-child { border-bottom: none; }

/* 成交明细：页面底部整宽卡片，按可用宽度自动分多列 */
.stk-tape-card { margin-top: 16px; }
.stk-tape-card .stk-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  column-gap: 28px;
}
.stk-tape-card .stk-feed-row { border-bottom: 1px dashed var(--line); }
@media (max-width: 760px) {
  .stk-tape-card .stk-feed { grid-template-columns: 1fr; column-gap: 0; }
}

/* 资产排行：页面底部整宽卡片，按可用宽度自动分多列 */
.stk-rank-card { margin-top: 16px; }
.stk-rank-card .stk-rank {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  column-gap: 28px;
}
.stk-rank-card .stk-rank-row { border-bottom: 1px dashed var(--line); }
@media (max-width: 760px) {
  .stk-rank-card .stk-rank { grid-template-columns: 1fr; column-gap: 0; }
}
.stk-side-tag { padding: 1px 5px; border-radius: 5px; font-size: 10.5px; font-weight: 700; }
.stk-side-tag.buy { color: var(--stk-up); background: color-mix(in srgb, var(--stk-up) 10%, transparent); }
.stk-side-tag.sell { color: var(--stk-down); background: color-mix(in srgb, var(--stk-down) 10%, transparent); }
.stk-feed-code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; color: var(--faint); }
.stk-feed-qty { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk-feed-user { color: var(--faint); font-size: 11px; }
.stk-feed-delta { font-weight: 700; font-variant-numeric: tabular-nums; }

/* 排行 */
.stk-rank { display: flex; flex-direction: column; }
.stk-rank-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line); }
.stk-rank-row:last-child { border-bottom: none; }
.stk-rank-n { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.stk-rank-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk-rank-val { color: var(--ink); font-variant-numeric: tabular-nums; }

/* 行情抬头 */
.stk-quote {
  padding: 18px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 14px;
}
.stk-quote-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stk-quote-title h2 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0; }
.stk-quote-price { display: flex; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; }
.stk-quote-price b { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.stk-quote-price span { font-size: 13px; }
.stk-quote-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.stk-quote-intro { font-size: 13px; line-height: 1.75; color: var(--muted); margin: 0; }
.stk-chart { border-radius: 12px; background: var(--paper-3); padding: 6px; }
.stk-chart svg { display: block; width: 100%; height: 168px; }
.stk-senti {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px;
  border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.stk-senti-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent); }
.stk-senti-text { font-size: 12px; color: var(--muted); }

/* 交易面板 */
.stk-trade-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.stk-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stk-field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.stk-field-hint { font-size: 11.5px; color: var(--faint); line-height: 1.6; }
.stk-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.stk-trade-est { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stk-trade-pos { color: var(--faint); }
.stk-trade-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stk-trade-actions .btn { justify-content: center; }
.stk-trade-hint { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); }
.stk-trade-guest { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stk-margin {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px;
  font-size: 11.5px; color: var(--ink-2); background: var(--ok-soft); border: 1px solid var(--ok-line);
}
.stk-margin.bad { background: var(--seal-soft); border-color: var(--seal-line); color: var(--danger); }
.stk-alert {
  padding: 10px 12px; border-radius: 10px; font-size: 12.5px;
  background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--amber);
}

/* 公告 */
.stk-anns { display: flex; flex-direction: column; gap: 10px; }
.stk-ann { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.stk-ann:last-child { border-bottom: none; }
.stk-ann-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stk-ann-head b { font-size: 13.5px; color: var(--ink); }
.stk-ann-time { font-size: 11px; color: var(--faint); margin-left: auto; }
.stk-ann-body { font-size: 12.5px; line-height: 1.7; color: var(--muted); margin: 0; }
.stk-ann-foot { font-size: 11px; color: var(--faint); }
.stk-ann-list { display: flex; flex-direction: column; gap: 12px; }
.stk-ann-card {
  padding: 16px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px;
}
.stk-ann-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stk-ann-card-title { font-size: 15px; color: var(--ink); }
.stk-ann-card-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); }
.stk-ann-card-meta a { color: var(--accent); }
.stk-ann-card-body { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); margin: 0; white-space: pre-wrap; }
.stk-ann-ai {
  font-size: 11.5px; color: var(--muted); padding: 7px 10px; border-radius: 8px;
  background: var(--paper-3); border: 1px solid var(--line);
}
.stk-ann-card-actions { display: flex; justify-content: flex-end; gap: 6px; }

/* 讨论 */
.stk-threads { display: flex; flex-direction: column; }
.stk-thread-row {
  display: flex; flex-direction: column; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--line);
  transition: color .12s var(--ease);
}
.stk-thread-row:last-child { border-bottom: none; }
.stk-thread-row:hover .stk-thread-title { color: var(--accent); }
.stk-thread-title { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.stk-thread-meta { font-size: 11px; color: var(--faint); }
.stk-thread-list { display: flex; flex-direction: column; gap: 10px; }
.stk-thread-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-1); transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}
.stk-thread-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-2); }
.stk-thread-card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stk-thread-card-title b { font-size: 14px; color: var(--ink); }
.stk-thread-card-excerpt { font-size: 12.5px; line-height: 1.7; color: var(--muted); margin: 6px 0; }
.stk-thread-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); }
.stk-thread-card-stat { display: grid; grid-template-columns: auto auto; gap: 0 4px; text-align: center; font-size: 11px; color: var(--faint); }
.stk-thread-card-stat b { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stk-thread-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stk-thread-head-main h2 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 6px 0; }
.stk-thread-head-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--faint); align-items: center; }
.stk-thread-head-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.stk-post { padding: 16px 18px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.stk-post-body { font-size: 14px; line-height: 1.85; color: var(--ink-2); margin: 0; white-space: pre-wrap; }
.stk-replies { display: flex; flex-direction: column; }
.stk-reply { padding: 12px 0; border-bottom: 1px solid var(--line); }
.stk-reply:last-child { border-bottom: none; }
.stk-reply-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.stk-reply-head b { font-size: 12.5px; color: var(--ink); }
.stk-reply-ai { color: var(--faint); font-size: 11px; }
.stk-reply-body { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); margin: 6px 0 6px; white-space: pre-wrap; }
.stk-reply-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.stk-reply-children { margin: 8px 0 0 14px; padding-left: 12px; border-left: 2px solid var(--line); }
.stk-reply.nested { border-bottom: none; padding: 8px 0; }
.stk-link {
  padding: 0; background: none; border: none; cursor: pointer; font-size: 11.5px; color: var(--faint);
  transition: color .12s var(--ease);
}
.stk-link:hover { color: var(--accent); }
.stk-link.active { color: var(--accent); font-weight: 600; }
.stk-link.danger { color: var(--danger); }
.stk-reply-box .textarea { min-height: 76px; }
.stk-reply-hint { font-size: 11.5px; color: var(--accent); }

/* 工具条 / 表单 */
.stk-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stk-toolbar-left, .stk-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stk-toolbar .input, .stk-toolbar .select { min-width: 180px; }
.stk-chips { display: flex; gap: 4px; }
.stk-chip {
  padding: 5px 11px; border-radius: 999px; font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); background: var(--paper-2); transition: all .14s var(--ease);
}
.stk-chip:hover { color: var(--ink-2); border-color: var(--line-2); }
.stk-chip.active { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); font-weight: 600; }
.stk-form { display: grid; gap: 12px; }
.stk-form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.stk-compose { border-color: var(--accent-line); }

/* 分页 */
.stk-pager { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.stk-page {
  display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px;
  font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); background: var(--paper-2);
}
.stk-page:hover { border-color: var(--line-2); color: var(--ink-2); }
.stk-page.active { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); font-weight: 600; }

/* 空态 / 加载 / 错误 */
.stk-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 20px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--radius-lg); color: var(--faint); font-size: 13px;
}
.stk-empty-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.stk-empty-text { color: var(--muted); }
.stk-mini-empty { padding: 14px 0; font-size: 12.5px; color: var(--faint); }
.stk-loading { padding: 30px 0; text-align: center; font-size: 13px; color: var(--faint); }
.stk-error {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius-lg);
  background: var(--seal-soft); border: 1px solid var(--seal-line); color: var(--danger); font-size: 13px;
}

/* 管理台 */
.stk-admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.stk-admin-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 9px;
  font-size: 13px; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line);
  transition: all .14s var(--ease);
}
.stk-admin-tab:hover { color: var(--ink-2); border-color: var(--line-2); }
.stk-admin-tab.active { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); font-weight: 600; }
.stk-admin-tab .ic { display: inline-flex; }
.stk-admin-title { font-size: 14px; color: var(--ink); }
.stk-inline-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.stk-inline-actions .select.sm { padding: 4px 8px; font-size: 12px; }
.stk-review-list { display: flex; flex-direction: column; gap: 10px; }
.stk-review-card {
  padding: 14px 16px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px;
}
.stk-review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stk-review-head b { font-size: 13.5px; color: var(--ink); }
.stk-review-score { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stk-review-time { margin-left: auto; font-size: 11px; color: var(--faint); }
.stk-review-excerpt { font-size: 12.5px; line-height: 1.7; color: var(--muted); margin: 0; }
.stk-review-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stk-config-form { max-width: 720px; }

/* 走势图（SVG 通过 class 上色，SVG 属性不支持 var()） */
.stk-chart .stk-line, .stk-spark .stk-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.stk-spark .stk-line { stroke-width: 1.6; }
.stk-chart .stk-line.up, .stk-spark .stk-line.up { stroke: var(--stk-up); }
.stk-chart .stk-line.down, .stk-spark .stk-line.down { stroke: var(--stk-down); }
.stk-chart .stk-dot.up { fill: var(--stk-up); }
.stk-chart .stk-dot.down { fill: var(--stk-down); }
.stk-chart .stk-stop.up { stop-color: var(--stk-up); stop-opacity: .18; }
.stk-chart .stk-stop.down { stop-color: var(--stk-down); stop-opacity: .18; }
.stk-chart .stk-stop.fade { stop-opacity: 0; }
.stk-chart .stk-base { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 4 4; }

.stk-quote-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stk-quote-chart { min-width: 0; }
.stk-thread-card-main { display: block; min-width: 0; color: inherit; }
.stk-thread-card-main:hover .stk-thread-card-title b { color: var(--accent); }

/* ========================== 设备档案（设备指纹插件） ========================== */
.devices-page { max-width: 980px; }
.devices-head { margin-bottom: 12px; }
.device-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px; margin: 12px 0 16px;
}
.device-stat {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper-2); padding: 10px 12px;
}
.device-stat .v { font-size: 20px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.device-stat .k { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.device-list { display: flex; flex-direction: column; gap: 8px; }
.device-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-2);
  cursor: pointer; transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.device-row:hover { border-color: var(--accent-line); box-shadow: var(--shadow-1); }
.device-row.warn { border-color: color-mix(in srgb, var(--seal) 35%, var(--line)); background: color-mix(in srgb, var(--seal) 4%, var(--paper-2)); }
.device-fp { display: flex; flex-direction: column; gap: 3px; flex: 0 0 92px; }
.device-fp code {
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: 6px; padding: 2px 6px; text-align: center;
}
.device-main { flex: 1 1 auto; min-width: 0; }
.device-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.device-accounts { font-size: 13px; font-weight: 600; color: var(--ink); }
.device-meta { font-size: 11.5px; color: var(--faint); margin-top: 3px; word-break: break-word; }
.device-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--faint); background: var(--paper-3); }
.device-tag.tag-suspicious { color: var(--seal); background: color-mix(in srgb, var(--seal) 8%, var(--paper-2)); border-color: color-mix(in srgb, var(--seal) 30%, var(--line)); }
.device-tag.tag-normal { color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--paper-2)); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.device-actions { flex: 0 0 auto; }
.device-detail-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.device-detail-fp { font-family: var(--font-mono); font-size: 12px; color: var(--accent); word-break: break-all; }
.device-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.device-detail-grid .k, .device-detail .k { font-size: 11.5px; color: var(--faint); margin-bottom: 2px; }
.device-detail-grid .v { font-size: 13px; color: var(--ink); }
.device-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.device-chip {
  font-size: 12px; padding: 2px 8px; border-radius: 999px; text-decoration: none;
  color: var(--ink-2); background: var(--paper-3); border: 1px solid var(--line-2);
}
a.device-chip:hover { color: var(--accent); border-color: var(--accent-line); }
@media (max-width: 640px) {
  .device-row { flex-wrap: wrap; }
  .device-fp { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .device-row { transition: none; }
}

/* ===================== 股票市场 · K 线与实时行情 ===================== */
.stk-head-tools { display: flex; align-items: center; gap: 8px; }

.stk-live {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; color: var(--muted);
  background: var(--paper-3); border: 1px solid var(--line);
}
.stk-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 3px rgba(6, 118, 71, .12);
  animation: stkPulse 1.8s ease-in-out infinite;
}
@keyframes stkPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .stk-live-dot { animation: none; } }

.stk-pill.live { color: var(--ok); border-color: rgba(6, 118, 71, .25); background: rgba(6, 118, 71, .06); }

.stk-candles { padding: 6px 4px 0; }
.stk-candles svg { display: block; width: 100%; height: auto; }
.stk-candles-empty {
  display: flex; align-items: center; justify-content: center;
  height: 180px; color: var(--faint); font-size: 13px;
  border: 1px dashed var(--line-2); border-radius: var(--radius-lg);
  background: var(--paper-3);
}

/* SVG 内部不能用 var()，颜色统一走 class */
.stk-candle.up, .stk-vol.up { fill: var(--stk-up); }
.stk-candle.down, .stk-vol.down { fill: var(--stk-down); }
.stk-wick.up { stroke: var(--stk-up); stroke-width: 1; }
.stk-wick.down { stroke: var(--stk-down); stroke-width: 1; }
.stk-vol { opacity: .38; }
.stk-ma { fill: none; stroke: var(--amber); stroke-width: 1.2; opacity: .85; }
.stk-grid-line { stroke: var(--line); stroke-width: 1; opacity: .7; }
.stk-axis { fill: var(--faint); font-size: 9px; font-family: var(--font-mono, ui-monospace, monospace); }
.stk-axis.end { text-anchor: end; }

/* 成交明细里的虚拟席位 */
.stk-feed-user.virt { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.stk-virt-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.stk-feed-user.virt span { font-size: 11px; }

@media (max-width: 760px) {
  .stk-head-tools { width: 100%; justify-content: flex-end; }
  .stk-candles-empty { height: 140px; }
}

/* ===================== 侧边栏 · 首页入口 ===================== */
.sidebar-home { padding: 8px 8px 0; }
.sidebar-home-link {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--paper-2);
  transition: background .14s var(--ease), border-color .14s var(--ease), color .14s var(--ease);
}
.sidebar-home-link:hover { background: var(--paper-3); border-color: var(--line-2); color: var(--ink); }
.sidebar-home-link.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hover); }
.sidebar-home-link .ic { width: 16px; height: 16px; opacity: .85; }
.sidebar-home-hint {
  margin-left: auto; font-size: 11px; font-weight: 400;
  color: var(--faint); letter-spacing: .02em;
}
.sidebar-home-link.active .sidebar-home-hint { color: var(--accent); opacity: .8; }

/* ===================== 股票市场 · 风向 / 异动 / AI 生态 ===================== */
.stk-regime {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 500; line-height: 1.6;
  border: 1px solid var(--line-2); color: var(--muted); background: var(--paper-3);
  vertical-align: middle;
}
.stk-regime-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.stk-regime.up { color: var(--stk-up); border-color: rgba(217, 45, 32, .22); background: rgba(217, 45, 32, .06); }
.stk-regime.down { color: var(--stk-down); border-color: rgba(6, 118, 71, .22); background: rgba(6, 118, 71, .06); }
.stk-regime.storm { color: var(--amber); border-color: rgba(181, 71, 8, .25); background: rgba(181, 71, 8, .07); }
.stk-regime.flat { color: var(--faint); }

.stk-ticker {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  padding: 9px 14px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--paper-2);
}
.stk-ticker-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.stk-ticker-item.up { color: var(--stk-up); }
.stk-ticker-item.down { color: var(--stk-down); }
.stk-ticker-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
@keyframes stkFlash { 0% { background: rgba(255, 214, 102, .22); } 100% { background: transparent; } }
.stk-ticker-item { animation: stkFlash 1.6s var(--ease) 1; border-radius: 4px; padding: 0 2px; }
@media (prefers-reduced-motion: reduce) { .stk-ticker-item { animation: none; } }

.stk-life { margin-bottom: 14px; }
.stk-life-hint { margin: 8px 0 12px; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ===================== 全站错误弹窗 ===================== */
.dlg-error { width: min(440px, 92vw); }
.dlg-error.flash { animation: dlgErrFlash .5s var(--ease) 1; }
@keyframes dlgErrFlash {
  0%, 100% { box-shadow: var(--shadow-2); }
  40% { box-shadow: 0 0 0 3px rgba(217, 45, 32, .28), var(--shadow-2); }
}
.dlg-err { padding: 2px 0 0; }
.dlg-err-head { display: flex; gap: 12px; align-items: flex-start; }
.dlg-err-icon {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--danger); background: rgba(217, 45, 32, .1);
  border: 1px solid rgba(217, 45, 32, .18);
}
.dlg-err-text { display: grid; gap: 4px; min-width: 0; }
.dlg-err-text b { font-size: 15px; color: var(--ink); }
.dlg-err-msg {
  font-size: 13.5px; line-height: 1.65; color: var(--ink-2);
  word-break: break-word; white-space: pre-wrap;
}
.dlg-err-meta {
  margin-top: 12px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--paper-3); border: 1px solid var(--line);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11.5px; color: var(--muted); word-break: break-all;
}
.dlg-err-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
html[data-theme="night"] .dlg-err-icon { background: rgba(217, 45, 32, .18); }

/* ===================== 股票市场 · 停市 / 开市 ===================== */
.stk-market-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--paper-2);
}
.stk-market-switch.closed {
  border-color: rgba(217, 45, 32, .25);
  background: rgba(217, 45, 32, .04);
}
.stk-market-switch-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.stk-market-switch-main b { font-size: 14px; color: var(--ink); }
.stk-market-switch-sub { font-size: 12.5px; color: var(--muted); }
.stk-market-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(6, 118, 71, .14); }
.stk-market-dot.closed { background: var(--danger); box-shadow: 0 0 0 3px rgba(217, 45, 32, .14); }
.stk-market-switch-actions { display: flex; gap: 8px; }

.stk-closed-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; margin-bottom: 14px;
  border: 1px solid rgba(217, 45, 32, .28); border-radius: var(--radius-lg);
  background: rgba(217, 45, 32, .06);
}
.stk-closed-icon { color: var(--danger); flex: 0 0 auto; margin-top: 1px; }
.stk-closed-text { display: grid; gap: 3px; min-width: 0; }
.stk-closed-text b { font-size: 13.5px; color: var(--danger); }
.stk-closed-text span { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
html[data-theme="night"] .stk-market-switch.closed,
html[data-theme="night"] .stk-closed-banner { background: rgba(217, 45, 32, .12); }

/* ============================ 图床（picbed 插件） ============================ */
.picbed-page { max-width: 1080px; }
.picbed-head { margin-bottom: 10px; }
.picbed-tabs { display: flex; gap: 4px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.picbed-tab {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px;
  font-size: 13px; color: var(--faint); cursor: pointer; margin-bottom: -1px;
}
.picbed-tab:hover { color: var(--ink-2); }
.picbed-tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.picbed-quota { margin: 10px 0 14px; }
.picbed-quota-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.picbed-quotachip {
  font-size: 12px; padding: 3px 9px; border-radius: 999px; color: var(--ink-2);
  background: var(--paper-3); border: 1px solid var(--line-2); font-variant-numeric: tabular-nums;
}
.picbed-quotachip.tight { color: var(--seal); border-color: color-mix(in srgb, var(--seal) 35%, var(--line)); background: color-mix(in srgb, var(--seal) 7%, var(--paper-2)); }
.picbed-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px dashed var(--line-2); border-radius: var(--radius-md, 10px);
  background: var(--paper-2); padding: 26px 16px; text-align: center; cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.picbed-drop:hover, .picbed-drop.over {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--paper-2));
}
.picbed-drop-icon { color: var(--accent); }
.picbed-drop-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 6px; }
.picbed-queue { margin: 10px 0; }
.picbed-qbox {
  display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--paper-2); padding: 6px 8px;
}
.picbed-qrow { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 3px 2px; }
.picbed-qname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.picbed-qstate { color: var(--faint); flex: 0 0 auto; }
.picbed-qrow.ok .picbed-qstate { color: var(--ok); }
.picbed-qrow.err .picbed-qstate { color: var(--seal); }
.picbed-list { margin-top: 14px; }
.picbed-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px;
}
.picbed-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper-2); overflow: hidden;
}
.picbed-card.deleted { opacity: 0.6; }
.picbed-thumb {
  display: block; width: 100%; height: 132px; object-fit: cover;
  background: repeating-conic-gradient(var(--paper-3) 0% 25%, var(--paper-2) 0% 50%) 50% / 16px 16px;
}
.picbed-card-actions {
  position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0;
  transition: opacity 0.16s var(--ease);
}
.picbed-card:hover .picbed-card-actions, .picbed-card:focus-within .picbed-card-actions { opacity: 1; }
.picbed-act {
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--paper) 88%, transparent);
  color: var(--ink-2); cursor: pointer; backdrop-filter: blur(2px);
}
.picbed-act:hover { color: var(--accent); border-color: var(--accent-line); }
.picbed-act.danger:hover { color: var(--seal); border-color: color-mix(in srgb, var(--seal) 40%, var(--line)); }
.picbed-card-meta { padding: 7px 9px 9px; border-top: 1px solid var(--line); }
.picbed-card-name {
  font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.picbed-card-sub { font-size: 11px; color: var(--faint); margin-top: 2px; }
.picbed-link-preview {
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-3);
}
.picbed-link-preview img { display: block; width: 100%; max-height: 220px; object-fit: contain; }
.picbed-link-row .input { font-family: var(--font-mono); font-size: 12px; }
.picbed-statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.picbed-stat { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-2); padding: 9px 11px; }
.picbed-stat .v { font-size: 18px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.picbed-stat .k { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.picbed-chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.picbed-chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--paper-3); border: 1px solid var(--line-2); color: var(--ink-2); }

/* 插件参数设置：分组 */
.plugin-config-form { max-height: 62vh; overflow: auto; padding-right: 2px; }
.config-group { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.config-group:first-of-type { border-top: 0; padding-top: 0; }
.config-group-title { font-size: 12px; font-weight: 650; color: var(--accent); letter-spacing: 0.02em; margin-bottom: 6px; }
.config-field { margin-bottom: 10px; }

@media (max-width: 640px) {
  .picbed-grid { grid-template-columns: repeat(auto-fill, minmax(44vw, 1fr)); }
  .picbed-thumb { height: 42vw; }
  .picbed-card-actions { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .picbed-drop, .picbed-card-actions { transition: none; }
}

/* ===================== 股票市场 · 指数型股票 ===================== */
.stk-index-tag {
  display: inline-flex; align-items: center;
  margin-left: 6px; padding: 0 6px; border-radius: 4px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  vertical-align: middle;
}
.stk-index-options { display: grid; gap: 10px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--paper-3); border: 1px solid var(--line); margin-bottom: 4px; }
.stk-index-options .stk-field { margin: 0; }
.stk-index-options .stk-note { margin: 0; }
.stk-index-members { display: grid; gap: 6px; margin-top: 10px; }
.stk-index-member {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  font-size: 12.5px; color: var(--ink-2);
  background: var(--paper-3); border: 1px solid var(--line);
}
.stk-index-member:hover { border-color: var(--line-2); background: var(--paper-2); }
.stk-index-member-pct { margin-left: auto; font-variant-numeric: tabular-nums; }

/* ===================== 股票市场 · 货币型股票 ===================== */
.stk-fx-unit {
  display: block; margin-top: 2px;
  font-size: 10.5px; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.stk-fx-rate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0 0 6px; }
.stk-fx-rate b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.stk-fx-peg { font-size: 12px; color: var(--muted); }

/* ===================== 股票市场 · 模拟声明（醒目） ===================== */
.stk-sim-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 10px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: var(--amber); background: rgba(181, 71, 8, .09);
  border: 1px solid rgba(181, 71, 8, .28);
  vertical-align: middle;
}
.stk-disclaimer {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 12px 0 4px; padding: 12px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(181, 71, 8, .35);
  background: linear-gradient(180deg, rgba(255, 196, 0, .13), rgba(255, 196, 0, .05));
  box-shadow: inset 3px 0 0 var(--amber);
}
.stk-disclaimer-icon { color: var(--amber); flex: 0 0 auto; margin-top: 1px; }
.stk-disclaimer-text { display: grid; gap: 3px; min-width: 0; }
.stk-disclaimer-text b {
  font-size: 13.5px; font-weight: 700; color: var(--amber);
  letter-spacing: .01em;
}
.stk-disclaimer-text span { font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.stk-disclaimer.compact { padding: 8px 12px; margin: 8px 0; }
.stk-disclaimer.compact .stk-disclaimer-text b { font-size: 12.5px; }
.stk-disclaimer.compact .stk-disclaimer-text span { font-size: 12px; }
html[data-theme="night"] .stk-disclaimer {
  background: linear-gradient(180deg, rgba(255, 196, 0, .16), rgba(255, 196, 0, .07));
  border-color: rgba(255, 196, 0, .34);
}
html[data-theme="night"] .stk-sim-badge { color: #f5c26b; border-color: rgba(245, 194, 107, .32); }
@media (max-width: 760px) {
  .stk-sim-badge { margin-left: 6px; }
  .stk-disclaimer { padding: 10px 12px; }
}

/* 首页股票卡片内的模拟声明 */
.mk-sim-note {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 10px 0 12px; padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(181, 71, 8, .3);
  background: rgba(255, 196, 0, .1);
  font-size: 12px; line-height: 1.6; color: var(--ink-2);
}
.mk-sim-note-icon { color: var(--amber); flex: 0 0 auto; margin-top: 1px; }
html[data-theme="night"] .mk-sim-note { background: rgba(255, 196, 0, .14); border-color: rgba(255, 196, 0, .3); }

/* 全站页脚：模拟市场声明 */
.mk-footer-sim {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0 0 14px; padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(181, 71, 8, .28);
  background: rgba(255, 196, 0, .09);
  font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
}
.mk-footer-sim-icon { color: var(--amber); flex: 0 0 auto; margin-top: 2px; }
html[data-theme="night"] .mk-footer-sim { background: rgba(255, 196, 0, .13); border-color: rgba(255, 196, 0, .28); }

/* 货币型股票 · 兑换面板 */
.stk-fx-quote {
  padding: 10px 12px; margin-bottom: 10px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--paper-3);
}
.stk-fx-quote .small { margin: 4px 0 0; }

/* ===================== 股票市场 · 较刚才涨跌 ===================== */
.stk-tick {
  display: block; margin-top: 1px;
  font-size: 10.5px; line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  white-space: nowrap;
}
.stk-tick.up { color: var(--stk-up); }
.stk-tick.down { color: var(--stk-down); }
.stk-tick-arrow { margin-right: 2px; font-size: 9px; }
.stk-quote-price .stk-tick { font-size: 11.5px; margin-top: 2px; }
.stk-pos-price { display: grid; gap: 1px; justify-items: end; }
.stk-td-price .stk-tick { margin-top: 2px; }

/* 股票页头部：文字块必须能收缩，否则副标题换行会溢出卡片边框 */
.stk-brand { min-width: 0; flex: 1 1 auto; align-items: flex-start; }
.stk-brand-text { min-width: 0; flex: 1 1 auto; }
.stk-title { display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; min-width: 0; }
.stk-sub { word-break: break-word; }
.stk-head-main > .stk-head-tools { flex: 0 0 auto; }

/* ===================== 站内信 · 一键已读 ===================== */
.notice-title { display: flex; align-items: center; gap: 8px; }
.notice-count-badge {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 700;
  color: #fff; background: var(--accent);
  line-height: 1;
}
.btn-ico { display: inline-flex; align-items: center; margin-right: 5px; }
.btn .btn-ico svg { display: block; }
.btn.primary .btn-ico { color: currentColor; }

/* ===================== 更新日志（#/changelog） ===================== */
.cl-page { max-width: 880px; }
.cl-head-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.cl-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin: 0;
}
.cl-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--accent); font-size: 12px; font-weight: 700; line-height: 1;
}
.cl-sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.cl-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.cl-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.cl-filters { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.cl-filter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; cursor: pointer;
  font-size: 12.5px; color: var(--muted); background: var(--paper-2);
  border: 1px solid var(--line); transition: color .14s var(--ease), border-color .14s var(--ease), background .14s var(--ease);
}
.cl-filter:hover { color: var(--ink-2); border-color: var(--line-2); }
.cl-filter.active { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); font-weight: 600; }
.cl-filter-n { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cl-filter.active .cl-filter-n { color: var(--accent); }
.cl-search { max-width: 240px; margin-left: auto; }

.cl-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.cl-item {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px;
  padding: 18px 20px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.cl-item:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.cl-item-rail { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.cl-version {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cl-date { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.cl-item-main { min-width: 0; }
.cl-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cl-item-title { margin: 0; font-size: 16px; font-weight: 650; color: var(--ink); letter-spacing: -0.01em; line-height: 1.5; }
.cl-item-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.cl-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; color: var(--ink-2); background: var(--paper-3);
  border: 1px solid var(--line); white-space: nowrap;
}
.cl-tag.sm { font-size: 10.5px; padding: 1px 7px; }
.cl-body { margin-top: 10px; font-size: 14px; line-height: 1.75; }
.cl-body > *:first-child { margin-top: 0; }
.cl-body > *:last-child { margin-bottom: 0; }
.cl-body ul, .cl-body ol { margin: 0 0 12px; padding-left: 20px; }
.cl-body li { margin: 4px 0; }
.cl-body p { margin: 0 0 12px; }
.cl-body h2 { font-size: 17px; margin: 18px 0 8px; }
.cl-body h3 { font-size: 15px; margin: 16px 0 8px; }
.cl-body code { font-size: 12.5px; }
.cl-item-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 11.5px; color: var(--faint);
}
.cl-item-ops { display: inline-flex; gap: 6px; margin-left: auto; }
.cl-error {
  padding: 16px; border-radius: var(--radius-lg); font-size: 13px;
  color: var(--danger); background: var(--seal-soft); border: 1px solid var(--seal-line);
}

/* 编辑器 */
.cl-form { display: grid; gap: 4px; }
.cl-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.cl-editor {
  min-height: 200px; resize: vertical; line-height: 1.7;
  font-family: var(--font-body); font-size: 13.5px;
}
.cl-preview {
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  background: var(--paper-2); padding: 12px 14px;
  max-height: 260px; overflow: auto; font-size: 13.5px; line-height: 1.75;
}
.cl-preview > *:first-child { margin-top: 0; }
.cl-preview > *:last-child { margin-bottom: 0; }
.cl-preview-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.cl-tag-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.cl-pick {
  padding: 2px 9px; border-radius: 999px; cursor: pointer;
  font-size: 11.5px; color: var(--muted); background: var(--paper-2);
  border: 1px solid var(--line); transition: color .14s var(--ease), border-color .14s var(--ease);
}
.cl-pick:hover { color: var(--accent); border-color: var(--accent-line); }

@media (max-width: 760px) {
  .cl-item { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cl-item-rail { flex-direction: row; align-items: center; gap: 10px; }
  .cl-form-grid { grid-template-columns: minmax(0, 1fr); }
  .cl-search { max-width: none; width: 100%; margin-left: 0; }
  .cl-toolbar { align-items: stretch; }
}

/* 更新日志：默认折叠展示关键信息，点击展开全文 */
.cl-item.collapsible { cursor: pointer; }
.cl-item.collapsible:hover { border-color: var(--accent-line); }
.cl-item-heading { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cl-summary {
  margin: 8px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cl-item-main > .cl-body { margin-top: 10px; }
.cl-item-meta-end { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.cl-toggle {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 999px; cursor: pointer;
  font-size: 11.5px; color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-line); transition: background .14s var(--ease);
}
.cl-toggle:hover { background: color-mix(in srgb, var(--accent) 16%, var(--paper-2)); }
.cl-toggle .cl-toggle-ic { display: inline-flex; transform: rotate(90deg); transition: transform .16s var(--ease); }
.cl-toggle.open .cl-toggle-ic { transform: rotate(-90deg); }
.cl-item.expanded { border-color: var(--accent-line); }

/* 更新日志：模组类型（独立于标签的维度） */
.cl-modtype {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.cl-modtype.sm { font-size: 10.5px; padding: 1px 7px; }
.cl-modtype.preview {
  color: #b54708; background: color-mix(in srgb, #f79009 12%, var(--paper-2));
  border-color: color-mix(in srgb, #f79009 32%, var(--paper-2));
}
.cl-modtype.beta {
  color: #6941c6; background: color-mix(in srgb, #7a5af8 12%, var(--paper-2));
  border-color: color-mix(in srgb, #7a5af8 30%, var(--paper-2));
}
.cl-modtype.release {
  color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--paper-2));
  border-color: color-mix(in srgb, var(--ok) 28%, var(--paper-2));
}
.cl-toolbar-end { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.cl-type-filter { width: auto; min-width: 128px; margin: 0; }
@media (max-width: 760px) {
  .cl-toolbar-end { width: 100%; margin-left: 0; }
  .cl-toolbar-end .cl-type-filter { flex: 1 1 140px; }
}

/* 工具栏右侧：类型筛选 + 搜索同一行（窄屏换行） */
.cl-toolbar-end { flex-wrap: nowrap; }
.cl-toolbar-end .cl-search { margin-left: 0; flex: 0 1 240px; min-width: 140px; }
.cl-toolbar-end .cl-type-filter { flex: 0 0 auto; }
@media (max-width: 760px) {
  .cl-toolbar-end { flex-wrap: wrap; }
  .cl-toolbar-end .cl-search { flex: 1 1 160px; }
}

/* ===================== 工单：优先级 / Markdown 输入 ===================== */
.ticket-priority {
  display: inline-flex; align-items: center;
  padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent;
}
.ticket-priority.p-low {
  color: var(--muted); background: var(--paper-3);
  border-color: var(--line);
}
.ticket-priority.p-normal {
  color: var(--ink-2); background: color-mix(in srgb, var(--accent) 8%, var(--paper-2));
  border-color: var(--accent-line);
}
.ticket-priority.p-high {
  color: #b54708; background: color-mix(in srgb, #f79009 12%, var(--paper-2));
  border-color: color-mix(in srgb, #f79009 32%, var(--paper-2));
}
.ticket-priority.p-urgent {
  color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--paper-2));
  border-color: var(--danger-line);
}

.ticket-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 720px) { .ticket-form-row { grid-template-columns: minmax(0, 1fr); } }

.ticket-composer { display: grid; gap: 6px; }
.ticket-mdtool {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 4px 6px; border: 1px solid var(--line-2); border-radius: var(--radius) var(--radius) 0 0;
  background: var(--paper-3); border-bottom: none;
}
.ticket-mdtool-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 24px; padding: 0 6px; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: transparent; border: 1px solid transparent;
  transition: color .14s var(--ease), background .14s var(--ease);
}
.ticket-mdtool-btn:hover { color: var(--accent); background: var(--accent-soft); }
.ticket-mdtool-hint { margin-left: auto; font-size: 11px; color: var(--faint); }
.ticket-composer .ticket-input {
  border-top-left-radius: 0; border-top-right-radius: 0; min-height: 96px; resize: vertical;
  line-height: 1.7;
}
.ticket-reply .ticket-input { min-height: 84px; }

/* 工单正文 / 回复的 Markdown 渲染 */
.ticket-bubble-body.md { line-height: 1.75; }
.ticket-bubble-body.md > *:first-child { margin-top: 0; }
.ticket-bubble-body.md > *:last-child { margin-bottom: 0; }
.ticket-bubble-body.md p { margin: 0 0 10px; }
.ticket-bubble-body.md ul, .ticket-bubble-body.md ol { margin: 0 0 10px; padding-left: 20px; }
.ticket-bubble-body.md li { margin: 3px 0; }
.ticket-bubble-body.md h1, .ticket-bubble-body.md h2, .ticket-bubble-body.md h3 { font-size: 15px; margin: 12px 0 6px; }
.ticket-bubble-body.md img {
  max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line);
  margin: 6px 0; display: block;
}
.ticket-bubble-body.md code {
  font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px;
  padding: 1px 5px; border-radius: 5px; background: var(--paper-3); border: 1px solid var(--line);
}
.ticket-bubble-body.md pre {
  padding: 10px 12px; border-radius: var(--radius); background: var(--paper-3);
  border: 1px solid var(--line); overflow: auto; margin: 0 0 10px;
}
.ticket-bubble-body.md pre code { padding: 0; border: none; background: transparent; }
.ticket-bubble-body.md blockquote {
  margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--accent-line); color: var(--muted);
}

/* 工单 Markdown 列表更紧凑 */
.ticket-bubble-body.md ul, .ticket-bubble-body.md ol { margin: 4px 0 10px; padding-left: 22px; }
.ticket-bubble-body.md li { margin: 2px 0; }
.ticket-bubble-body.md li::marker { color: var(--faint); }

/* 工单：参与者与 @ 提及 */
.ticket-participants {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 0 12px; font-size: 12px;
}
.ticket-participant-list { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ticket-participant {
  padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.ticket-pill.st-participant {
  color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line);
}
.ticket-mention-list { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.ticket-mention-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; color: var(--ink-2); text-align: left;
  background: var(--paper-2); border: 1px solid var(--line);
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.ticket-mention-item:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.ticket-mention-item.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ticket-mention-role { font-size: 10.5px; color: var(--faint); }

/* 工单：管理组修改分类/优先级 */
.ticket-meta-editor {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 8px 10px;
  border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--paper-3);
}
.select.select-sm { width: auto; min-width: 120px; height: 30px; padding: 4px 8px; font-size: 12.5px; }

/* ===================== 工单 · 智能助手 ===================== */
.ticket-bubble.ai {
  border: 1px dashed var(--accent-line);
  background: color-mix(in srgb, var(--accent) 5%, var(--paper-2));
}
.ticket-bubble.ai .ticket-bubble-body.md { color: var(--ink-2); }
.ticket-ai-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.ticket-ai-sources {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
}
.ticket-ai-src {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 999px;
  font-size: 11px; color: var(--muted); text-decoration: none;
  background: var(--paper-3); border: 1px solid var(--line);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ticket-ai-src:hover { color: var(--accent); border-color: var(--accent-line); }
.ticket-ai-src.wiki::before { content: 'W'; font-size: 9.5px; font-weight: 700; color: var(--accent); }
.ticket-ai-src.web::before { content: '↗'; font-size: 10px; }
.ticket-ai-status {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 0 12px; padding: 10px 12px;
  border-radius: var(--radius); font-size: 12.5px;
  border: 1px dashed var(--accent-line);
  background: color-mix(in srgb, var(--accent) 5%, var(--paper-2));
  color: var(--ink-2);
}
.ticket-ai-status.failed { border-color: var(--line-2); background: var(--paper-3); color: var(--muted); }
.ticket-ai-spin {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--accent-line); border-top-color: var(--accent);
  animation: ticket-ai-spin .8s linear infinite;
}
@keyframes ticket-ai-spin { to { transform: rotate(360deg); } }

/* 智能助手列表：避免 li>p 造成过大行距 */
.ticket-bubble-body.md li > p { margin: 0; }
.ticket-bubble-body.md li + li { margin-top: 4px; }

/* Markdown 气泡：关闭 pre-wrap（否则列表项之间会多出空行） */
.ticket-bubble-body.md { white-space: normal; }

/* ===================== 智慧服务（工单）二级界面 ===================== */
.sv-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 40px 120px;
}
.sv-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.sv-title {
  margin: 0; font-family: var(--font-display);
  font-size: 28px; font-weight: 600; letter-spacing: -0.01em;
}
.sv-sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.sv-seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--paper-3); border: 1px solid var(--line); border-radius: 999px;
}
.sv-seg-btn {
  height: 32px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font-size: 13px; color: var(--muted); background: transparent; border: none;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.sv-seg-btn:hover { color: var(--ink); }
.sv-seg-btn.active {
  color: var(--accent); background: var(--paper);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08); font-weight: 600;
}

.sv-panel {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 18px;
}
.sv-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.sv-toolbar-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sv-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sv-filters .input { height: 34px; font-size: 12.5px; }
.sv-filters .input:first-child { width: 240px; }
.sv-filters .input[type="date"] { width: 150px; }
.sv-date-sep { font-size: 11px; color: var(--faint); }

.sv-list { display: grid; gap: 8px; }
.sv-row {
  padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper);
  cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease);
}
.sv-row:hover { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 3%, var(--paper)); }
.sv-row.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--paper)); }
.sv-row-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sv-row-no {
  flex: none; font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px; color: var(--accent); font-weight: 600;
}
.sv-row-title {
  font-size: 14px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.sv-row-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 6px; font-size: 11.5px; color: var(--muted);
}
.sv-row-time { color: var(--faint); }
.sv-empty { padding: 40px 0; text-align: center; }

/* 详情 */
.sv-detail { padding: 22px 24px 26px; }
.sv-detail-head { margin-bottom: 14px; }
.sv-back { margin-bottom: 8px; margin-left: -10px; }
.sv-detail-title {
  margin: 0 0 8px; font-family: var(--font-display);
  font-size: 22px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em;
}
.sv-detail-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.sv-meta-no { font-family: var(--font-mono, ui-monospace, monospace); color: var(--accent); font-weight: 600; }
.sv-meta-time, .sv-meta-cat { color: var(--faint); }

.sv-person {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-3);
}
.sv-person-name { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sv-person-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 4px; font-size: 11.5px; color: var(--muted);
}

.sv-participants {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 14px;
  border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.sv-part-label { font-size: 11.5px; color: var(--faint); margin-right: 2px; }
.sv-part-chip {
  padding: 1px 9px; border-radius: 999px; font-size: 11.5px;
  color: var(--ink-2); background: var(--paper-3); border: 1px solid var(--line);
}
.sv-part-chip.owner { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.sv-part-chip.system { color: var(--faint); background: transparent; border-style: dashed; }
.sv-part-add {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.sv-part-add:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); transform: scale(1.06); }

.sv-conv { margin: 18px 0 6px; }
.sv-conv-title {
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--faint); text-transform: uppercase; margin-bottom: 10px;
}
.sv-conv .ticket-bubble + .ticket-bubble { margin-top: 10px; }
.sv-reply { margin-top: 16px; }
.sv-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* 工单管理（列表 + 处理） */
.sv-admin {
  display: grid; grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px; align-items: start;
}
.sv-admin-left { position: sticky; top: 16px; }
.sv-admin-list { max-height: calc(100vh - 320px); overflow: auto; padding-right: 2px; }
.sv-admin-right { min-height: 420px; }
.sv-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sv-chip {
  height: 28px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  font-size: 12px; color: var(--muted);
  background: var(--paper); border: 1px solid var(--line);
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.sv-chip:hover { color: var(--ink); border-color: var(--line-2); }
.sv-chip.active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); font-weight: 600; }

.sv-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

@media (max-width: 1024px) {
  .sv-admin { grid-template-columns: minmax(0, 1fr); }
  .sv-admin-left { position: static; }
  .sv-admin-list { max-height: none; }
}
@media (max-width: 720px) {
  .sv-page { padding: 20px 16px 96px; }
  .sv-title { font-size: 23px; }
  .sv-form-row { grid-template-columns: minmax(0, 1fr); }
  .sv-filters .input:first-child { width: 100%; }
}

/* 工单附件 */
.ticket-attach-list {
  display: none; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.ticket-attach-list.show { display: flex; }
.ticket-attach-item {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 280px; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; text-decoration: none;
  color: var(--ink-2); background: var(--paper-3);
  border: 1px solid var(--line);
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
a.ticket-attach-item:hover { color: var(--accent); border-color: var(--accent-line); }
.ticket-attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-attach-size { color: var(--faint); flex: none; }
.ticket-attach-del {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; cursor: pointer;
  color: var(--muted); background: transparent; border: none;
}
.ticket-attach-del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.ticket-composer .ticket-attach-list { margin-top: 6px; }

/* 邮箱验证提示与标签 */
.email-verify-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 12px 16px 0; padding: 9px 14px; border-radius: var(--radius);
  background: color-mix(in srgb, #f79009 10%, var(--paper-2));
  border: 1px solid color-mix(in srgb, #f79009 32%, var(--paper-2));
  color: #b54708; font-size: 12.5px;
}
.email-verify-banner-text { flex: 1; min-width: 0; }
.verify-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
}
.verify-pill.ok { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }

/* 后台用户列表：邮箱未验证标签 */
.tag {
  display: inline-flex; align-items: center;
  padding: 0 6px; border-radius: 6px;
  font-size: 10.5px; font-weight: 600; line-height: 18px;
  white-space: nowrap;
}
.tag-warn {
  color: #b54708;
  background: color-mix(in srgb, #f79009 12%, var(--paper-2));
  border: 1px solid color-mix(in srgb, #f79009 32%, var(--paper-2));
}

/* ===================== 用户须知 / 信息收集规定 ===================== */
.policy-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.policy-tab {
  padding: 7px 12px; border: none; background: transparent; cursor: pointer;
  font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.policy-tab:hover { color: var(--ink); }
.policy-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.policy-scroll { max-height: 46vh; overflow: auto; padding-right: 6px; }
.policy-md { font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.policy-md h1 { font-size: 17px; margin: 0 0 10px; }
.policy-md h2 { font-size: 15px; margin: 14px 0 8px; }
.policy-md p { margin: 0 0 10px; }
.policy-md ul, .policy-md ol { margin: 0 0 10px; padding-left: 22px; }
.policy-md li { margin: 3px 0; }
.policy-md code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--paper-3); }
.consent-box { display: grid; gap: 10px; }
.consent-check {
  display: flex; align-items: flex-start; gap: 8px; cursor: pointer;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.6;
}
.consent-check input { margin-top: 3px; }
.consent-check a { color: var(--accent); }

/* 后台用户详情 */
.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--accent); font: inherit; font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }
.user-detail { display: grid; gap: 14px; }
.user-detail-head { display: flex; align-items: center; gap: 12px; }
.user-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper-3);
}
.user-kv { display: flex; gap: 8px; font-size: 12.5px; min-width: 0; }
.user-k { color: var(--faint); flex: none; width: 72px; }
.user-v { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-section-title { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--faint); text-transform: uppercase; }
.user-fp { display: grid; gap: 8px; }
.user-fp-row { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); }
.user-fp-row.warn { border-color: color-mix(in srgb, #f79009 40%, var(--line)); }
.user-fp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.user-fp-head code { font-size: 11.5px; color: var(--accent); }
.tag-ok { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.tag-danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--paper-2)); border: 1px solid var(--danger-line); }
@media (max-width: 720px) { .user-grid { grid-template-columns: 1fr; } }
