/* ==========================================================================
   兽问 VetAsk · 全局样式表
   --------------------------------------------------------------------------
   0. 设计令牌（浅色）        1. 深色主题
   2. 基础重置                3. 无障碍 / 焦点
   4. 布局骨架                5. 步骤头 / 首页 Hero
   6. 卡片与物种网格          7. 表单控件
   8. 选项（chips / option）  9. 按钮 / 操作条
   10. 进度                   11. 提示条 / 徽标
   12. 结果卡                 13. AI 面板与富文本
   14. Toast / Modal / 列表   15. 动效
   16. 响应式（≤640px）       17. 打印
   18. 减少动效偏好
   设计语言：青绿主色 #0f766e + 暖琥珀 #f59e0b，暖白背景，白底 14px 圆角卡片。
   ========================================================================== */

/* ===== 0. 设计令牌（浅色主题） ========================================== */

:root {
  color-scheme: light;

  /* 品牌色 */
  --vt-primary: #0f766e;
  --vt-primary-strong: #0b5d57;
  --vt-primary-deep: #094842;
  --vt-primary-soft: #e6f4f1;
  --vt-primary-soft-2: #d2ebe6;
  --vt-primary-border: #a4d6ce;
  --vt-primary-tint: rgba(15, 118, 110, 0.08);
  --vt-on-primary: #ffffff;

  --vt-accent: #f59e0b;
  --vt-accent-strong: #d97706;
  --vt-accent-soft: #fdf2dd;
  --vt-accent-border: #f6d59b;
  --vt-accent-tint: rgba(245, 158, 11, 0.07);
  --vt-on-danger: #ffffff;

  /* 中性色 */
  --vt-bg: #f6f7f5;
  --vt-bg-soft: #eef1ed;
  --vt-surface: #ffffff;
  --vt-surface-2: #fbfcfa;
  --vt-surface-3: #f0f3ef;
  --vt-header-bg: rgba(255, 255, 255, 0.85);
  --vt-text: #22302c;
  --vt-text-strong: #12201c;
  --vt-text-muted: #5b6c66;
  --vt-text-faint: #86958f;
  --vt-border: #dfe6e1;
  --vt-border-strong: #c9d5ce;
  --vt-overlay: rgba(13, 27, 24, 0.52);

  /* 语义色 */
  --vt-danger: #dc2626;
  --vt-danger-strong: #b91c1c;
  --vt-danger-soft: #fdeceb;
  --vt-danger-border: #f3b9b6;
  --vt-danger-text: #9f1c1c;

  --vt-warn: #d97706;
  --vt-warn-soft: #fdf4e3;
  --vt-warn-border: #f2d29a;
  --vt-warn-text: #92400e;

  --vt-info: #0e7490;
  --vt-info-soft: #e8f5f8;
  --vt-info-border: #addbe3;
  --vt-info-text: #0f5d70;

  --vt-success: #15803d;
  --vt-success-soft: #e9f7ee;
  --vt-success-border: #b2dfc0;
  --vt-success-text: #166534;

  /* 紧急程度徽标 */
  --vt-urg-critical-bg: #fde8e7;
  --vt-urg-critical-fg: #b42318;
  --vt-urg-critical-bd: #f2b8b3;
  --vt-urg-high-bg: #fff0e2;
  --vt-urg-high-fg: #c2410c;
  --vt-urg-high-bd: #f8cba6;
  --vt-urg-moderate-bg: #fdf6d8;
  --vt-urg-moderate-fg: #a16207;
  --vt-urg-moderate-bd: #eeda92;
  --vt-urg-low-bg: #e8f7ee;
  --vt-urg-low-fg: #15803d;
  --vt-urg-low-bd: #b7e2c5;

  /* 字体与排版 */
  --vt-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC",
    sans-serif;
  --vt-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --vt-fs-xs: 0.75rem;
  --vt-fs-sm: 0.8125rem;
  --vt-fs-base: 0.9375rem;
  --vt-fs-md: 1rem;
  --vt-fs-lg: 1.125rem;
  --vt-fs-xl: 1.375rem;
  --vt-fs-2xl: 1.75rem;
  --vt-fs-3xl: 2.125rem;
  --vt-lh: 1.6;
  --vt-lh-tight: 1.28;

  /* 间距 */
  --vt-space-1: 4px;
  --vt-space-2: 8px;
  --vt-space-3: 12px;
  --vt-space-4: 16px;
  --vt-space-5: 20px;
  --vt-space-6: 24px;
  --vt-space-7: 32px;
  --vt-space-8: 40px;

  /* 圆角 */
  --vt-radius-xs: 6px;
  --vt-radius-sm: 9px;
  --vt-radius-md: 12px;
  --vt-radius-lg: 14px;
  --vt-radius-xl: 20px;
  --vt-radius-pill: 999px;

  /* 阴影 */
  --vt-shadow-xs: 0 1px 2px rgba(16, 40, 34, 0.05);
  --vt-shadow-sm: 0 2px 8px rgba(16, 40, 34, 0.06), 0 1px 2px rgba(16, 40, 34, 0.04);
  --vt-shadow-md: 0 8px 22px rgba(16, 40, 34, 0.08), 0 2px 6px rgba(16, 40, 34, 0.05);
  --vt-shadow-lg: 0 24px 64px rgba(9, 26, 22, 0.22), 0 8px 22px rgba(9, 26, 22, 0.12);

  /* 焦点与过渡 */
  --vt-focus-ring: 0 0 0 3px rgba(15, 118, 110, 0.28);
  --vt-focus-color: #0f766e;
  --vt-transition: 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
  --vt-transition-slow: 280ms cubic-bezier(0.2, 0.7, 0.3, 1);

  /* 尺寸 */
  --vt-header-h: 62px;
  --vt-content-max: 860px;
}

/* ===== 1. 深色主题 ====================================================== */

[data-theme="dark"] {
  color-scheme: dark;

  --vt-primary: #2dd4bf;
  --vt-primary-strong: #5eead4;
  --vt-primary-deep: #99f6e4;
  --vt-primary-soft: rgba(45, 212, 191, 0.13);
  --vt-primary-soft-2: rgba(45, 212, 191, 0.22);
  --vt-primary-border: rgba(94, 234, 212, 0.38);
  --vt-primary-tint: rgba(45, 212, 191, 0.1);
  --vt-on-primary: #052e29;

  --vt-accent: #fbbf24;
  --vt-accent-strong: #fcd34d;
  --vt-accent-soft: rgba(245, 158, 11, 0.16);
  --vt-accent-border: rgba(251, 191, 36, 0.45);
  --vt-accent-tint: rgba(245, 158, 11, 0.05);
  --vt-on-danger: #3f1010;

  --vt-bg: #0f1715;
  --vt-bg-soft: #131f1b;
  --vt-surface: #17231f;
  --vt-surface-2: #1b2925;
  --vt-surface-3: #22332d;
  --vt-header-bg: rgba(17, 27, 24, 0.86);
  --vt-text: #dce8e3;
  --vt-text-strong: #f3faf7;
  --vt-text-muted: #a4b7b0;
  --vt-text-faint: #83968f;
  --vt-border: #2b3d36;
  --vt-border-strong: #3b5148;
  --vt-overlay: rgba(3, 9, 7, 0.7);

  --vt-danger: #f87171;
  --vt-danger-strong: #fca5a5;
  --vt-danger-soft: rgba(248, 113, 113, 0.14);
  --vt-danger-border: rgba(248, 113, 113, 0.4);
  --vt-danger-text: #fca5a5;

  --vt-warn: #fbbf24;
  --vt-warn-soft: rgba(251, 191, 36, 0.13);
  --vt-warn-border: rgba(251, 191, 36, 0.4);
  --vt-warn-text: #fcd34d;

  --vt-info: #38bdf8;
  --vt-info-soft: rgba(56, 189, 248, 0.13);
  --vt-info-border: rgba(56, 189, 248, 0.38);
  --vt-info-text: #7dd3fc;

  --vt-success: #4ade80;
  --vt-success-soft: rgba(74, 222, 128, 0.13);
  --vt-success-border: rgba(74, 222, 128, 0.38);
  --vt-success-text: #86efac;

  --vt-urg-critical-bg: rgba(248, 113, 113, 0.16);
  --vt-urg-critical-fg: #fca5a5;
  --vt-urg-critical-bd: rgba(248, 113, 113, 0.42);
  --vt-urg-high-bg: rgba(251, 146, 60, 0.16);
  --vt-urg-high-fg: #fdba74;
  --vt-urg-high-bd: rgba(251, 146, 60, 0.42);
  --vt-urg-moderate-bg: rgba(251, 191, 36, 0.15);
  --vt-urg-moderate-fg: #fcd34d;
  --vt-urg-moderate-bd: rgba(251, 191, 36, 0.4);
  --vt-urg-low-bg: rgba(74, 222, 128, 0.14);
  --vt-urg-low-fg: #86efac;
  --vt-urg-low-bd: rgba(74, 222, 128, 0.4);

  --vt-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --vt-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
  --vt-shadow-md: 0 10px 26px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  --vt-shadow-lg: 0 28px 72px rgba(0, 0, 0, 0.6), 0 10px 24px rgba(0, 0, 0, 0.4);

  --vt-focus-ring: 0 0 0 3px rgba(45, 212, 191, 0.35);
  --vt-focus-color: #5eead4;
}

/* 系统深色且用户未显式选择主题时，自动呈现深色 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;

    --vt-primary: #2dd4bf;
    --vt-primary-strong: #5eead4;
    --vt-primary-deep: #99f6e4;
    --vt-primary-soft: rgba(45, 212, 191, 0.13);
    --vt-primary-soft-2: rgba(45, 212, 191, 0.22);
    --vt-primary-border: rgba(94, 234, 212, 0.38);
    --vt-primary-tint: rgba(45, 212, 191, 0.1);
    --vt-on-primary: #052e29;

    --vt-accent: #fbbf24;
    --vt-accent-strong: #fcd34d;
    --vt-accent-soft: rgba(245, 158, 11, 0.16);
    --vt-accent-border: rgba(251, 191, 36, 0.45);
    --vt-accent-tint: rgba(245, 158, 11, 0.05);
    --vt-on-danger: #3f1010;

    --vt-bg: #0f1715;
    --vt-bg-soft: #131f1b;
    --vt-surface: #17231f;
    --vt-surface-2: #1b2925;
    --vt-surface-3: #22332d;
    --vt-header-bg: rgba(17, 27, 24, 0.86);
    --vt-text: #dce8e3;
    --vt-text-strong: #f3faf7;
    --vt-text-muted: #a4b7b0;
    --vt-text-faint: #83968f;
    --vt-border: #2b3d36;
    --vt-border-strong: #3b5148;
    --vt-overlay: rgba(3, 9, 7, 0.7);

    --vt-danger: #f87171;
    --vt-danger-strong: #fca5a5;
    --vt-danger-soft: rgba(248, 113, 113, 0.14);
    --vt-danger-border: rgba(248, 113, 113, 0.4);
    --vt-danger-text: #fca5a5;

    --vt-warn: #fbbf24;
    --vt-warn-soft: rgba(251, 191, 36, 0.13);
    --vt-warn-border: rgba(251, 191, 36, 0.4);
    --vt-warn-text: #fcd34d;

    --vt-info: #38bdf8;
    --vt-info-soft: rgba(56, 189, 248, 0.13);
    --vt-info-border: rgba(56, 189, 248, 0.38);
    --vt-info-text: #7dd3fc;

    --vt-success: #4ade80;
    --vt-success-soft: rgba(74, 222, 128, 0.13);
    --vt-success-border: rgba(74, 222, 128, 0.38);
    --vt-success-text: #86efac;

    --vt-urg-critical-bg: rgba(248, 113, 113, 0.16);
    --vt-urg-critical-fg: #fca5a5;
    --vt-urg-critical-bd: rgba(248, 113, 113, 0.42);
    --vt-urg-high-bg: rgba(251, 146, 60, 0.16);
    --vt-urg-high-fg: #fdba74;
    --vt-urg-high-bd: rgba(251, 146, 60, 0.42);
    --vt-urg-moderate-bg: rgba(251, 191, 36, 0.15);
    --vt-urg-moderate-fg: #fcd34d;
    --vt-urg-moderate-bd: rgba(251, 191, 36, 0.4);
    --vt-urg-low-bg: rgba(74, 222, 128, 0.14);
    --vt-urg-low-fg: #86efac;
    --vt-urg-low-bd: rgba(74, 222, 128, 0.4);

    --vt-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --vt-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
    --vt-shadow-md: 0 10px 26px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
    --vt-shadow-lg: 0 28px 72px rgba(0, 0, 0, 0.6), 0 10px 24px rgba(0, 0, 0, 0.4);

    --vt-focus-ring: 0 0 0 3px rgba(45, 212, 191, 0.35);
    --vt-focus-color: #5eead4;
  }
}

/* ===== 2. 基础重置 ====================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--vt-font-sans);
  font-size: var(--vt-fs-base);
  line-height: var(--vt-lh);
  color: var(--vt-text);
  background-color: var(--vt-bg);
  background-image:
    radial-gradient(1100px 480px at 8% -8%, var(--vt-primary-tint), transparent 62%),
    radial-gradient(900px 420px at 96% 0%, var(--vt-accent-tint), transparent 58%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-underline-offset: 0.15em;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--vt-primary);
}

a {
  color: var(--vt-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

hr {
  border: 0;
  border-top: 1px solid var(--vt-border);
  margin: 1.2em 0;
}

::selection {
  background: var(--vt-primary-soft-2);
  color: var(--vt-text-strong);
}

/* 轻量滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--vt-border-strong) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

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

/* ===== 3. 无障碍 / 焦点 ================================================= */

:focus-visible {
  outline: 2px solid var(--vt-focus-color);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* 屏幕阅读器专用文本 */
.vt-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

/* ===== 4. 布局骨架 ====================================================== */

.vt-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* 吸顶头部：背景满宽，内容与 860px 正文对齐 */
.vt-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--vt-space-3);
  min-height: var(--vt-header-h);
  padding: 10px clamp(16px, 4vw, 28px);
  padding-left: max(clamp(16px, 4vw, 28px), calc((100vw - var(--vt-content-max)) / 2));
  padding-right: max(clamp(16px, 4vw, 28px), calc((100vw - var(--vt-content-max)) / 2));
  border-bottom: 1px solid var(--vt-border);
  background: var(--vt-header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  backdrop-filter: blur(14px) saturate(1.35);
  box-shadow: 0 1px 0 rgba(16, 40, 34, 0.02);
}

.vt-brand {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--vt-radius-sm);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.vt-brand:hover {
  text-decoration: none;
}

.vt-brand:hover .vt-brand-text {
  color: var(--vt-primary-strong);
}

.vt-brand:active {
  transform: translateY(1px);
}

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

.vt-brand-text em {
  color: var(--vt-primary);
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.vt-brand-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #0f766e 0%, #0d9488 58%, #14b8a6 100%);
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.vt-brand-mark svg {
  width: 22px;
  height: 22px;
}

.vt-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-lg);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.vt-brand-text small {
  color: var(--vt-text-faint);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.vt-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.vt-nav-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: var(--vt-radius-pill);
  background: transparent;
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-sm);
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--vt-transition), background-color var(--vt-transition),
    border-color var(--vt-transition);
}

.vt-nav-btn:hover {
  color: var(--vt-text);
  background: var(--vt-surface-3);
}

.vt-nav-btn:active {
  transform: translateY(1px);
}

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

.vt-nav-btn.is-active,
.vt-nav-btn[aria-current="page"],
.vt-nav-btn[aria-pressed="true"] {
  border-color: var(--vt-primary-border);
  background: var(--vt-primary-soft);
  color: var(--vt-primary-strong);
}

/* 主内容区：最大 860px 居中 */
.vt-main {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: clamp(16px, 2.4vw, 22px);
  width: 100%;
  max-width: var(--vt-content-max);
  margin: 0 auto;
  padding: clamp(20px, 3.6vw, 34px) clamp(16px, 4vw, 28px) clamp(32px, 5vw, 48px);
}

.vt-screen {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.2vw, 18px);
  animation: vt-screen-in var(--vt-transition-slow) both;
}

.vt-screen > * {
  min-width: 0;
}

.vt-footer {
  width: 100%;
  max-width: var(--vt-content-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 28px) 34px;
  color: var(--vt-text-faint);
  font-size: var(--vt-fs-xs);
  line-height: 1.7;
  text-align: center;
}

.vt-footer p {
  margin: 0;
}

.vt-footer p + p {
  margin-top: 4px;
}

.vt-footer a {
  color: var(--vt-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--vt-overlay);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: vt-fade-in 0.2s ease both;
}

/* 页面首次加载占位 */
.vt-boot {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 60vh;
  padding: 32px 20px;
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-base);
  text-align: center;
}

.vt-boot-text {
  margin: 0;
  letter-spacing: 0.06em;
}

/* 无 JS 提示 */
.vt-noscript {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--vt-bg);
  color: var(--vt-text);
  font-size: var(--vt-fs-md);
  line-height: 1.8;
  text-align: center;
}

/* ===== 5. 步骤头 / 首页 Hero ============================================ */

.vt-screen-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vt-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border: 1px solid var(--vt-primary-border);
  border-radius: var(--vt-radius-pill);
  background: var(--vt-primary-soft);
  color: var(--vt-primary-strong);
  font-size: var(--vt-fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.vt-step::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.vt-title {
  margin: 0;
  color: var(--vt-text-strong);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  line-height: var(--vt-lh-tight);
  letter-spacing: -0.015em;
}

.vt-sub {
  max-width: 64ch;
  margin: 0;
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-base);
  line-height: 1.75;
}

.vt-sub strong {
  color: var(--vt-text);
}

/* 步骤圆点 */
.vt-step-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.vt-step-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border: 1px solid var(--vt-border-strong);
  border-radius: 50%;
  background: var(--vt-surface-3);
  transition: width var(--vt-transition), background-color var(--vt-transition),
    border-color var(--vt-transition);
}

.vt-step-dot.is-active {
  width: 24px;
  border-color: var(--vt-primary);
  border-radius: var(--vt-radius-pill);
  background: var(--vt-primary);
  box-shadow: 0 0 0 3px var(--vt-primary-soft);
}

.vt-step-dot.is-done {
  border-color: var(--vt-primary);
  background: var(--vt-primary);
  opacity: 0.55;
}

/* 首页 Hero */
.vt-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4.5vw, 38px);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-xl);
  background-color: var(--vt-surface);
  background-image:
    linear-gradient(135deg, var(--vt-primary-soft), transparent 62%),
    radial-gradient(620px 260px at 100% 0%, var(--vt-accent-soft), transparent 72%);
  box-shadow: var(--vt-shadow-sm);
}

.vt-hero-title {
  margin: 0;
  color: var(--vt-text-strong);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.vt-hero-sub {
  max-width: 58ch;
  margin: 8px 0 0;
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-md);
  line-height: 1.75;
}

.vt-hero .vt-badges {
  margin-top: 14px;
}

.vt-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.vt-badges span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-pill);
  background: var(--vt-surface-2);
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.vt-badge-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* 区块 */
.vt-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vt-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-md);
  font-weight: 750;
  line-height: 1.45;
}

.vt-section-title::before {
  content: "";
  flex: none;
  width: 4px;
  height: 1.05em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--vt-primary), var(--vt-accent));
}

.vt-grid-2,
.vt-grid-3 {
  display: grid;
  gap: var(--vt-space-3);
}

.vt-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vt-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vt-muted {
  color: var(--vt-text-muted);
}

.vt-watermark {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px dashed var(--vt-border);
  border-radius: 8px;
  color: var(--vt-text-muted);
  font-size: 12px;
  line-height: 1.5;
  background: var(--vt-surface-2, transparent);
  user-select: none;
}

.vt-fingerprint {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.vt-warn-text {
  color: var(--vt-warn-text);
  font-weight: 650;
}

.vt-hr {
  width: 100%;
  height: 1px;
  margin: 16px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--vt-border) 12%, var(--vt-border) 88%, transparent);
}

/* 纯图标按钮 */
.vt-icon-btn {
  appearance: none;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-md);
  background: var(--vt-surface);
  color: var(--vt-text-muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--vt-transition), background-color var(--vt-transition),
    border-color var(--vt-transition), transform var(--vt-transition);
}

.vt-icon-btn:hover {
  border-color: var(--vt-primary-border);
  background: var(--vt-primary-soft);
  color: var(--vt-primary-strong);
}

.vt-icon-btn:active {
  transform: scale(0.96);
}

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

.vt-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ===== 6. 卡片与物种网格 ================================================ */

.vt-card {
  position: relative;
  padding: clamp(16px, 2.6vw, 22px);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-lg);
  background: var(--vt-surface);
  box-shadow: var(--vt-shadow-sm);
  transition: border-color var(--vt-transition), background-color var(--vt-transition),
    box-shadow var(--vt-transition), transform var(--vt-transition);
}

.vt-card:hover {
  border-color: var(--vt-border-strong);
  box-shadow: var(--vt-shadow-md);
}

button.vt-card,
a.vt-card,
.vt-card.is-clickable {
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button.vt-card:hover,
a.vt-card:hover,
.vt-card.is-clickable:hover {
  border-color: var(--vt-primary-border);
  box-shadow: var(--vt-shadow-md);
  transform: translateY(-1px);
}

button.vt-card:active,
a.vt-card:active,
.vt-card.is-clickable:active {
  transform: translateY(0);
}

/* 卡片内相邻说明文字的间距（首页、设置、草稿卡） */
.vt-card:not(.vt-result-card):not(.vt-ai-panel) > .vt-label + .vt-muted,
.vt-card:not(.vt-result-card):not(.vt-ai-panel) > .vt-label + .vt-hint {
  margin-top: 6px;
}

.vt-card:not(.vt-result-card):not(.vt-ai-panel) > .vt-actions {
  margin-top: 18px;
}

/* 选中卡片：主色描边 + 淡色底 + 右上角勾选 */
.vt-card.is-selected {
  border-color: var(--vt-primary);
  background: var(--vt-primary-soft);
  box-shadow: 0 0 0 1px var(--vt-primary), var(--vt-shadow-md);
}

.vt-card.is-selected:hover {
  border-color: var(--vt-primary);
  box-shadow: 0 0 0 1px var(--vt-primary), var(--vt-shadow-md);
}

.vt-card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--vt-primary);
  color: var(--vt-on-primary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.3);
}

.vt-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  align-items: stretch;
  gap: var(--vt-space-4);
}

.vt-card-grid > .vt-card {
  height: 100%;
}

.vt-card-lg {
  grid-column: 1 / -1;
  padding: clamp(18px, 3vw, 26px);
  border-radius: var(--vt-radius-lg);
}

/* 物种卡 */
.vt-card.vt-species-card,
.vt-species-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  height: 100%;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

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

.vt-species-card:active {
  transform: translateY(0) scale(0.995);
}

.vt-species-card.is-selected {
  border-color: var(--vt-primary);
  background: var(--vt-primary-soft);
  box-shadow: 0 0 0 1px var(--vt-primary), var(--vt-shadow-md);
}

.vt-species-emoji {
  display: grid;
  flex: none;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 2px;
  border: 1px solid var(--vt-primary-border);
  border-radius: 16px;
  background: var(--vt-primary-soft);
  font-size: 1.75rem;
  line-height: 1;
}

.vt-species-name {
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-md);
  font-weight: 750;
  line-height: 1.3;
}

.vt-species-sub {
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-xs);
  line-height: 1.5;
}

.vt-species-card .vt-muted {
  font-size: var(--vt-fs-xs);
  line-height: 1.5;
}

/* v1.1 混养 / 多物种入口：横向宽卡 */
.vt-species-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "emoji name"
    "emoji sub"
    "emoji meta";
  align-items: center;
  column-gap: 18px;
  row-gap: 3px;
  text-align: left;
}

.vt-species-card-wide .vt-species-emoji {
  grid-area: emoji;
  margin-bottom: 0;
  font-size: 1.5rem;
}

.vt-species-card-wide .vt-species-name {
  grid-area: name;
  font-size: var(--vt-fs-lg);
}

.vt-species-card-wide .vt-species-sub {
  grid-area: sub;
}

.vt-species-card-wide .vt-muted {
  grid-area: meta;
}

@media (max-width: 640px) {
  .vt-species-card-wide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
  }

  .vt-species-card-wide .vt-species-emoji {
    margin-bottom: 2px;
  }
}

/* ===== 7. 表单控件 ====================================================== */

.vt-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.vt-field:not(:first-child) {
  margin-top: 18px;
}

.vt-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--vt-text);
  font-size: var(--vt-fs-sm);
  font-weight: 700;
  line-height: 1.45;
}

.vt-hint {
  color: var(--vt-text-faint);
  font-size: var(--vt-fs-xs);
  line-height: 1.65;
}

.vt-input,
.vt-select,
.vt-textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--vt-border-strong);
  border-radius: var(--vt-radius-md);
  background-color: var(--vt-surface);
  color: var(--vt-text);
  font-size: var(--vt-fs-md);
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(16, 40, 34, 0.03);
  transition: border-color var(--vt-transition), box-shadow var(--vt-transition),
    background-color var(--vt-transition);
}

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

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

.vt-input:focus,
.vt-select:focus,
.vt-textarea:focus {
  outline: none;
  border-color: var(--vt-primary);
  background-color: var(--vt-surface);
  box-shadow: var(--vt-focus-ring);
}

.vt-input:disabled,
.vt-select:disabled,
.vt-textarea:disabled {
  background-color: var(--vt-surface-3);
  color: var(--vt-text-faint);
  cursor: not-allowed;
  box-shadow: none;
}

.vt-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--vt-text-muted) 50%),
    linear-gradient(135deg, var(--vt-text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.vt-textarea {
  min-height: 112px;
  padding: 11px 13px;
  line-height: 1.7;
  resize: vertical;
}

/* 滑块输入（temperature）保持原生观感，不套输入框边框 */
.vt-input[type="range"] {
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  accent-color: var(--vt-primary);
  cursor: pointer;
}

/* 校验失败 */
.vt-field.is-invalid .vt-label {
  color: var(--vt-danger-text);
}

.vt-field.is-invalid .vt-hint {
  color: var(--vt-danger-text);
}

.vt-field.is-invalid .vt-input,
.vt-field.is-invalid .vt-select,
.vt-field.is-invalid .vt-textarea {
  border-color: var(--vt-danger);
  background-color: var(--vt-danger-soft);
}

.vt-field.is-invalid .vt-input:focus,
.vt-field.is-invalid .vt-select:focus,
.vt-field.is-invalid .vt-textarea:focus {
  border-color: var(--vt-danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.vt-field.is-invalid .vt-chip:not(.is-active) {
  border-color: var(--vt-danger-border);
}

/* 开关：支持 label + 原生 checkbox，也兼容 button[role="switch"] */
.vt-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--vt-text);
  font-size: var(--vt-fs-base);
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.vt-switch > input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  margin: 0;
  border: 0;
  border-radius: var(--vt-radius-pill);
  background: var(--vt-border-strong);
  cursor: pointer;
  transition: background-color var(--vt-transition);
}

.vt-switch > input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform var(--vt-transition);
}

.vt-switch > input[type="checkbox"]:checked {
  background: var(--vt-primary);
}

.vt-switch > input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.vt-switch > input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: var(--vt-focus-ring);
}

/* button[role="switch"] 形态 */
.vt-switch[aria-checked] {
  position: relative;
  min-height: 30px;
  padding-left: 58px;
}

.vt-switch[aria-checked]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 46px;
  height: 26px;
  margin-top: -13px;
  border-radius: var(--vt-radius-pill);
  background: var(--vt-border-strong);
  transition: background-color var(--vt-transition);
}

.vt-switch[aria-checked]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform var(--vt-transition);
}

.vt-switch[aria-checked="true"]::before {
  background: var(--vt-primary);
}

.vt-switch[aria-checked="true"]::after {
  transform: translateX(20px);
}

/* 分段控件 */
.vt-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 100%;
  padding: 3px;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-pill);
  background: var(--vt-surface-3);
}

.vt-segmented-item {
  appearance: none;
  min-height: 36px;
  padding: 7px 15px;
  border: 1px solid transparent;
  border-radius: var(--vt-radius-pill);
  background: transparent;
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-sm);
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--vt-transition), background-color var(--vt-transition),
    border-color var(--vt-transition), box-shadow var(--vt-transition);
}

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

.vt-segmented-item.is-active,
.vt-segmented-item[aria-pressed="true"],
.vt-segmented-item[aria-checked="true"] {
  border-color: var(--vt-border);
  background: var(--vt-surface);
  color: var(--vt-primary-strong);
  box-shadow: var(--vt-shadow-xs);
}

.vt-segmented-item:focus-visible {
  outline: none;
  box-shadow: var(--vt-focus-ring);
}

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

.vt-search .vt-input {
  padding-left: 40px;
}

.vt-search::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  width: 16px;
  height: 16px;
  background: var(--vt-text-faint);
  pointer-events: none;
  transform: translateY(-50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000000'%20stroke-width='2.2'%20stroke-linecap='round'%3E%3Ccircle%20cx='11'%20cy='11'%20r='7'/%3E%3Cpath%20d='M20%2020l-3.6-3.6'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000000'%20stroke-width='2.2'%20stroke-linecap='round'%3E%3Ccircle%20cx='11'%20cy='11'%20r='7'/%3E%3Cpath%20d='M20%2020l-3.6-3.6'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

/* ===== 8. 选项（chips / option） ======================================== */

.vt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vt-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--vt-border-strong);
  border-radius: var(--vt-radius-pill);
  background: var(--vt-surface);
  color: var(--vt-text);
  font-size: var(--vt-fs-sm);
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  text-align: left;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--vt-transition), background-color var(--vt-transition),
    border-color var(--vt-transition), box-shadow var(--vt-transition),
    transform var(--vt-transition);
}

.vt-chip:hover {
  border-color: var(--vt-primary-border);
  background: var(--vt-surface-2);
  color: var(--vt-primary-strong);
}

.vt-chip:active {
  transform: translateY(1px);
}

.vt-chip.is-active {
  border-color: var(--vt-primary);
  background: var(--vt-primary-soft);
  color: var(--vt-primary-strong);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--vt-primary);
}

.vt-chip.is-active::before {
  content: "✓";
  flex: none;
  color: var(--vt-primary);
  font-size: 0.85em;
  font-weight: 800;
  line-height: 1;
}

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

.vt-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--vt-radius-pill);
  background: var(--vt-surface-3);
  color: var(--vt-text-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.vt-chip.is-active .vt-chip-count {
  background: var(--vt-primary);
  color: var(--vt-on-primary);
}

/* 单选 / 多选行 */
.vt-option {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  min-height: 52px;
  padding: 12px 46px 12px 14px;
  border: 1px solid var(--vt-border-strong);
  border-radius: var(--vt-radius-md);
  background: var(--vt-surface);
  color: var(--vt-text);
  font: inherit;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--vt-transition), border-color var(--vt-transition),
    box-shadow var(--vt-transition), transform var(--vt-transition);
}

.vt-option:hover {
  border-color: var(--vt-primary-border);
  background: var(--vt-surface-2);
}

.vt-option:active {
  transform: translateY(1px);
}

.vt-option:focus-visible {
  outline: none;
  border-color: var(--vt-primary);
  box-shadow: var(--vt-focus-ring);
}

.vt-option.is-active {
  border-color: var(--vt-primary);
  background: var(--vt-primary-soft);
  box-shadow: inset 0 0 0 1px var(--vt-primary);
}

.vt-option.is-active::after {
  content: "✓";
  position: absolute;
  top: 50%;
  right: 13px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--vt-primary);
  color: var(--vt-on-primary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
}

.vt-option-label {
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-base);
  font-weight: 650;
  line-height: 1.45;
}

.vt-option-label .vt-tag {
  margin-left: 4px;
  vertical-align: 1px;
}

.vt-option.is-active .vt-option-label {
  color: var(--vt-primary-strong);
}

.vt-option-desc {
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-sm);
  font-weight: 400;
  line-height: 1.55;
}

.vt-option.is-active .vt-option-desc {
  color: var(--vt-text);
}

/* ===== 9. 按钮 / 操作条 ================================================= */

.vt-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid var(--vt-border-strong);
  border-radius: var(--vt-radius-md);
  background: var(--vt-surface);
  color: var(--vt-text);
  font-size: var(--vt-fs-base);
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--vt-transition), border-color var(--vt-transition),
    color var(--vt-transition), box-shadow var(--vt-transition),
    transform var(--vt-transition), opacity var(--vt-transition);
}

.vt-btn:hover:not(:disabled):not(.is-disabled) {
  border-color: var(--vt-primary-border);
  background: var(--vt-surface-2);
  color: var(--vt-primary-strong);
}

.vt-btn:active:not(:disabled):not(.is-disabled) {
  transform: translateY(1px);
}

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

.vt-btn:disabled,
.vt-btn.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 主按钮 */
.vt-btn.primary {
  border-color: var(--vt-primary);
  background: var(--vt-primary);
  color: var(--vt-on-primary);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.vt-btn.primary:hover:not(:disabled):not(.is-disabled) {
  border-color: var(--vt-primary-strong);
  background: var(--vt-primary-strong);
  color: var(--vt-on-primary);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.vt-btn.primary:active:not(:disabled):not(.is-disabled) {
  transform: translateY(0);
}

/* 幽灵按钮 */
.vt-btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--vt-primary-strong);
  box-shadow: none;
}

.vt-btn.ghost:hover:not(:disabled):not(.is-disabled) {
  border-color: var(--vt-primary-border);
  background: var(--vt-primary-soft);
  color: var(--vt-primary-strong);
}

/* 危险按钮 */
.vt-btn.danger {
  border-color: var(--vt-danger);
  background: var(--vt-danger);
  color: var(--vt-on-danger);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.22);
}

.vt-btn.danger:hover:not(:disabled):not(.is-disabled) {
  border-color: var(--vt-danger-strong);
  background: var(--vt-danger-strong);
  color: var(--vt-on-danger);
}

/* 小按钮 */
.vt-btn.sm {
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--vt-radius-sm);
  font-size: var(--vt-fs-sm);
}

/* 加载态 */
.vt-btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.vt-btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--vt-border-strong);
  border-top-color: var(--vt-text-muted);
  border-radius: 50%;
  animation: vt-spin 0.7s linear infinite;
}

.vt-btn.primary.is-loading::after,
.vt-btn.danger.is-loading::after {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
}

.vt-btn.is-loading > * {
  opacity: 0;
}

/* 操作条 */
.vt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.vt-actions-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* 底部吸底操作条：毛玻璃 + 上边框 */
.vt-sticky {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: var(--vt-space-2);
  padding: 12px clamp(14px, 3vw, 20px) calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-md) var(--vt-radius-md) 0 0;
  background: var(--vt-header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 -6px 18px rgba(16, 40, 34, 0.06);
}

.vt-sticky .vt-btn {
  flex: 1 1 auto;
}

.vt-sticky > .vt-muted {
  font-size: var(--vt-fs-sm);
}

.vt-sticky > .vt-actions-end {
  margin-left: auto;
}

/* ===== 10. 进度 ========================================================= */

.vt-progress {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 8px;
  border-radius: var(--vt-radius-pill);
  background: var(--vt-surface-3);
  box-shadow: inset 0 1px 2px rgba(16, 40, 34, 0.07);
  overflow: hidden;
}

.vt-progress-bar {
  display: block;
  width: 0;
  max-width: 100%;
  height: 8px;
  border-radius: var(--vt-radius-pill);
  background: linear-gradient(90deg, var(--vt-primary) 0%, #14b8a6 100%);
  transition: width var(--vt-transition-slow);
}

/* 兼容“轨道在 .vt-progress-bar 内”的写法 */
.vt-progress-bar > span,
.vt-progress-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: inherit;
  transition: width var(--vt-transition-slow);
}

.vt-progress-label {
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-xs);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

/* 若 label 与 bar 同处 .vt-progress：自动变为上下结构，轨道垫在底部 */
.vt-progress:has(> .vt-progress-label) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-height: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.vt-progress:has(> .vt-progress-label) > .vt-progress-label {
  order: -1;
}

.vt-progress:has(> .vt-progress-label)::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 8px;
  border-radius: var(--vt-radius-pill);
  background: var(--vt-surface-3);
  box-shadow: inset 0 1px 2px rgba(16, 40, 34, 0.07);
}

.vt-progress:has(> .vt-progress-label) > .vt-progress-bar {
  position: relative;
  z-index: 1;
}

/* ===== 11. 提示条 / 徽标 ================================================ */

.vt-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--vt-border);
  border-left-width: 4px;
  border-radius: var(--vt-radius-md);
  background: var(--vt-surface-2);
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-base);
  line-height: 1.65;
}

.vt-banner p {
  margin: 0;
}

.vt-banner .vt-muted {
  color: inherit;
  opacity: 0.85;
}

.vt-banner strong,
.vt-banner b {
  color: inherit;
  font-weight: 750;
}

.vt-banner > svg {
  flex: none;
  margin-top: 2px;
}

.vt-banner.danger {
  border-color: var(--vt-danger-border);
  border-left-color: var(--vt-danger);
  background: var(--vt-danger-soft);
  color: var(--vt-danger-text);
}

.vt-banner.warn {
  border-color: var(--vt-warn-border);
  border-left-color: var(--vt-warn);
  background: var(--vt-warn-soft);
  color: var(--vt-warn-text);
}

.vt-banner.info {
  border-color: var(--vt-info-border);
  border-left-color: var(--vt-info);
  background: var(--vt-info-soft);
  color: var(--vt-info-text);
}

.vt-banner.success {
  border-color: var(--vt-success-border);
  border-left-color: var(--vt-success);
  background: var(--vt-success-soft);
  color: var(--vt-success-text);
}

/* 徽标：默认中性，四档紧急程度 */
.vt-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 9px;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-pill);
  background: var(--vt-surface-3);
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-xs);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
}

.vt-badge::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.vt-badge.critical {
  border-color: var(--vt-urg-critical-bd);
  background: var(--vt-urg-critical-bg);
  color: var(--vt-urg-critical-fg);
}

.vt-badge.high {
  border-color: var(--vt-urg-high-bd);
  background: var(--vt-urg-high-bg);
  color: var(--vt-urg-high-fg);
}

.vt-badge.moderate {
  border-color: var(--vt-urg-moderate-bd);
  background: var(--vt-urg-moderate-bg);
  color: var(--vt-urg-moderate-fg);
}

.vt-badge.low {
  border-color: var(--vt-urg-low-bd);
  background: var(--vt-urg-low-bg);
  color: var(--vt-urg-low-fg);
}

/* ===== 12. 结果卡 ======================================================= */

.vt-result-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-lg);
  background: var(--vt-surface);
  box-shadow: var(--vt-shadow-md);
  overflow: hidden;
}

.vt-result-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vt-primary), #14b8a6 55%, var(--vt-accent));
}

/* 顶部色条随紧急程度变化 */
.vt-result-card:has(.vt-badge.critical)::before {
  background: linear-gradient(90deg, var(--vt-danger), #f97316);
}

.vt-result-card:has(.vt-badge.high)::before {
  background: linear-gradient(90deg, #ea580c, var(--vt-accent));
}

.vt-result-card:has(.vt-badge.moderate)::before {
  background: linear-gradient(90deg, var(--vt-accent), #fbbf24);
}

.vt-result-card:has(.vt-badge.low)::before {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}

.vt-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
}

.vt-result-name {
  min-width: 0;
  margin: 0;
  color: var(--vt-text-strong);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.vt-result-score {
  display: inline-flex;
  flex: none;
  align-self: flex-start;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
  max-width: 100%;
  padding: 3px 11px;
  border: 1px solid var(--vt-primary-border);
  border-radius: var(--vt-radius-pill);
  background: var(--vt-primary-soft);
  color: var(--vt-primary-strong);
  font-size: var(--vt-fs-sm);
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}

.vt-result-score strong {
  color: var(--vt-primary-strong);
  font-size: var(--vt-fs-lg);
  font-weight: 800;
}

.vt-meter {
  width: 100%;
  height: 8px;
  border-radius: var(--vt-radius-pill);
  background: var(--vt-surface-3);
  box-shadow: inset 0 1px 2px rgba(16, 40, 34, 0.07);
  overflow: hidden;
}

.vt-meter-fill {
  display: block;
  width: 0;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--vt-primary) 0%, #14b8a6 70%, var(--vt-accent) 100%);
  transition: width var(--vt-transition-slow);
}

.vt-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vt-evidence-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--vt-success-border);
  border-radius: var(--vt-radius-pill);
  background: var(--vt-success-soft);
  color: var(--vt-success-text);
  font-size: var(--vt-fs-xs);
  font-weight: 650;
  line-height: 1.5;
}

.vt-evidence-item::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.vt-evidence-item.is-missing {
  border-style: dashed;
  border-color: var(--vt-border-strong);
  background: var(--vt-surface-2);
  color: var(--vt-text-faint);
}

.vt-result-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--vt-text);
  font-size: var(--vt-fs-base);
  line-height: 1.7;
}

.vt-result-body p,
.vt-result-body ul,
.vt-result-body ol {
  margin: 0;
}

.vt-result-body ul,
.vt-result-body ol {
  padding-left: 1.3em;
}

.vt-result-body li + li {
  margin-top: 4px;
}

.vt-result-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--vt-border);
}

.vt-result-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.vt-result-section > h3,
.vt-result-section > h4 {
  margin: 0;
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-base);
  font-weight: 750;
  line-height: 1.45;
}

.vt-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-xs);
  background: var(--vt-surface-3);
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

/* 键值展示 */
.vt-kv {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: var(--vt-fs-base);
  line-height: 1.65;
}

.vt-kv dt {
  color: var(--vt-text-muted);
  font-weight: 600;
}

.vt-kv dd {
  min-width: 0;
  color: var(--vt-text);
}

/* ===== 13. AI 面板与富文本 ============================================== */

.vt-ai-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(15px, 2.6vw, 20px);
  border: 1px solid var(--vt-primary-border);
  border-radius: var(--vt-radius-lg);
  background-color: var(--vt-surface);
  background-image: linear-gradient(180deg, var(--vt-primary-soft), transparent 70%);
  box-shadow: var(--vt-shadow-xs);
}

.vt-ai-output {
  max-height: 62vh;
  min-height: 46px;
  padding: 14px clamp(14px, 2.5vw, 18px);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-md);
  background: var(--vt-surface);
  color: var(--vt-text);
  font-size: var(--vt-fs-base);
  line-height: 1.75;
  white-space: normal;
  word-break: break-word;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vt-ai-output > .vt-prose {
  white-space: normal;
}

/* app.js 的 mdToHtml 直接写入 .vt-ai-output（未包裹 .vt-prose）：同款富文本排版 */
.vt-ai-output h2 {
  margin: 1.5em 0 0.55em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--vt-border);
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-lg);
  font-weight: 750;
  line-height: 1.4;
}

.vt-ai-output h3 {
  margin: 1.25em 0 0.45em;
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-md);
  font-weight: 750;
  line-height: 1.45;
}

.vt-ai-output h4 {
  margin: 1.1em 0 0.4em;
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-base);
  font-weight: 750;
  line-height: 1.5;
}

.vt-ai-output p {
  margin: 0 0 0.85em;
}

.vt-ai-output ul,
.vt-ai-output ol {
  margin: 0.2em 0 0.95em;
  padding-left: 1.35em;
}

.vt-ai-output li {
  margin: 0.28em 0;
}

.vt-ai-output li::marker {
  color: var(--vt-primary);
  font-weight: 700;
}

.vt-ai-output strong {
  color: var(--vt-text-strong);
  font-weight: 750;
}

.vt-ai-output em {
  color: var(--vt-text-muted);
}

.vt-ai-output a {
  color: var(--vt-primary);
  text-decoration: underline;
  text-decoration-color: var(--vt-primary-border);
  text-underline-offset: 0.15em;
}

.vt-ai-output code {
  padding: 0.1em 0.4em;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-xs);
  background: var(--vt-surface-3);
  color: var(--vt-text-strong);
  font-family: var(--vt-font-mono);
  font-size: 0.875em;
}

.vt-ai-output pre {
  margin: 0.6em 0 1em;
  padding: 13px 15px;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-md);
  background: #10201c;
  color: #e6f4f1;
  overflow-x: auto;
}

.vt-ai-output pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: var(--vt-fs-sm);
}

.vt-ai-output blockquote {
  margin: 0.6em 0 1em;
  padding: 9px 14px;
  border-left: 3px solid var(--vt-primary);
  border-radius: 0 var(--vt-radius-sm) var(--vt-radius-sm) 0;
  background: var(--vt-primary-soft);
  color: var(--vt-text-muted);
}

.vt-ai-output table {
  width: 100%;
  margin: 0.6em 0 1em;
  border: 1px solid var(--vt-border);
  border-collapse: collapse;
  border-radius: var(--vt-radius-sm);
  font-size: var(--vt-fs-sm);
  overflow: hidden;
}

.vt-ai-output th,
.vt-ai-output td {
  padding: 7px 10px;
  border: 1px solid var(--vt-border);
  text-align: left;
  vertical-align: top;
}

.vt-ai-output th {
  background: var(--vt-surface-3);
  color: var(--vt-text-strong);
  font-weight: 700;
}

.vt-ai-output tbody tr:nth-child(even) {
  background: var(--vt-surface-2);
}

.vt-ai-output hr {
  margin: 1.4em 0;
}

.vt-ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.vt-prose {
  color: var(--vt-text);
  font-size: var(--vt-fs-base);
  line-height: 1.78;
  word-break: break-word;
}

.vt-prose > :first-child {
  margin-top: 0;
}

.vt-prose > :last-child {
  margin-bottom: 0;
}

.vt-prose h2 {
  margin: 1.5em 0 0.55em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--vt-border);
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-lg);
  font-weight: 750;
  line-height: 1.4;
}

.vt-prose h3 {
  margin: 1.25em 0 0.45em;
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-md);
  font-weight: 750;
  line-height: 1.45;
}

.vt-prose h4 {
  margin: 1.1em 0 0.4em;
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-base);
  font-weight: 750;
  line-height: 1.5;
}

.vt-prose p {
  margin: 0 0 0.85em;
}

.vt-prose ul,
.vt-prose ol {
  margin: 0.2em 0 0.95em;
  padding-left: 1.35em;
}

.vt-prose li {
  margin: 0.28em 0;
}

.vt-prose li::marker {
  color: var(--vt-primary);
  font-weight: 700;
}

.vt-prose strong {
  color: var(--vt-text-strong);
  font-weight: 750;
}

.vt-prose em {
  color: var(--vt-text-muted);
}

.vt-prose a {
  color: var(--vt-primary);
  text-decoration: underline;
  text-decoration-color: var(--vt-primary-border);
  text-underline-offset: 0.15em;
}

.vt-prose code {
  padding: 0.1em 0.4em;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-xs);
  background: var(--vt-surface-3);
  color: var(--vt-text-strong);
  font-family: var(--vt-font-mono);
  font-size: 0.875em;
}

.vt-prose pre {
  margin: 0.6em 0 1em;
  padding: 13px 15px;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-md);
  background: #10201c;
  color: #e6f4f1;
  overflow-x: auto;
}

.vt-prose pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: var(--vt-fs-sm);
}

.vt-prose blockquote {
  margin: 0.6em 0 1em;
  padding: 9px 14px;
  border-left: 3px solid var(--vt-primary);
  border-radius: 0 var(--vt-radius-sm) var(--vt-radius-sm) 0;
  background: var(--vt-primary-soft);
  color: var(--vt-text-muted);
}

.vt-prose table {
  width: 100%;
  margin: 0.6em 0 1em;
  border: 1px solid var(--vt-border);
  border-collapse: collapse;
  border-radius: var(--vt-radius-sm);
  font-size: var(--vt-fs-sm);
  overflow: hidden;
}

.vt-prose th,
.vt-prose td {
  padding: 7px 10px;
  border: 1px solid var(--vt-border);
  text-align: left;
  vertical-align: top;
}

.vt-prose th {
  background: var(--vt-surface-3);
  color: var(--vt-text-strong);
  font-weight: 700;
}

.vt-prose tbody tr:nth-child(even) {
  background: var(--vt-surface-2);
}

.vt-prose hr {
  margin: 1.4em 0;
}

.vt-prose img {
  height: auto;
  max-width: 100%;
  border-radius: var(--vt-radius-md);
}

/* 折叠区 */
.vt-details {
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-md);
  background: var(--vt-surface-2);
  overflow: hidden;
}

.vt-details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  color: var(--vt-text);
  font-size: var(--vt-fs-base);
  font-weight: 650;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.vt-details > summary::-webkit-details-marker {
  display: none;
}

.vt-details > summary::before {
  content: "▸";
  flex: none;
  color: var(--vt-primary);
  font-size: 0.85em;
  line-height: 1;
  transition: transform var(--vt-transition);
}

.vt-details[open] > summary::before {
  transform: rotate(90deg);
}

.vt-details > summary:hover {
  background: var(--vt-surface-3);
  color: var(--vt-text-strong);
}

.vt-details > summary:focus-visible {
  outline: 2px solid var(--vt-focus-color);
  outline-offset: -2px;
}

.vt-details[open] > summary {
  border-bottom: 1px solid var(--vt-border);
}

.vt-details > :not(summary) {
  padding: 0 14px;
}

.vt-details > *:last-child {
  padding-bottom: 14px;
}

.vt-details > .vt-prose {
  padding-top: 12px;
}

.vt-details > .vt-result-body {
  padding-top: 8px;
}

/* ===== 14. Toast / Modal / 列表 ======================================== */

.vt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: clamp(30px, 6vw, 54px) 22px;
  border: 1px dashed var(--vt-border-strong);
  border-radius: var(--vt-radius-lg);
  background: var(--vt-surface-2);
  color: var(--vt-text-muted);
  font-size: var(--vt-fs-base);
  line-height: 1.7;
  text-align: center;
}

.vt-empty strong {
  color: var(--vt-text);
}

.vt-empty .vt-spinner {
  margin-bottom: 2px;
}

.vt-spinner {
  display: inline-block;
  flex: none;
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--vt-primary-soft-2);
  border-top-color: var(--vt-primary);
  border-radius: 50%;
  vertical-align: middle;
  animation: vt-spin 0.8s linear infinite;
}

.vt-btn .vt-spinner {
  width: 15px;
  height: 15px;
  border-width: 2px;
}

.vt-toast {
  position: fixed;
  right: clamp(14px, 3vw, 24px);
  bottom: clamp(14px, 3vw, 24px);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(420px, calc(100vw - 28px));
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--vt-primary);
  border-radius: var(--vt-radius-md);
  background: #1e302b;
  color: #f3faf7;
  font-size: var(--vt-fs-base);
  line-height: 1.55;
  box-shadow: var(--vt-shadow-lg);
  word-break: break-word;
  transition: opacity 300ms ease;
  animation: vt-toast-in var(--vt-transition-slow);
}

.vt-toast.ok {
  border-left-color: #34d399;
  background: #143628;
}

.vt-toast.err {
  border-left-color: #f87171;
  background: #3c1616;
}

/* 若 toast 由 #toast-root 托管，则容器固定在右下并纵向堆叠 */
#toast-root {
  position: fixed;
  right: clamp(14px, 3vw, 24px);
  bottom: clamp(14px, 3vw, 24px);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: min(420px, calc(100vw - 28px));
  pointer-events: none;
}

#toast-root .vt-toast {
  position: static;
  right: auto;
  bottom: auto;
  max-width: 100%;
  pointer-events: auto;
}

/* 模态框 */
.vt-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 24px);
  background: var(--vt-overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: vt-fade-in 0.18s ease both;
}

.vt-modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  max-height: min(86dvh, 760px);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-xl);
  background: var(--vt-surface);
  box-shadow: var(--vt-shadow-lg);
  overflow: hidden;
  animation: vt-modal-in 0.22s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.vt-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--vt-border);
  background: var(--vt-surface);
  color: var(--vt-text-strong);
  font-size: var(--vt-fs-lg);
  font-weight: 750;
  line-height: 1.35;
}

.vt-modal-head .vt-btn {
  flex: none;
}

.vt-modal-head .vt-title {
  margin: 0;
  font-size: var(--vt-fs-lg);
  letter-spacing: 0;
  line-height: 1.4;
}

.vt-modal-body {
  padding: 16px 20px;
  color: var(--vt-text);
  font-size: var(--vt-fs-base);
  line-height: 1.7;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vt-modal-body > * + * {
  margin-top: 10px;
}

.vt-modal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 13px 20px;
  border-top: 1px solid var(--vt-border);
  background: var(--vt-surface-2);
}

/* 列表 */
.vt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vt-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-md);
  background: var(--vt-surface);
  color: var(--vt-text);
  font-size: var(--vt-fs-base);
  line-height: 1.6;
}

.vt-list-item strong {
  color: var(--vt-text-strong);
  font-weight: 700;
}

/* 历史记录行内的“打开”按钮：整行可点、文字可换行 */
.vt-list-item .vt-btn {
  flex: 1 1 auto;
  justify-content: flex-start;
  min-height: 0;
  padding: 4px 6px;
  white-space: normal;
  text-align: left;
}

/* 键帽 */
.vt-kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--vt-border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--vt-surface-2);
  color: var(--vt-text-muted);
  font-family: var(--vt-font-mono);
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}

/* ===== 15. 动效 ========================================================= */

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

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

@keyframes vt-screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes vt-toast-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes vt-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes vt-sheet-in {
  from {
    opacity: 0;
    transform: translateY(48px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 16. 响应式（≤640px 移动端） ====================================== */

@media (max-width: 900px) {
  .vt-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --vt-header-h: 56px;
  }

  /* 手机端两行：品牌一行、导航一行；导航从左侧开始并可横向滚动 */
  .vt-header {
    flex-wrap: wrap;
    row-gap: 6px;
    gap: 6px;
    padding: 8px 12px;
  }

  .vt-brand {
    flex: 0 1 auto;
    gap: 7px;
    min-width: 0;
    max-width: 100%;
  }

  .vt-brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 16px;
  }

  .vt-brand-mark svg {
    width: 18px;
    height: 18px;
  }

  .vt-brand-text {
    gap: 0;
    overflow: hidden;
    font-size: var(--vt-fs-base);
    text-overflow: ellipsis;
  }

  .vt-brand-text small {
    display: none;
  }

  .vt-brand-text em {
    font-size: var(--vt-fs-xs);
  }

  /* 导航单独一行，从左侧开始；超出时可横向滑动 */
  .vt-nav {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 2px;
    min-width: 0;
    width: 100%;
    padding: 2px 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .vt-nav::-webkit-scrollbar {
    display: none;
  }

  .vt-nav-btn {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 5px 8px;
    font-size: var(--vt-fs-xs);
  }

  .vt-nav .vt-icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .vt-main {
    gap: var(--vt-space-4);
    max-width: 100%;
    padding: 16px 14px 40px;
  }

  .vt-screen {
    gap: var(--vt-space-4);
  }

  .vt-title {
    font-size: clamp(1.3rem, 6vw, 1.6rem);
  }

  .vt-sub {
    font-size: var(--vt-fs-sm);
    line-height: 1.7;
  }

  .vt-hero {
    padding: 20px 17px;
    border-radius: var(--vt-radius-lg);
  }

  .vt-hero-title {
    font-size: 24px;
  }

  .vt-hero-sub {
    font-size: var(--vt-fs-base);
  }

  .vt-card {
    padding: 15px 14px;
  }

  .vt-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .vt-card-lg {
    padding: 16px 14px;
  }

  .vt-species-card {
    gap: 5px;
    padding: 14px 10px 13px;
  }

  .vt-species-emoji {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 1.5rem;
  }

  .vt-species-name {
    font-size: var(--vt-fs-base);
  }

  .vt-species-sub {
    font-size: 0.6875rem;
  }

  .vt-grid-2,
  .vt-grid-3 {
    grid-template-columns: 1fr;
  }

  .vt-muted {
    font-size: inherit;
  }

  .vt-icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .vt-chips {
    gap: 7px;
  }

  .vt-chip {
    min-height: 40px;
    padding: 8px 12px;
  }

  .vt-option {
    padding: 12px 44px 12px 13px;
  }

  .vt-btn {
    min-height: 44px;
    padding: 10px 16px;
  }

  .vt-btn.sm {
    min-height: 40px;
    padding: 8px 12px;
  }

  .vt-actions {
    gap: 9px;
  }

  .vt-actions .vt-btn {
    flex: 1 1 auto;
  }

  .vt-actions-end {
    justify-content: space-between;
  }

  .vt-sticky {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  }

  .vt-sticky > .vt-muted {
    width: 100%;
  }

  .vt-sticky > .vt-actions-end {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .vt-field:not(:first-child) {
    margin-top: 16px;
  }

  .vt-segmented {
    display: flex;
    width: 100%;
  }

  .vt-segmented-item {
    flex: 1 1 auto;
    min-height: 40px;
    text-align: center;
  }

  .vt-progress {
    min-height: 8px;
  }

  .vt-result-card {
    padding: 16px 14px;
    border-radius: var(--vt-radius-md);
  }

  .vt-result-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .vt-result-score {
    align-self: flex-start;
    font-size: var(--vt-fs-xs);
  }

  .vt-result-score strong {
    font-size: var(--vt-fs-md);
  }

  .vt-result-body {
    gap: 10px;
  }

  .vt-kv {
    grid-template-columns: minmax(78px, auto) 1fr;
    gap: 5px 12px;
    font-size: var(--vt-fs-sm);
  }

  .vt-ai-panel {
    padding: 14px;
  }

  .vt-ai-actions {
    justify-content: stretch;
  }

  .vt-ai-actions .vt-btn {
    flex: 1 1 auto;
  }

  .vt-ai-output {
    max-height: 56vh;
  }

  .vt-prose {
    font-size: var(--vt-fs-base);
    line-height: 1.75;
  }

  .vt-prose h2 {
    font-size: var(--vt-fs-md);
  }

  .vt-prose h3 {
    font-size: var(--vt-fs-base);
  }

  .vt-prose table {
    font-size: var(--vt-fs-xs);
  }

  .vt-prose th,
  .vt-prose td {
    padding: 6px 8px;
  }

  .vt-toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    justify-content: flex-start;
    max-width: none;
  }

  #toast-root {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }

  #toast-root .vt-toast {
    width: 100%;
  }

  .vt-modal {
    align-items: flex-end;
    padding: 0;
  }

  .vt-modal-panel {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    animation: vt-sheet-in 0.26s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  }

  .vt-modal-head {
    padding: 14px 16px;
    font-size: var(--vt-fs-md);
  }

  .vt-modal-body {
    padding: 16px;
  }

  .vt-modal-foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .vt-modal-foot .vt-btn {
    flex: 1 1 auto;
  }

  .vt-footer {
    padding: 6px 16px 30px;
  }

  .vt-list-item {
    padding: 10px;
  }

  .vt-empty {
    padding: 32px 16px;
  }
}

/* 极窄屏：隐藏品牌英文副标题，保证页头单行 */
@media (max-width: 400px) {
  .vt-brand-text em {
    display: none;
  }

  .vt-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 15px;
  }

  .vt-nav-btn {
    padding: 5px 7px;
  }
}

/* 窄屏打印/阅读时的网格兜底已在上方处理 */

/* ===== 17. 打印：仅输出结果内容 ======================================== */

@media print {
  @page {
    margin: 14mm;
  }

  html {
    color-scheme: light;
  }

  body {
    background: #ffffff !important;
    background-image: none !important;
    color: #111111 !important;
    font-size: 11pt;
    line-height: 1.6;
  }

  .vt-header,
  .vt-nav,
  .vt-footer,
  .vt-brand,
  .vt-backdrop,
  .vt-progress,
  .vt-progress-label,
  .vt-actions,
  .vt-actions-end,
  .vt-btn,
  .vt-ai-actions,
  .vt-chips,
  .vt-option,
  .vt-field,
  .vt-toast,
  .vt-modal,
  .vt-empty,
  .vt-spinner,
  .vt-boot,
  .vt-step,
  .vt-species-card,
  .vt-screen-head .vt-sub {
    display: none !important;
  }

  .vt-app {
    display: block;
    min-height: 0;
  }

  .vt-main {
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .vt-screen {
    display: block !important;
    animation: none !important;
  }

  /* 只保留含结果卡片的屏幕 */
  .vt-screen:not(:has(.vt-result-card)) {
    display: none !important;
  }

  .vt-screen > * + * {
    margin-top: 10px;
  }

  .vt-screen-head {
    margin-bottom: 10px;
  }

  .vt-title {
    color: #111111 !important;
    font-size: 18pt;
  }

  .vt-card,
  .vt-result-card,
  .vt-ai-panel {
    padding: 12px 14px;
    border: 1px solid #c8c8c8 !important;
    border-radius: 6px;
    background: #ffffff !important;
    color: #111111 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  .vt-result-card {
    margin-bottom: 10px;
  }

  .vt-result-card::before {
    display: none;
  }

  .vt-result-head {
    gap: 8px;
  }

  .vt-result-name,
  .vt-result-section > h3,
  .vt-result-section > h4,
  .vt-prose h2,
  .vt-prose h3,
  .vt-prose h4,
  .vt-prose strong,
  .vt-result-body strong,
  .vt-result-section strong {
    color: #111111 !important;
  }

  .vt-result-body,
  .vt-result-section,
  .vt-prose,
  .vt-prose p,
  .vt-prose li,
  .vt-result-body p,
  .vt-result-body li {
    color: #1f1f1f !important;
  }

  .vt-result-score,
  .vt-badge,
  .vt-badge-line .vt-badge {
    border: 1px solid #999999 !important;
    background: #f3f3f3 !important;
    color: #111111 !important;
    box-shadow: none !important;
  }

  .vt-badge::before {
    background: #555555 !important;
  }

  .vt-meter {
    background: #e2e2e2 !important;
    box-shadow: none !important;
  }

  .vt-meter-fill {
    background: #0f766e !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .vt-evidence-item {
    border: 1px solid #bbbbbb !important;
    background: #f7f7f7 !important;
    color: #222222 !important;
  }

  .vt-evidence-item::before {
    background: #333333 !important;
  }

  .vt-tag {
    border: 1px solid #bbbbbb !important;
    background: #f3f3f3 !important;
    color: #222222 !important;
  }

  .vt-kv dt {
    color: #444444 !important;
  }

  .vt-kv dd {
    color: #111111 !important;
  }

  .vt-ai-output {
    max-height: none;
    border: 0 !important;
    background: #ffffff !important;
    overflow: visible;
    white-space: normal;
  }

  .vt-prose pre {
    border: 1px solid #cccccc !important;
    background: #f5f5f5 !important;
    color: #111111 !important;
  }

  .vt-prose code {
    border: 1px solid #cccccc !important;
    background: #f3f3f3 !important;
    color: #111111 !important;
  }

  .vt-prose table,
  .vt-prose th,
  .vt-prose td {
    border: 1px solid #bbbbbb !important;
  }

  .vt-prose th {
    background: #f0f0f0 !important;
    color: #111111 !important;
  }

  .vt-prose tbody tr:nth-child(even) {
    background: #ffffff !important;
  }

  .vt-prose h2 {
    border-bottom-color: #cccccc !important;
  }

  .vt-prose blockquote {
    border-left-color: #888888 !important;
    background: #f7f7f7 !important;
    color: #333333 !important;
  }

  .vt-details {
    border-color: #bbbbbb !important;
    background: #ffffff !important;
  }

  a {
    color: #111111 !important;
    text-decoration: none;
  }

  .vt-screen,
  .vt-result-card,
  .vt-ai-panel,
  .vt-card,
  .vt-result-section {
    break-inside: avoid;
  }

  /* 结果里的折叠区在打印时全部展开，避免漏印说明 */
  .vt-details > summary {
    cursor: default;
    border-bottom: 1px solid #cccccc !important;
  }

  .vt-details > summary::before {
    display: none !important;
  }

  .vt-details:not([open]) > *:not(summary) {
    display: block !important;
  }

  /* 提示条在纸上统一为浅底深字 */
  .vt-banner {
    border: 1px solid #bbbbbb !important;
    border-left-width: 4px !important;
    background: #f7f7f7 !important;
    color: #111111 !important;
  }

  .vt-banner .vt-muted {
    color: #333333 !important;
    opacity: 1;
  }

  .vt-result-score strong {
    color: #111111 !important;
  }

  /* .vt-ai-output 直接承载 mdToHtml 输出，打印时同样转成深色文字 */
  .vt-ai-output,
  .vt-ai-output p,
  .vt-ai-output li,
  .vt-ai-output h2,
  .vt-ai-output h3,
  .vt-ai-output h4,
  .vt-ai-output strong,
  .vt-ai-output em,
  .vt-ai-output a {
    color: #111111 !important;
  }

  .vt-ai-output code,
  .vt-ai-output pre {
    border: 1px solid #cccccc !important;
    background: #f5f5f5 !important;
    color: #111111 !important;
  }

  .vt-ai-output table,
  .vt-ai-output th,
  .vt-ai-output td {
    border: 1px solid #bbbbbb !important;
  }

  .vt-ai-output th {
    background: #f0f0f0 !important;
    color: #111111 !important;
  }

  .vt-ai-output blockquote {
    border-left-color: #888888 !important;
    background: #f7f7f7 !important;
    color: #333333 !important;
  }

  .vt-ai-output h2 {
    border-bottom-color: #cccccc !important;
  }
}

/* ===== 18. 减少动效偏好 ================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .vt-spinner {
    animation: none !important;
    border-top-color: var(--vt-primary);
  }

  .vt-screen,
  .vt-toast,
  .vt-modal,
  .vt-modal-panel,
  .vt-backdrop {
    animation: none !important;
  }
}

/* ===== v1.3 照片辅助 ================================================== */
.vt-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.vt-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--vt-border);
  border-radius: 12px;
  background: var(--vt-surface-2);
}

.vt-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vt-photo-del {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.vt-photo-del:hover {
  background: rgba(220, 38, 38, 0.9);
}

@media print {
  .vt-photo-grid {
    display: none;
  }
}

.vt-report-steps { margin: 8px 0 0 18px; padding: 0; line-height: 1.7; }
.vt-report-steps li { margin: 2px 0; }

.vt-emergency-note { color: #b91c1c; font-weight: 600; }

/* ===== P0: 行动清单 / 拍照评分 ===== */
.vt-plan-item { display:flex; gap:10px; align-items:flex-start; padding:8px 0; color:var(--vt-text); font-size:var(--vt-fs-sm); line-height:1.6; cursor:pointer; }
.vt-plan-item input { width:18px; height:18px; margin-top:2px; accent-color:var(--vt-primary); flex:0 0 auto; }
.vt-plan-item.is-done span { color:var(--vt-text-faint); text-decoration:line-through; }
.vt-plan-days { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.vt-plan-day { border:1px solid var(--vt-border); border-radius:var(--vt-radius-sm); padding:8px 10px; background:var(--vt-surface-2); }
.vt-plan-day .vt-hint { margin:0 0 4px; font-weight:700; color:var(--vt-text); }
.vt-plan-day .vt-plan-item { padding:4px 0; }
.vt-photo-score { position:absolute; left:6px; bottom:6px; padding:2px 7px; border-radius:999px; font-size:0.6875rem; font-weight:700; background:rgba(0,0,0,.65); color:#fff; }
.vt-photo-score.good { background:#0d9488; }
.vt-photo-score.mid { background:#d97706; }
.vt-photo-score.bad { background:#dc2626; }
@media (max-width:640px) { .vt-plan-days { grid-template-columns:1fr; } }

/* ===== P1: 大字 / 语音 / 海报 ===== */
html[data-large="1"] { font-size: 18px; }
.vt-search { display: flex; align-items: center; gap: 6px; }
.vt-search .vt-input { flex: 1; min-width: 0; }
.vt-station-poster { text-align: center; padding: 12px 8px; }
.vt-station-poster .vt-label { font-size: 1.2rem; margin-bottom: 2px; }
.vt-qr { margin: 12px auto; width: min(280px, 80vw); background: #fff; padding: 8px; border-radius: 12px; }
.vt-qr svg { width: 100%; height: auto; display: block; }
.vt-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.1rem; letter-spacing: .12em; margin: 4px 0; }
@media print {
  .no-print, .vt-header, .vt-footer, .vt-nav, .vt-actions { display: none !important; }
  .vt-main { padding: 0 !important; max-width: 100% !important; }
  .vt-station-poster { padding: 20mm 10mm; }
  .vt-qr { width: 60mm; }
}

/* ===== P2: 交接单 / 服务站大屏 ===== */
.vt-handoff-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; border-bottom:1px solid var(--vt-border); padding-bottom:8px; margin-bottom:10px; }
.vt-kiosk { min-height:100vh; background:#0f172a; color:#e2e8f0; display:flex; align-items:center; justify-content:center; padding:24px; }
.vt-kiosk-inner { width:min(900px,100%); text-align:center; }
.vt-kiosk-brand { font-size:2rem; font-weight:800; color:#5eead4; margin:0 0 6px; }
.vt-kiosk-date { font-size:1.1rem; color:#94a3b8; margin:0 0 14px; }
.vt-kiosk-qr { width:min(340px,70vw); margin:0 auto 14px; background:#fff; padding:12px; border-radius:18px; }
.vt-kiosk-qr svg { width:100%; height:auto; display:block; }
.vt-kiosk-code { font-family:ui-monospace,Consolas,monospace; letter-spacing:.16em; color:#5eead4; font-size:1.2rem; }
.vt-kiosk-risks { margin:18px auto 0; max-width:720px; text-align:left; }
.vt-kiosk-risks p { padding:8px 0; border-bottom:1px solid #1e293b; margin:0; line-height:1.6; }
.vt-kiosk-note { margin-top:18px; color:#94a3b8; font-size:.9rem; }
@media print { .vt-handoff { border:0 !important; } }

/* ===== 症状字典 v2 / 鉴别解释 ===== */
.vt-symptom-row { display:flex; gap:6px; align-items:stretch; }
.vt-symptom-row .vt-option { flex:1; min-width:0; }
.vt-symptom-info { align-self:center; flex:0 0 auto; }
.vt-symptom-help { border-color: var(--vt-primary); }
.vt-symptom-help ul { margin:6px 0 0 18px; padding:0; color:var(--vt-text-muted); font-size:var(--vt-fs-sm); line-height:1.7; }
.vt-differential { border-left:4px solid var(--vt-primary); }
.vt-diff-row { padding:10px 0; border-bottom:1px solid var(--vt-border); }
.vt-diff-row:last-child { border-bottom:0; }
.vt-diff-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:6px; }
.vt-diff-grid > div { background:var(--vt-surface-2); border:1px solid var(--vt-border); border-radius:var(--vt-radius-sm); padding:8px 10px; min-width:0; }
.vt-diff-grid .vt-muted { margin:2px 0 0; font-size:var(--vt-fs-xs); line-height:1.6; }
@media (max-width:640px) { .vt-diff-grid { grid-template-columns:1fr; } }

/* 症状 v2：跟随 ℹ️ 按钮的浮层，限高滚动 */
.vt-symptom-popover {
  position: fixed;
  z-index: 1200;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px;
  border: 1px solid var(--vt-border-strong);
  border-radius: var(--vt-radius-md);
  background: var(--vt-surface);
  box-shadow: 0 16px 48px rgba(16, 40, 34, 0.22);
}
.vt-symptom-popover .vt-symptom-help { border: 0; padding: 0; background: transparent; }
.vt-symptom-popover .vt-result-section { margin-top: 8px; }
.vt-symptom-popover .vt-result-head { margin-bottom: 4px; }
.vt-symptom-popover .vt-actions { margin-top: 10px; }
.vt-symptom-popover ul { margin: 4px 0 0 18px; padding: 0; color: var(--vt-text-muted); font-size: var(--vt-fs-xs); line-height: 1.6; }

/* ===== 场户档案卡片 ===== */
.vt-farm-card { display:flex; align-items:flex-start; gap:16px; padding:14px 16px; border:1px solid var(--vt-border); border-radius:var(--vt-radius-md); background:var(--vt-surface); }
.vt-farm-main { flex:1 1 auto; min-width:0; }
.vt-farm-title { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.vt-farm-title strong { color:var(--vt-text-strong); font-size:1.05rem; font-weight:750; line-height:1.4; word-break:break-word; }
.vt-farm-emoji { width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; border-radius:9px; background:var(--vt-surface-2); flex:0 0 auto; }
.vt-farm-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.vt-farm-chip { display:inline-flex; align-items:center; padding:3px 9px; border:1px solid var(--vt-border); border-radius:999px; background:var(--vt-surface-2); color:var(--vt-text-muted); font-size:var(--vt-fs-xs); line-height:1.4; }
.vt-farm-notes { margin:8px 0 0; color:var(--vt-text-faint); font-size:var(--vt-fs-xs); line-height:1.6; word-break:break-word; }
.vt-farm-actions { display:flex; flex-direction:column; align-items:stretch; gap:6px; flex:0 0 auto; }
.vt-farm-actions .vt-btn { width:100%; justify-content:center; white-space:nowrap; }
@media (max-width:640px) {
  .vt-farm-card { flex-direction:column; gap:10px; padding:12px; }
  .vt-farm-actions { flex-direction:row; flex-wrap:wrap; width:100%; }
  .vt-farm-actions .vt-btn { flex:1 1 auto; width:auto; }
}

/* ===== 运营后台：分页与数据视图 ===== */
.vt-admin-tabs { display:flex; flex-wrap:wrap; gap:6px; margin: 10px 0 14px; }
.vt-admin-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.vt-admin-stat { border:1px solid var(--vt-border); border-radius:var(--vt-radius-md); background:var(--vt-surface); padding:12px; min-width:0; }
.vt-admin-stat .vt-hint { margin:0; }
.vt-admin-stat-value { font-size:1.5rem; font-weight:800; color:var(--vt-text-strong); margin:2px 0; }
.vt-admin-filters { display:grid; grid-template-columns: 150px 150px minmax(0,1fr) auto; gap:8px; align-items:center; margin:10px 0; }
.vt-admin-feedback { border:1px solid var(--vt-border); border-radius:var(--vt-radius-md); background:var(--vt-surface); padding:12px; margin:10px 0; }
.vt-admin-line { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:8px 0; border-bottom:1px solid var(--vt-border); line-height:1.6; }
.vt-admin-line:last-child { border-bottom:0; }
.vt-admin-line .vt-actions { width:auto; margin-left:auto; }
.vt-admin-bars { display:flex; flex-direction:column; gap:5px; margin-top:8px; }
.vt-admin-bar { display:grid; grid-template-columns:48px minmax(0,1fr) 36px; gap:8px; align-items:center; font-size:var(--vt-fs-xs); color:var(--vt-text-muted); }
.vt-admin-bar > div { height:8px; background:var(--vt-surface-3); border-radius:999px; overflow:hidden; }
.vt-admin-bar i { display:block; height:100%; background:var(--vt-primary); border-radius:999px; }
.vt-admin-bar b { text-align:right; color:var(--vt-text); }
@media (max-width:640px) {
  .vt-admin-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .vt-admin-filters { grid-template-columns:1fr; }
}

/* 外部审核版资料库 */
.vt-external-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:10px 0; }
.vt-external-meta > div { border:1px solid var(--vt-border); border-radius:var(--vt-radius-sm); background:var(--vt-surface-2); padding:8px 10px; }
.vt-external-meta span { display:block; color:var(--vt-text-faint); font-size:var(--vt-fs-xs); }
.vt-external-meta strong { display:block; color:var(--vt-text-strong); font-size:var(--vt-fs-sm); line-height:1.5; word-break:break-word; }
.vt-external-entry .vt-result-section { margin-top:12px; }
@media (max-width:640px) { .vt-external-meta { grid-template-columns:1fr; } }

/* 现场拍照：只走 getUserMedia，不提供相册文件选择 */
.vt-camera-wrap { display:flex; flex-direction:column; gap:10px; }
.vt-camera-wrap video { width:100%; max-height:62vh; min-height:220px; object-fit:cover; background:#0b1412; border-radius:var(--vt-radius-md); }
.vt-camera-wrap .vt-hint { margin:0; }

html, body { overflow-anchor: none; }

/* 隐藏的文件选择框固定在视口角上；不要放在页面底部，否则 input.click() 会把页面滚到底部 */
.vt-file-input { position:fixed; top:0; left:0; width:1px; height:1px; opacity:0; overflow:hidden; pointer-events:none; z-index:-1; }

/* 关键鉴别追问：已回答项纵向排列，便于回看 */
.vt-answer-section { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--vt-border); }
.vt-answer-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.vt-answer-line { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--vt-border); border-radius: var(--vt-radius-sm); background: var(--vt-surface-2); color: var(--vt-text); font-size: var(--vt-fs-sm); }
.vt-answer-line .vt-tag { flex: 0 0 auto; }

/* 网站备案信息（工信部要求展示） */
.vt-icp { margin: 6px 0 0; color: var(--vt-text-faint); font-size: var(--vt-fs-xs); line-height: 1.6; }
.vt-icp a { color: var(--vt-text-muted); text-decoration: underline; }
