@charset "UTF-8";
/* ==========================================================================
   知宠问诊研究台 — Liquid Glass 视觉系统
   参照 Apple iOS 26 / macOS Tahoe 引入并在 iOS 27（WWDC 2026）细化的
   Liquid Glass 设计语言：
     · 半透明材质（backdrop-filter：模糊 + 提饱和 + 提亮）而非实色板
     · iOS 27 细化点：边缘加深 + 更亮的镜面高光，用于增强层次与可读性
     · 折射感边框（渐变描边模拟透镜边缘）
     · 同心圆角（嵌套元素半径递减）
     · 悬浮胶囊控件
     · 尊重 Reduce Transparency / Increase Contrast / Reduce Motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  /* 字体：Apple 系统字体栈，中文优先 PingFang SC */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, "Segoe UI",
    Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  /* 字距 */
  --track-tighter: -0.022em;
  --track-tight: -0.014em;
  --track-wide: 0.06em;

  /* 同心圆角 */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;
  --radius: var(--r-md);

  /* 画布 */
  --canvas: #e8eaef;
  --canvas-veil: rgba(255, 255, 255, 0.5);

  /* 文字：三级墨阶。每级都在实际玻璃材质上取样实测 ≥4.5:1 ——
     这里的字号都在 10.5–13px，拿不到 WCAG 大字豁免。 */
  --ink: #1c1c1e;
  --ink-soft: #55555c;
  --ink-faint: #65656b;

  /* Liquid Glass 材质 —— iOS 27 默认更不透明 */
  --glass: rgba(255, 255, 255, 0.66);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-thin: rgba(255, 255, 255, 0.44);
  --glass-sunken: rgba(120, 125, 140, 0.1);

  --blur: saturate(180%) brightness(106%) blur(30px);
  --blur-thick: saturate(190%) brightness(108%) blur(44px);
  --blur-thin: saturate(160%) brightness(104%) blur(16px);

  /* 边缘：iOS 27 的「加深边缘 + 更亮高光」 */
  --edge-dark: rgba(0, 0, 0, 0.11);
  --edge-line: rgba(255, 255, 255, 0.55);
  --specular: rgba(255, 255, 255, 0.95);
  --lens: linear-gradient(
    142deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.28) 26%,
    rgba(255, 255, 255, 0) 52%,
    rgba(0, 0, 0, 0.05) 82%,
    rgba(0, 0, 0, 0.1) 100%
  );

  /* 兼容旧命名 */
  --surface: var(--glass);
  --surface-2: var(--glass-strong);
  --surface-muted: rgba(120, 125, 140, 0.08);
  --surface-sunken: var(--glass-sunken);
  --surface-veil: var(--glass-thin);
  --line: rgba(60, 60, 67, 0.13);
  --line-strong: rgba(60, 60, 67, 0.22);
  --hairline: 1px solid var(--line);
  --sheen: var(--lens);

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 10px -4px rgba(0, 0, 0, 0.08);
  --shadow: var(--shadow-sm);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.05), 0 12px 28px -10px rgba(0, 0, 0, 0.14);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.07), 0 24px 56px -16px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 8px 20px rgba(0, 0, 0, 0.09), 0 40px 80px -20px rgba(0, 0, 0, 0.26);

  /* Apple 系统色。
     区分两种用途，这是这套色板最重要的一条规则：
     - *-bright / *-ink 等是「当文字用」的颜色，压在浅色材质上；
     - *-fill-* 是「承载白色文字或白色图标」的填充色，必须自己足够深。
     iOS 的 systemBlue(#0a84ff)+白字只有 3.65:1、systemGreen+白只有 2.02:1，
     Apple 自己会这么发，但这里按 4.5:1（图形 3:1）收紧，所以填充色单独定义，
     不要图省事把 *-bright 之类的浅色拿去当渐变高光端。 */
  --accent: #0071e3;
  --accent-ink: #005eb0;
  --accent-tint: rgba(0, 113, 227, 0.12);
  --accent-tint-strong: rgba(0, 113, 227, 0.2);
  --accent-ring: rgba(0, 113, 227, 0.4);
  --on-accent: #fff;

  /* 白字填充梯度：顶端 4.70:1，底端 7.16:1 */
  --accent-fill-top: #0071e3;
  --accent-fill-mid: #0067d0;
  --accent-fill-bottom: #005bb8;

  --green-bright: #30d158;
  --green-ink: #12703b;
  --green-soft: rgba(48, 209, 88, 0.14);
  --green-line: rgba(48, 209, 88, 0.28);
  /* 白色勾图标填充：3.63:1 / 5.70:1，满足图形 3:1 */
  --green-fill-top: #1faa55;
  --green-fill-bottom: #157f3f;

  --amber-bright: #ff9f0a;
  --amber-ink: #9a5b00;
  --amber-soft: rgba(255, 159, 10, 0.16);
  --amber-line: rgba(255, 159, 10, 0.32);

  --red-ink: #b3000f;
  --red-soft: rgba(255, 59, 48, 0.13);
  --red-line: rgba(255, 59, 48, 0.3);

  /* 中性徽标填充（广告披露标签）：白字 5.92:1。
     琥珀色留给真正的告警语义，不拿来做「广告」标签。 */
  --label-fill: #6a6a70;

  /* 动效：Apple 弹性曲线 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);

  /* 布局 */
  --topbar-height: 56px;
  --gutter: 20px;
  --thread-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000;
    --canvas-veil: rgba(0, 0, 0, 0.4);

    --ink: #f5f5f7;
    --ink-soft: #b0b0b8;
    --ink-faint: #9a9aa2;

    /* 深色玻璃要真的暗。原来 brightness(118%) 把 glass-strong 抬到 #3f4553，
       比 iOS 的 secondarySystemBackground 还亮，结果任何灰字压上去都不到 4.5:1。
       层级靠边缘高光和描边区分，不靠整体提亮。 */
    --glass: rgba(112, 120, 140, 0.17);
    --glass-strong: rgba(120, 128, 148, 0.23);
    --glass-thin: rgba(112, 120, 140, 0.11);
    --glass-sunken: rgba(0, 0, 0, 0.3);

    --blur: saturate(180%) brightness(104%) blur(30px);
    --blur-thick: saturate(190%) brightness(107%) blur(44px);
    --blur-thin: saturate(160%) brightness(102%) blur(16px);

    --edge-dark: rgba(0, 0, 0, 0.55);
    --edge-line: rgba(255, 255, 255, 0.14);
    --specular: rgba(255, 255, 255, 0.42);
    --lens: linear-gradient(
      142deg,
      rgba(255, 255, 255, 0.5) 0%,
      rgba(255, 255, 255, 0.12) 24%,
      rgba(255, 255, 255, 0) 50%,
      rgba(0, 0, 0, 0.28) 80%,
      rgba(0, 0, 0, 0.42) 100%
    );

    --surface-muted: rgba(255, 255, 255, 0.06);
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 4px 12px -4px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.55), 0 14px 32px -10px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.6), 0 28px 64px -16px rgba(0, 0, 0, 0.8);
    --shadow-xl: 0 10px 24px rgba(0, 0, 0, 0.65), 0 44px 88px -20px rgba(0, 0, 0, 0.85);

    --accent: #0a84ff;
    --accent-ink: #79bdff;
    --accent-tint: rgba(10, 132, 255, 0.24);
    --accent-tint-strong: rgba(10, 132, 255, 0.34);
    --accent-ring: rgba(10, 132, 255, 0.55);

    /* 深色下填充色不能跟着变亮：白字压上去要的还是 4.5:1。
       accent 保持 systemBlue 作为「文字/图标用蓝」，填充另走一套。 */
    --accent-fill-top: #0a6fd8;
    --accent-fill-mid: #0a62c4;
    --accent-fill-bottom: #0a56ab;

    --green-ink: #5fe07f;
    --green-soft: rgba(48, 209, 88, 0.2);
    --amber-ink: #ffc266;
    --amber-soft: rgba(255, 159, 10, 0.22);
    --red-ink: #ff8078;
    --red-soft: rgba(255, 59, 48, 0.22);
  }
}

/* --------------------------------------------------------------------------
   2. 基础重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  /* 视口锁定：外壳自己占满一屏，滚动交给内部的对话区 —— 页面整体不滚动 */
  height: var(--visual-viewport-height, 100dvh);
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: var(--track-tight);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* 环境光 —— 玻璃需要有内容可折射，但 Apple 的系统背景是中性的：
   一层自上而下的亮度过渡 + 极低饱和度的冷色调，不用彩虹渐变。 */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 44%),
    radial-gradient(58% 44% at 16% 0%, rgba(0, 113, 227, 0.07), transparent 72%),
    radial-gradient(54% 40% at 88% 8%, rgba(100, 210, 255, 0.05), transparent 74%),
    radial-gradient(64% 52% at 64% 100%, rgba(118, 130, 148, 0.06), transparent 72%);
}

@media (prefers-color-scheme: dark) {
  body::before {
    background:
      linear-gradient(180deg, rgba(120, 140, 170, 0.1), transparent 46%),
      radial-gradient(58% 44% at 16% 0%, rgba(10, 132, 255, 0.16), transparent 72%),
      radial-gradient(54% 40% at 88% 8%, rgba(64, 156, 255, 0.1), transparent 74%),
      radial-gradient(64% 52% at 64% 100%, rgba(94, 106, 126, 0.12), transparent 72%);
  }
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 620;
  letter-spacing: var(--track-tighter);
  line-height: 1.25;
}

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

button {
  cursor: pointer;
  border: 0;
  background: none;
}

button:disabled {
  cursor: not-allowed;
}

/* 图标精灵容器 —— 只存放 <symbol> 定义，本身不该占据任何布局空间。
   没有 width/height 属性的 <svg> 会退回替换元素默认尺寸 300×150，
   所以必须显式归零。用 absolute + 0 尺寸而不是 display:none：
   部分引擎在 display:none 的子树里解析不到 <use> 引用的渐变与滤镜。 */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* 矢量图标 —— 统一描边粗细与端点，模仿 SF Symbols 的光学一致性。
   尺寸只用 --icon-size 一个变量控制，避免各处 font-size 漂移。 */
.icon {
  --icon-size: 20px;
  width: var(--icon-size);
  height: var(--icon-size);
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* 图标随文字基线对齐，且不参与指针命中（父按钮才是命中区） */
  pointer-events: none;
}

.icon-sm {
  --icon-size: 16px;
  stroke-width: 1.9;
}

.icon-lg {
  --icon-size: 24px;
  stroke-width: 1.6;
}

/* 填充型图标（实心圆底上的对勾）需要更粗的描边才压得住渐变背景 */
.icon-bold {
  stroke-width: 2.4;
}

a {
  color: var(--accent-ink);
}

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

:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection {
  background: var(--accent-tint-strong);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -180%);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  color: var(--ink);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--edge-line);
  font-size: 13px;
  font-weight: 590;
  text-decoration: none;
  transition: transform 0.28s var(--ease-out);
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   3. Liquid Glass 材质工具
   -------------------------------------------------------------------------- */
/* 折射描边：用渐变边框模拟透镜边缘的亮/暗过渡 */
.topbar::after,
.side-panel::after,
.history-panel::after,
.consultation::after,
.composer::after,
.result-panel::after,
.sponsor-slot::after,
.toast::after,
.welcome-state::after,
.message-content::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 1px;
  background: var(--lens);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. 外壳
   -------------------------------------------------------------------------- */
.app-shell {
  display: flex;
  flex-direction: column;
  /* height 而不是 min-height：外壳必须有确定高度，
     否则下游的 flex/grid 轨道拿不到可溢出的基准，滚动会冒泡成整页滚动。 */
  height: var(--visual-viewport-height, 100dvh);
  gap: 12px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   5. 顶栏 —— 悬浮玻璃条
   -------------------------------------------------------------------------- */
.topbar {
  /* relative 而不是 sticky：.app-shell 是 height:100dvh + overflow:hidden，
     永不滚动，sticky 拿不到滚动端口却仍会按 top 偏移把顶栏下推，
     正好吃掉 shell 的 12px gap，让顶栏底边贴上工作区。 */
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: var(--topbar-height);
  padding: 8px 10px 8px 12px;
  border-radius: var(--r-lg);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-thick);
  backdrop-filter: var(--blur-thick);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--edge-line),
    inset 0 -1px 0 0 var(--edge-dark),
    var(--shadow-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(
    160deg,
    var(--accent-fill-top),
    var(--accent-fill-mid) 55%,
    var(--accent-fill-bottom)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2),
    0 3px 8px -2px rgba(0, 90, 200, 0.5);
  font-size: 16px;
  font-weight: 650;
}

/* 必须用 .brand-text 而不是 .brand > span：徽标本身也是 .brand 的直接子 span，
   0,1,1 的特异性会盖掉 .brand-mark(0,1,0) 的 display:grid，
   把「知」压成列向 flex —— place-items 只剩横向生效，字被顶到方块顶部。 */
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1.15;
}

.brand strong {
  font-size: 16px;
  font-weight: 620;
  letter-spacing: var(--track-tighter);
  white-space: nowrap;
}

.brand small {
  color: var(--ink-faint);
  font-size: 11.5px;
  letter-spacing: 0;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  background: var(--glass-thin);
  -webkit-backdrop-filter: var(--blur-thin);
  backdrop-filter: var(--blur-thin);
  box-shadow:
    inset 0 0 0 1px var(--edge-line),
    inset 0 1px 0 0 var(--specular);
  font-size: 12.5px;
  font-weight: 530;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  box-shadow: 0 0 0 3px rgba(138, 138, 145, 0.18);
}

.connection-status[data-state="online"] {
  color: var(--green-ink);
}

.connection-status[data-state="online"] .status-dot {
  background: var(--green-bright);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.connection-status[data-state="demo"] {
  color: var(--amber-ink);
}

.connection-status[data-state="demo"] .status-dot {
  background: var(--amber-bright);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.connection-status[data-state="checking"] .status-dot {
  animation: pulse 1.6s var(--ease) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* --------------------------------------------------------------------------
   6. 工作区栅格
   -------------------------------------------------------------------------- */
.workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  /* minmax(0, 1fr) 而不是默认的 auto：auto 轨道会被 max-content 顶高，
     stretch 只分配剩余空间、不会压缩超长内容。锁死轨道，各栏才会内部滚动。 */
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  /* stretch，不是 start：三栏共享同一基线高度，消除长短不齐留下的空洞。
     内容超出时各栏内部滚动，而不是把外壳撑高。 */
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

/* --------------------------------------------------------------------------
   8. 侧栏
   -------------------------------------------------------------------------- */
.side-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  padding: 18px 16px;
  border-radius: var(--r-lg);
  /* 滚动发生在内部（.panel-body / .species-grid），外壳保持裁切，
     折射描边 ::after 才不会随内容滚走。 */
  overflow: hidden;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--edge-line),
    inset 0 -1px 0 0 var(--edge-dark),
    var(--shadow-md);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.step-label {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 620;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}

.panel-heading h1,
.panel-heading h2 {
  font-size: 19px;
}

/* 侧栏内部滚动区：标题固定，内容自己滚。
   gap 从 .side-panel 移进来，包一层不改变原有的 16px 节奏。 */
.panel-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* --------------------------------------------------------------------------
   9. 物种选择
   -------------------------------------------------------------------------- */
.species-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  /* 侧栏已裁切，矮视口下卡片列表自己滚动，不再顶破外壳。
     不 grow：内容照旧靠上排列，进度条不会被推到栏底。 */
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.species-grid::-webkit-scrollbar {
  display: none;
}

.species-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  min-width: 0;
  text-align: left;
  transition:
    background 0.2s var(--ease),
    transform 0.16s var(--ease-spring);
}

.species-card:hover {
  background: var(--surface-muted);
}

.species-card:active {
  transform: scale(0.98);
}

.species-card > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.species-card strong {
  font-size: 14.5px;
  font-weight: 560;
  white-space: nowrap;
}

.species-card small {
  color: var(--ink-faint);
  font-size: 11.5px;
  letter-spacing: 0;
  white-space: nowrap;
}

.species-card[aria-checked="true"] {
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--accent-tint-strong);
}

.species-card[aria-checked="true"] strong {
  color: var(--accent-ink);
  font-weight: 620;
}

.species-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 0 0 1px rgba(0, 0, 0, 0.05),
    var(--shadow-xs);
}

.species-avatar .icon {
  --icon-size: 19px;
}

.species-dog {
  color: #0057b0;
  background: linear-gradient(160deg, rgba(10, 132, 255, 0.3), rgba(10, 132, 255, 0.14));
}

.species-cat {
  color: #5b5b62;
  background: linear-gradient(160deg, rgba(142, 142, 147, 0.32), rgba(142, 142, 147, 0.14));
}

.species-parrot {
  color: #146e3b;
  background: linear-gradient(160deg, rgba(48, 209, 88, 0.32), rgba(48, 209, 88, 0.14));
}

.species-pig {
  color: #b8256b;
  background: linear-gradient(160deg, rgba(255, 55, 95, 0.28), rgba(255, 55, 95, 0.12));
}

.species-chicken {
  color: #955700;
  background: linear-gradient(160deg, rgba(255, 159, 10, 0.34), rgba(255, 159, 10, 0.14));
}

@media (prefers-color-scheme: dark) {
  .species-cat {
    color: #c7c7cf;
  }
  .species-pig {
    color: #ff8fb0;
  }
  .species-dog {
    color: #6cb6ff;
  }
  .species-parrot {
    color: #5fe07f;
  }
  .species-chicken {
    color: #ffc266;
  }

}

/* --------------------------------------------------------------------------
   10. 进度
   -------------------------------------------------------------------------- */
.session-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: var(--hairline);
}

.progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.progress-copy span {
  color: var(--ink-faint);
}

.progress-copy strong {
  font-size: 12.5px;
  font-weight: 590;
}

.progress-track {
  position: relative;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--glass-sunken);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-fill-top), var(--accent-fill-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: width 0.5s var(--ease-out);
}

/* --------------------------------------------------------------------------
   11. 按钮
   -------------------------------------------------------------------------- */
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  color: var(--on-accent);
  background: linear-gradient(
    170deg,
    var(--accent-fill-top),
    var(--accent-fill-mid) 60%,
    var(--accent-fill-bottom)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.16),
    0 4px 12px -4px var(--accent-ring);
  font-size: 14px;
  font-weight: 590;
  transition:
    filter 0.2s var(--ease),
    transform 0.16s var(--ease-spring);
}

.primary-button:hover:not(:disabled) {
  filter: brightness(1.08);
}

.primary-button:active:not(:disabled) {
  transform: scale(0.97);
  filter: brightness(0.95);
}

.primary-button:disabled {
  /* 0.4 太淡，「发送」几乎读不出来。禁用态虽不受 WCAG 对比度约束，
     但它是输入框为空时的默认状态，用户看到的频率最高，要保持可辨识。 */
  opacity: 0.5;
  box-shadow: none;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  color: var(--ink);
  background: var(--glass-thin);
  -webkit-backdrop-filter: var(--blur-thin);
  backdrop-filter: var(--blur-thin);
  box-shadow:
    inset 0 0 0 1px var(--edge-line),
    inset 0 1px 0 0 var(--specular),
    var(--shadow-xs);
  font-size: 14px;
  font-weight: 550;
  transition:
    background 0.2s var(--ease),
    transform 0.16s var(--ease-spring);
}

.secondary-button:hover:not(:disabled) {
  background: var(--glass-strong);
}

.secondary-button:active:not(:disabled) {
  transform: scale(0.97);
}

.secondary-button:disabled {
  opacity: 0.45;
  box-shadow: none;
}

.text-button {
  align-self: flex-start;
  padding: 6px 2px;
  color: var(--accent-ink);
  font-size: 13.5px;
  font-weight: 550;
  border-radius: var(--r-xs);
  transition: opacity 0.2s var(--ease);
}

.text-button:hover {
  opacity: 0.65;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--glass-thin);
  -webkit-backdrop-filter: var(--blur-thin);
  backdrop-filter: var(--blur-thin);
  box-shadow:
    inset 0 0 0 1px var(--edge-line),
    inset 0 1px 0 0 var(--specular);
  transition:
    background 0.2s var(--ease),
    transform 0.16s var(--ease-spring);
}

/* 34px 视觉尺寸不满足 44pt 触达标准，用伪元素外扩命中区而不影响布局 */
.icon-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

.icon-button {
  position: relative;
}

.icon-button:hover:not(:disabled) {
  background: var(--glass-strong);
  color: var(--ink);
}

.icon-button:active:not(:disabled) {
  transform: scale(0.94);
}

.icon-button:disabled {
  opacity: 0.45;
}

/* --------------------------------------------------------------------------
   12. 问诊主区
   -------------------------------------------------------------------------- */
.consultation {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  /* 高度由栅格轨道决定：留着 520px 下限会在矮视口上重新把外壳顶破 */
  min-height: 0;
  border-radius: var(--r-xl);
  background: var(--glass-thin);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--edge-line),
    inset 0 -1px 0 0 var(--edge-dark),
    var(--shadow-lg);
  overflow: hidden;
}

.consultation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px 14px;
  border-bottom: var(--hairline);
  min-width: 0;
  /* 标题与输入区固定，中间对话区独占剩余高度并滚动 */
  flex: 0 0 auto;
}

.consultation-header > div {
  min-width: 0;
}

.consultation-header h2 {
  font-size: 21px;
  overflow-wrap: anywhere;
}

.turn-counter {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  background: var(--glass-thin);
  box-shadow: inset 0 0 0 1px var(--edge-line);
  font-size: 12px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.conversation {
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* 唯一的纵向滚动区。min-height: 0 是关键：
     flex 项默认最小尺寸是 min-content，不清零就压不下去，滚动会外溢成整页滚动。 */
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 22px;
  min-width: 0;
  overflow-y: auto;
  /* 滚到边界后不把滚动链传给外层 */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

/* --------------------------------------------------------------------------
   13. 欢迎态
   -------------------------------------------------------------------------- */
.welcome-state {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: auto;
  max-width: 440px;
  padding: 32px 26px;
  border-radius: var(--r-lg);
  background: var(--glass-thin);
  -webkit-backdrop-filter: var(--blur-thin);
  backdrop-filter: var(--blur-thin);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--edge-line);
  text-align: center;
}

.welcome-symbol {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-tint);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px var(--accent-tint-strong);
}

.welcome-symbol .icon {
  width: 25px;
  height: 25px;
  stroke-width: 1.6;
}

.welcome-state h3 {
  font-size: 18px;
}

.welcome-state p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   14. 消息气泡 —— iMessage 风格
   -------------------------------------------------------------------------- */
.message {
  display: flex;
  gap: 10px;
  max-width: var(--thread-width);
  min-width: 0;
  /* 入场动画：不用 both —— 动画结束就回到静态样式，
     避免每条历史气泡都长期挂着 transform 合成层。 */
  animation: message-in 0.42s var(--ease-out);
}

.assistant-message {
  align-self: flex-start;
  margin-right: auto;
  transform-origin: left bottom;
}

.user-message {
  align-self: flex-end;
  margin-left: auto;
  flex-direction: row-reverse;
  transform-origin: right bottom;
}

/* 从对应侧轻微浮起 + 收缩回正，模仿 iMessage 的气泡落位 */
@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.972);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-top: 20px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(160deg, var(--accent-fill-top), var(--accent-fill-bottom));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    var(--shadow-xs);
  font-size: 12.5px;
  font-weight: 620;
}

.message-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 0 4px;
  color: var(--ink-faint);
  font-size: 11px;
}

.message-meta strong {
  color: var(--ink-soft);
  font-weight: 560;
}

.user-message .message-meta {
  flex-direction: row-reverse;
}

/* 气泡不做 backdrop-filter：它嵌在已经模糊过的 .consultation 里，
   而且自身是 82% 不透明的白 —— 再模糊一次几乎看不出差别，却让每条消息
   都多一个合成层，长对话滚动时直接掉帧。形状和材质交给描边 + 阴影。 */
.message-content {
  position: relative;
  padding: 11px 15px;
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--edge-line),
    inset 0 -1px 0 0 var(--edge-dark),
    var(--shadow-sm);
  min-width: 0;
}

.message-content p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.message-content p + p {
  margin-top: 8px;
}

.user-message .message-content {
  color: #fff;
  background: linear-gradient(
    170deg,
    var(--accent-fill-top),
    var(--accent-fill-mid) 70%,
    var(--accent-fill-bottom)
  );
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.14),
    0 4px 14px -6px var(--accent-ring);
}

.user-message .message-content::after {
  display: none;
}

/* 结果卡自带材质，去掉外层气泡的重复描边（避免双层卡） */
.message-content:has(> .result-panel) {
  padding: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  border-radius: var(--r-lg);
}

.message-content:has(> .result-panel)::after {
  display: none;
}

.assistant-message:has(.result-panel) {
  max-width: 100%;
  width: 100%;
}

.message-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.message-images img {
  aspect-ratio: 1;
  width: 100%;
  border-radius: var(--r-sm);
  object-fit: cover;
  box-shadow: inset 0 0 0 1px var(--edge-dark);
}

/* 输入中指示器 */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 2px;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  /* 用 --ink-soft 而非 --ink-faint：等待态是此刻唯一的动静，
     圆点要能被看见，不能弱到像占位符。 */
  background: var(--ink-soft);
  animation: typing 1.2s var(--ease) infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.3s;
}

/* 抬升 + 轻微放大，读起来是「呼吸」而不只是闪烁 */
@keyframes typing {
  0%,
  62%,
  100% {
    opacity: 0.32;
    transform: translateY(0) scale(1);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px) scale(1.08);
  }
}

/* --------------------------------------------------------------------------
   15. 选项
   -------------------------------------------------------------------------- */
.choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 7px;
  margin-top: 12px;
  min-width: 0;
}

.choice-button {
  /* flex + min-height：保证 44px 触控高度，文字换行时也不塌陷 */
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  color: var(--ink);
  /* 嵌套在玻璃气泡内的控件：用近白实心材质抬起来，像 iOS 分组列表里的
     可点条目，而不是叠一层灰导致发闷。形状交给 hairline 描边。 */
  background: var(--glass-strong);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--line-strong),
    var(--shadow-xs);
  font-size: 13.5px;
  font-weight: 530;
  text-align: left;
  transition:
    background 0.2s var(--ease),
    transform 0.16s var(--ease-spring);
}

.choice-button:hover {
  background: var(--accent-tint);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--accent-tint-strong);
}

.choice-button:active {
  transform: scale(0.97);
}

.choice-utilities {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 11px;
  border-top: var(--hairline);
}

.utility-choice {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 12.5px;
  font-weight: 530;
  transition:
    background 0.2s var(--ease),
    transform 0.16s var(--ease-spring);
}

.utility-choice:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.utility-choice:active {
  transform: scale(0.96);
}

.choice-list[data-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   16. 输入区 —— 悬浮玻璃合成器
   -------------------------------------------------------------------------- */
.response-area {
  padding: 0 22px 20px;
  min-width: 0;
  /* 不参与压缩：输入框长高（或转写面板展开）时挤压对话区，而不是顶破外壳 */
  flex: 0 0 auto;
}

.composer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-lg);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-thick);
  backdrop-filter: var(--blur-thick);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--edge-line),
    inset 0 -1px 0 0 var(--edge-dark),
    var(--shadow-md);
}

.composer textarea {
  width: 100%;
  min-height: 46px;
  max-height: 126px; /* 与 app.js 中的高度上限保持一致 */
  padding: 8px 6px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  font-size: 15px;
  line-height: 1.55;
  resize: none;
  overflow-y: auto;
}

/* 拖拽落区反馈：只在拖着图片经过时出现，用强调色描边而不是换背景，
   避免输入中的文字被忽然变化的底色干扰。 */
.composer[data-dragging="true"] {
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 2px var(--accent),
    var(--shadow-lg);
}

.composer[data-dragging="true"]::before {
  content: "松手即可添加图片";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-size: 13.5px;
  font-weight: 590;
  pointer-events: none;
}

.composer textarea::placeholder {
  color: var(--ink-faint);
}

.composer textarea:focus {
  outline: none;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  background: var(--glass-thin);
  box-shadow: inset 0 0 0 1px var(--edge-line);
  font-size: 12.5px;
  font-weight: 530;
  white-space: nowrap;
  transition:
    background 0.2s var(--ease),
    transform 0.16s var(--ease-spring);
}

.tool-button:hover:not(:disabled) {
  color: var(--ink);
  background: var(--glass-strong);
}

.tool-button:active:not(:disabled) {
  transform: scale(0.96);
}

.tool-button:disabled {
  opacity: 0.4;
}

.tool-button[data-recording="true"] {
  color: var(--red-ink);
  background: var(--red-soft);
  box-shadow: inset 0 0 0 1px var(--red-line);
}

/* 录音中：麦克风图标自身承载状态（颜色由 currentColor 继承） */
.tool-button[data-recording="true"] .record-indicator {
  animation: pulse 1s var(--ease) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .tool-button[data-recording="true"] .record-indicator {
    animation: none;
    opacity: 0.75;
  }
}

/* 附件 */
.attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.attachment-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border-radius: var(--r-sm);
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px var(--edge-line);
  font-size: 11.5px;
  color: var(--ink-soft);
  max-width: 100%;
  min-width: 0;
}

.attachment-item img {
  width: 34px;
  height: 34px;
  border-radius: var(--r-xs);
  object-fit: cover;
}

.attachment-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.attachment-item button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--glass-strong);
  box-shadow: inset 0 0 0 1px var(--edge-line);
  line-height: 1;
}

.attachment-item button .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.attachment-item button:hover {
  color: var(--red-ink);
  background: var(--red-soft);
}

/* --------------------------------------------------------------------------
   17. 摘要侧栏
   -------------------------------------------------------------------------- */
.summary-heading {
  align-items: flex-start;
}

/* 空病历：还没选物种时侧栏不该是一片空白，但也不该假装有内容 */
.record-idle {
  display: grid;
  place-items: center;
  padding: 28px 16px;
  border-radius: var(--r-md);
  background: var(--glass-thin);
  box-shadow: inset 0 0 0 1px var(--edge-line);
}

.record-idle p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12.5px;
  text-align: center;
}

/* 病历头：状态 + 病历号。病历号用等宽体，方便口头和纸面引用。 */
.record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.record-case-no {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: var(--track-wide);
}

.record-status {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px var(--edge-line);
  font-size: 11.5px;
  font-weight: 590;
  white-space: nowrap;
}

.record-status[data-status="completed"] {
  color: var(--green-ink);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px var(--green-line);
}

/* SOAP 各段。分段靠标题和留白，不靠盒子套盒子。 */
.record-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.record-section > h3 {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: var(--track-wide);
  text-transform: none;
}

/* 嵌套段（鉴别诊断挂在「评估」里）缩一级，标题降一档 */
.record-section .record-section {
  gap: 6px;
  margin-top: 2px;
}

.record-section .record-section > h3 {
  font-size: 10.5px;
}

.record-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.record-hint,
.record-pending {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12.5px;
  line-height: 1.45;
}

.record-pending {
  font-style: italic;
}

/* iOS 设置风格的标签/值两列：共享对齐轴，值左对齐。
   用 space-between + 右对齐的话，值一换行就参差不齐。 */
.record-fields {
  display: flex;
  flex-direction: column;
  margin: 0;
  border-radius: var(--r-md);
  background: var(--glass-thin);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--edge-line);
  overflow: hidden;
}

.record-fields > div {
  display: grid;
  grid-template-columns: minmax(0, 4.75rem) minmax(0, 1fr);
  align-items: baseline;
  gap: 6px 12px;
  padding: 9px 13px;
  min-width: 0;
}

.record-fields > div + div {
  box-shadow: inset 0 1px 0 0 var(--line);
}

.record-fields dt {
  color: var(--ink-faint);
  font-size: 12.5px;
}

.record-fields dd {
  margin: 0;
  font-size: 13px;
  font-weight: 530;
  text-align: left;
  overflow-wrap: anywhere;
  min-width: 0;
}

/* 「未采集」压成弱化态：读者要一眼看出哪些字段还是空的 */
.record-fields dd[data-empty="true"] {
  color: var(--ink-faint);
  font-weight: 400;
}

/* 病史摘要：临床字段作小字标签，病史事实是主体 */
.record-findings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.record-finding-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-inline-start: 10px;
  border-inline-start: 2px solid var(--line-strong);
  min-width: 0;
}

.record-finding-row dt {
  color: var(--ink-faint);
  font-size: 11.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.record-finding-row dd {
  margin: 0;
  font-size: 12.5px;
  font-weight: 530;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.record-img-count {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  color: var(--accent-ink);
  background: var(--accent-tint);
  font-size: 10.5px;
  font-weight: 590;
  white-space: nowrap;
}

.record-img-total {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11.5px;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-inline-start: 1.15rem;
}

.record-list li {
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.record-list li::marker {
  color: var(--ink-faint);
  font-size: 11.5px;
}

/* 紧急度：语义色的唯一用处。unknown 保持中性，不拿颜色暗示确定性。 */
.record-urgency {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px var(--edge-line);
  font-size: 11.5px;
  font-weight: 590;
  white-space: nowrap;
}

.record-urgency[data-urgency="urgent"] {
  color: var(--red-ink);
  background: var(--red-soft);
  box-shadow: inset 0 0 0 1px var(--red-line);
}

.record-urgency[data-urgency="soon"] {
  color: var(--amber-ink);
  background: var(--amber-soft);
  box-shadow: inset 0 0 0 1px var(--amber-line);
}

.record-urgency[data-urgency="routine"] {
  color: var(--green-ink);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px var(--green-line);
}

.record-assess-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: var(--track-tight);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.record-disclaimer {
  margin: 0;
  padding-top: 12px;
  border-top: var(--hairline);
  color: var(--ink-faint);
  font-size: 11.5px;
  line-height: 1.45;
}

/* 赞助位 —— 必须与医疗结论视觉分离并明确标注 */
.sponsor-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  border-radius: var(--r-md);
  /* 中性材质避免把广告误读为风险状态。与临床结论的分离靠
     独立容器、描边和顶部标签达成，不靠染色。 */
  background: var(--surface-muted);
  -webkit-backdrop-filter: var(--blur-thin);
  backdrop-filter: var(--blur-thin);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--line-strong);
}

.sponsor-label {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  color: #fff;
  /* 中性灰而非琥珀：白字压在 #ff9f0a 上只有 2.06:1，而这条是规格要求必须
     清楚可辨的广告披露标签，不能糊；同时把琥珀色留给真正的告警语义。 */
  background: var(--label-fill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-size: 10.5px;
  font-weight: 620;
  letter-spacing: var(--track-wide);
}

.sponsor-slot h3 {
  font-size: 14.5px;
}

.sponsor-slot p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.sponsor-slot a {
  align-self: flex-start;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
}

.sponsor-slot a:hover {
  text-decoration: underline;
}

/* 规格要求的披露声明：不放在最弱的一档墨色里。
   --ink-faint 留给时间戳、副标题这类无关紧要的信息。 */
.sponsor-slot small {
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   19. 结果卡
   -------------------------------------------------------------------------- */
.result-panel {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--edge-line),
    inset 0 -1px 0 0 var(--edge-dark),
    var(--shadow-md);
  overflow: hidden;
}

.result-header {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px 18px;
  background: var(--green-soft);
  box-shadow: inset 0 -1px 0 0 var(--green-line);
}

.result-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(160deg, var(--green-fill-top), var(--green-fill-bottom));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    var(--shadow-xs);
}

.result-icon .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.result-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 620;
}

.result-header p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
}

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

.result-section {
  padding: 15px 18px;
  min-width: 0;
  box-shadow: inset 0 -1px 0 0 var(--line);
}

.result-section:nth-child(odd) {
  box-shadow:
    inset 0 -1px 0 0 var(--line),
    inset -1px 0 0 0 var(--line);
}

/* 奇数个分区时最后一块横跨整行，避免留出带分隔线的空格 */
.result-section:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  box-shadow: inset 0 -1px 0 0 var(--line);
}

.result-section h4 {
  margin: 0 0 8px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}

.result-section p,
.result-section ul {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.result-section ul {
  padding-left: 17px;
}

.result-section li {
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.result-section li::marker {
  color: var(--ink-faint);
}

/* 「不构成诊断或处方」属于规格要求的限制声明，同理提到 --ink-soft。 */
.result-disclaimer {
  padding: 12px 18px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-size: 11px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   21. 抽屉 / 遮罩 / 吐司
   -------------------------------------------------------------------------- */
.history-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(420px, 92vw);
  max-width: 100vw;
  min-height: 0;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  overflow: hidden;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur-thick);
  backdrop-filter: var(--blur-thick);
  box-shadow: var(--shadow-xl), inset 0 0 0 1px var(--edge-line);
  visibility: hidden;
  transform: translateX(101%);
  pointer-events: none;
  transition:
    transform 0.36s var(--ease-out),
    visibility 0s linear 0.36s;
}

.history-panel[data-open="true"] {
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.history-heading {
  flex: 0 0 auto;
  align-items: flex-start;
}

.history-heading h2 {
  font-size: 19px;
}

.history-list-view,
.history-detail {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 0 4px 8px;
  border-bottom: var(--hairline);
  color: var(--ink-faint);
  font-size: 12px;
}

.history-toolbar .text-button {
  padding: 5px 2px;
  color: var(--red-ink);
  font-size: 12.5px;
}

.history-list,
.history-transcript {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.history-record {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 66px;
  padding: 10px 6px;
  border-radius: var(--r-xs);
  box-shadow: inset 0 -1px 0 0 var(--line);
  text-align: left;
  transition: background 0.18s var(--ease);
}

.history-record:hover {
  background: var(--surface-muted);
}

.history-record > .icon {
  color: var(--ink-faint);
  transform: rotate(180deg);
}

.history-species {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px var(--edge-line);
  font-size: 13px;
  font-weight: 620;
}

.history-species-dog { color: #0057b0; background: rgba(10, 132, 255, 0.16); }
.history-species-cat { color: #5b5b62; background: rgba(142, 142, 147, 0.17); }
.history-species-parrot { color: #146e3b; background: rgba(48, 209, 88, 0.16); }
.history-species-pig { color: #b8256b; background: rgba(255, 55, 95, 0.14); }
.history-species-chicken { color: #955700; background: rgba(255, 159, 10, 0.17); }

@media (prefers-color-scheme: dark) {
  .history-species-dog { color: #6cb6ff; }
  .history-species-cat { color: #c7c7cf; }
  .history-species-parrot { color: #5fe07f; }
  .history-species-pig { color: #ff8fb0; }
  .history-species-chicken { color: #ffc266; }
}

.history-record-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.history-record-content strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 590;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-record-content span {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 11.5px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  color: var(--ink-faint);
  font-size: 13px;
}

.history-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: var(--hairline);
}

.history-detail-header > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.history-detail-header strong,
.history-detail-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-detail-header strong {
  font-size: 14px;
}

.history-detail-header span {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.history-transcript {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 2px 4px;
}

.history-message {
  align-self: flex-start;
  max-width: 92%;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px var(--edge-line);
}

.history-message[data-role="user"] {
  align-self: flex-end;
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--accent-tint-strong);
}

.history-message strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 590;
}

.history-message p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 300;
  transform: translateX(-50%);
  max-width: min(440px, calc(100vw - 40px));
  padding: 12px 20px;
  border-radius: var(--r-pill);
  color: var(--ink);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur-thick);
  backdrop-filter: var(--blur-thick);
  box-shadow:
    inset 0 1px 0 0 var(--specular),
    inset 0 0 0 1px var(--edge-line),
    var(--shadow-xl);
  font-size: 13.5px;
  font-weight: 530;
  text-align: center;
  animation: toast-in 0.34s var(--ease-out);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.mobile-only {
  display: none;
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   22. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  :root {
    --gutter: 16px;
  }

  .workspace {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .summary-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    width: min(360px, 88vw);
    max-width: 100vw;
    border-radius: var(--r-xl) 0 0 var(--r-xl);
    background: var(--glass-strong);
    -webkit-backdrop-filter: var(--blur-thick);
    backdrop-filter: var(--blur-thick);
    box-shadow: var(--shadow-xl), inset 0 0 0 1px var(--edge-line);
    padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
    /* 滚动仍在 .panel-body 内部：抽屉自己裁切，折射描边不随内容滚走 */
    overflow: hidden;
    transform: translateX(101%);
    pointer-events: none;
    transition: transform 0.36s var(--ease-out);
  }

  .summary-panel[data-open="true"] {
    transform: translateX(0);
    pointer-events: auto;
  }

  .mobile-only {
    display: grid;
  }

  .case-species-button {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --gutter: 12px;
    --topbar-height: 50px;
  }

  .app-shell {
    gap: 10px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  }

  .topbar {
    border-radius: var(--r-md);
  }

  .brand small {
    display: none;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  /* 手机端把物种选择作为一次性决策面板，关闭后不再占据主工作区高度。 */
  .species-panel {
    position: fixed;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    z-index: 100;
    gap: 16px;
    max-height: min(560px, calc(var(--visual-viewport-height, 100dvh) - 20px));
    padding: 16px;
    border-radius: var(--r-lg);
    background: var(--glass-strong);
    -webkit-backdrop-filter: var(--blur-thick);
    backdrop-filter: var(--blur-thick);
    box-shadow: var(--shadow-xl), inset 0 0 0 1px var(--edge-line);
    visibility: hidden;
    transform: translateY(calc(100% + 32px));
    pointer-events: none;
    transition:
      transform 0.34s var(--ease-out),
      visibility 0s linear 0.34s;
  }

  .species-panel[data-open="true"] {
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
  }

  .species-panel .panel-heading h1 {
    font-size: 17px;
  }

  .species-panel .panel-heading {
    align-items: center;
  }

  .species-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .species-grid::-webkit-scrollbar {
    display: none;
  }

  .species-card {
    flex-direction: column;
    gap: 7px;
    width: auto;
    min-height: 88px;
    padding: 10px 8px;
    text-align: center;
  }

  .species-card > span:last-child {
    align-items: center;
  }

  .species-panel .session-progress,
  .species-panel #restart-button {
    display: none;
  }

  .case-species-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 128px;
    min-height: 26px;
    margin-bottom: 4px;
    padding: 3px 9px;
    border-radius: var(--r-pill);
    color: var(--accent-ink);
    background: var(--accent-tint);
    box-shadow: inset 0 0 0 1px var(--accent-tint-strong);
    font-size: 11.5px;
    font-weight: 590;
  }

  .case-species-button span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .case-species-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--accent);
  }

  .consultation-header .step-label {
    display: none;
  }

  .consultation {
    min-height: 0;
    border-radius: var(--r-lg);
  }

  .consultation-header {
    padding: 14px 16px 12px;
  }

  .consultation-header h2 {
    font-size: 18px;
  }

  .conversation {
    gap: 15px;
    padding: 16px;
  }

  .response-area {
    padding: 0 16px 16px;
  }

  /* 预设选项已能完成当前回答，先把有限的手机高度留给问题本身。
     点击“其他”后 JS 会切回 text 模式并重新展开输入器。 */
  .response-area[data-mode="choice"] {
    display: none;
  }

  .message {
    max-width: 100%;
  }

  .choice-list {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 单列时去掉竖向分隔线 */
  .result-sections {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-section,
  .result-section:nth-child(odd),
  .result-section:last-child:nth-child(odd) {
    grid-column: auto;
    box-shadow: inset 0 -1px 0 0 var(--line);
  }

  /* 软键盘会拿走接近半屏高度。输入态只保留当前问题、对话上下文和输入器，
     其余固定信息退出布局，避免把唯一可滚动的对话区压成一条缝。 */
  html[data-keyboard="open"] .app-shell {
    gap: 0;
    padding: env(safe-area-inset-top) 0 0;
  }

  html[data-keyboard="open"] .topbar,
  html[data-keyboard="open"] .species-panel {
    display: none;
  }

  html[data-keyboard="open"] .workspace {
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }

  html[data-keyboard="open"] .consultation {
    border-radius: 0;
  }

  html[data-keyboard="open"] .consultation-header {
    align-items: center;
    min-height: 48px;
    padding: 7px 12px;
  }

  html[data-keyboard="open"] .consultation-header .step-label {
    display: none;
  }

  html[data-keyboard="open"] .consultation-header h2 {
    overflow: hidden;
    font-size: 15px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-keyboard="open"] .turn-counter {
    padding: 4px 9px;
    font-size: 11.5px;
  }

  html[data-keyboard="open"] .conversation {
    gap: 10px;
    padding: 10px 12px;
    scrollbar-gutter: auto;
  }

  html[data-keyboard="open"] .message-avatar {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    margin-top: 17px;
  }

  html[data-keyboard="open"] .message-content {
    padding: 9px 12px;
  }

  html[data-keyboard="open"] .message-content p {
    font-size: 14px;
    line-height: 1.5;
  }

  html[data-keyboard="open"] .response-area {
    padding: 0 8px max(8px, env(safe-area-inset-bottom));
  }

  html[data-keyboard="open"] .composer {
    gap: 6px;
    padding: 8px;
    border-radius: var(--r-md);
  }

  html[data-keyboard="open"] .composer textarea {
    min-height: 40px;
    max-height: 72px;
    padding: 5px 4px;
  }

  html[data-keyboard="open"] .composer-footer {
    flex-wrap: nowrap;
    gap: 8px;
  }

  html[data-keyboard="open"] .primary-button {
    min-width: 88px;
  }

}

@media (max-width: 520px) {
  .topbar-actions {
    gap: 4px;
  }

  .connection-status {
    width: 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
  }

  .connection-status #connection-label {
    display: none;
  }

  .consultation-header {
    align-items: center;
  }

  .composer-footer {
    flex-wrap: wrap;
  }

  .primary-button {
    flex: 1;
  }

  .result-header,
  .result-section {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* --------------------------------------------------------------------------
   23. 无障碍与降级
   -------------------------------------------------------------------------- */
/* 触控热区：紧凑尺寸适合指针驱动的工作台（macOS 原生控件也小于 44pt），
   但触屏下命中区必须补到 44×44。视觉尺寸不变，只长热区。 */
@media (pointer: coarse) {
  .icon-button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .tool-button,
  .utility-choice,
  .primary-button,
  .text-button {
    min-height: 44px;
  }

  .tool-button,
  .utility-choice {
    padding-inline: 16px;
  }

  .attachment-item button {
    /* 视觉仍是 20px 的小圆点，热区用伪元素向外扩展 */
    position: relative;
  }

  .attachment-item button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }
}

/* Reduce Transparency：换成实色，玻璃全部退场 */
@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass: #fff;
    --glass-strong: #fff;
    --glass-thin: #f5f5f7;
    --lens: none;
    --blur: none;
    --blur-thick: none;
    --blur-thin: none;
    --canvas: #f5f5f7;
  }

  body::before {
    display: none;
  }

  .topbar::after,
  .side-panel::after,
  .consultation::after,
  .composer::after,
  .result-panel::after,
  .sponsor-slot::after,
  .toast::after,
  .welcome-state::after,
  .message-content::after {
    display: none;
  }
}

@media (prefers-reduced-transparency: reduce) and (prefers-color-scheme: dark) {
  :root {
    --glass: #1c1c1e;
    --glass-strong: #2c2c2e;
    --glass-thin: #1c1c1e;
    --canvas: #000;
  }
}

/* Increase Contrast */
@media (prefers-contrast: more) {
  :root {
    --ink-soft: #3a3a3e;
    --ink-faint: #5a5a60;
    --line: rgba(60, 60, 67, 0.4);
    --line-strong: rgba(60, 60, 67, 0.6);
    --edge-line: rgba(0, 0, 0, 0.4);
    --glass: rgba(255, 255, 255, 0.94);
    --glass-strong: rgba(255, 255, 255, 0.98);
    --glass-thin: rgba(255, 255, 255, 0.88);
  }
}

/* 不支持 backdrop-filter 时退回实色 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --glass: rgba(255, 255, 255, 0.96);
    --glass-strong: #fff;
    --glass-thin: rgba(255, 255, 255, 0.9);
  }

  body::before {
    filter: none;
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body::before,
  .topbar,
  .response-area,
  .side-panel {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .consultation {
    box-shadow: none;
    background: none;
  }
}
