:root {
  --ink: #2a2540;
  --ink-deep: #171426;
  --muted: #737188;
  --subtle: #9b99aa;
  --line: #e8e5ee;
  --soft: #f7f6fa;
  --paper: #fff;
  --red: #ff5f57;
  --red-dark: #e94342;
  --red-soft: #fff0ef;
  --yellow: #ffc94d;
  --yellow-dark: #c58408;
  --yellow-soft: #fff8df;
  --purple: #7157e8;
  --purple-soft: #f2efff;
  --mint: #35c997;
  --mint-soft: #eafbf5;
  --blue: #4c7ff0;
  --text-label: 11px;
  --text-supporting: 12px;
  --text-body: 13px;
  --text-control: 14px;
  --shadow-sm: 0 8px 24px rgba(50, 40, 72, .07);
  --shadow-md: 0 18px 50px rgba(51, 42, 75, .12);
  --shadow-lg: 0 28px 80px rgba(41, 32, 65, .18);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #f6f4f8; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: #f6f4f8; }
button, input, textarea, select { color: inherit; font: inherit; }
button, label[for], select { cursor: pointer; }
button { border: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { color: #fff; background: var(--red); }

.eyebrow { color: var(--red); font-size: var(--text-label); font-weight: 900; letter-spacing: .13em; }
.eyebrow.light { color: #ffe98d; }
.primary-button, .secondary-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 16px; border-radius: 12px; font-size: var(--text-control); font-weight: 850; transition: transform .18s, box-shadow .18s, border-color .18s; }
.primary-button { color: #fff; background: linear-gradient(135deg, var(--red), #ff7b45); box-shadow: 0 10px 24px rgba(255, 95, 87, .22); }
.primary-button.warm { color: #553b00; background: linear-gradient(135deg, #ffdc69, var(--yellow)); box-shadow: 0 10px 24px rgba(255, 201, 77, .24); }
.secondary-button { border: 1px solid var(--line); background: #fff; }
.secondary-button.strong { color: var(--purple); border-color: #d8d0ff; background: var(--purple-soft); }
.primary-button:not(:disabled):hover, .secondary-button:not(:disabled):hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* Authentication */
.auth-screen { display: grid; min-height: 100vh; grid-template-columns: minmax(520px, 1.25fr) minmax(440px, .75fr); }
.auth-story { position: relative; display: flex; min-height: 720px; flex-direction: column; justify-content: space-between; padding: clamp(36px, 5vw, 74px); color: #fff; background: radial-gradient(circle at 78% 20%, rgba(255, 230, 103, .32), transparent 20%), radial-gradient(circle at 12% 85%, rgba(255, 206, 73, .24), transparent 24%), linear-gradient(145deg, #ec4548, #ff654f 52%, #ff914d); overflow: hidden; }
.auth-story::before, .auth-story::after { position: absolute; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; content: ""; }
.auth-story::before { width: 380px; height: 380px; right: -160px; top: -130px; }
.auth-story::after { width: 280px; height: 280px; left: -120px; bottom: -90px; }
.brand-lockup { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; }
.brand-lockup > span:last-child { display: flex; flex-direction: column; }
.brand-lockup strong { font-size: 21px; letter-spacing: .08em; }
.brand-lockup small { margin-top: 3px; font-size: 10px; letter-spacing: .18em; opacity: .75; }
.brand-orbit { position: relative; display: block; width: 42px; height: 42px; flex: 0 0 auto; border: 2px solid currentColor; border-radius: 15px; transform: rotate(-7deg); }
.brand-orbit i, .brand-orbit b, .brand-orbit em { position: absolute; display: block; border-radius: 50%; content: ""; }
.brand-orbit i { width: 13px; height: 13px; left: 8px; top: 9px; background: var(--yellow); }
.brand-orbit b { width: 8px; height: 8px; right: 7px; top: 8px; background: currentColor; }
.brand-orbit em { width: 11px; height: 11px; right: 9px; bottom: 7px; border: 2px solid currentColor; }
.auth-copy { position: relative; z-index: 2; max-width: 720px; margin: 36px 0 10px; }
.auth-copy h1 { max-width: 700px; margin: 14px 0 20px; font-size: clamp(38px, 4.4vw, 68px); line-height: 1.12; letter-spacing: -.055em; }
.auth-copy p { max-width: 630px; margin: 0; color: rgba(255,255,255,.82); font-size: clamp(13px, 1.1vw, 17px); line-height: 1.9; }
.auth-visual { position: relative; z-index: 2; display: flex; min-height: 245px; align-items: center; justify-content: center; gap: clamp(28px, 4vw, 64px); padding: 20px 60px; }
.micro-world { position: relative; width: clamp(150px, 15vw, 225px); aspect-ratio: 1; border: 9px solid rgba(255,255,255,.88); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffefaf 0 4%, transparent 5%), radial-gradient(circle at 70% 60%, #e94d5e 0 5%, transparent 6%), radial-gradient(circle at 50% 50%, #764550, #332235); box-shadow: inset 0 0 0 8px rgba(255,255,255,.12), 0 20px 55px rgba(89,25,35,.26); overflow: hidden; }
.micro-world::before, .micro-world::after, .micro-world span, .micro-world i, .micro-world b, .micro-world em { position: absolute; display: block; border-radius: 50%; content: ""; }
.micro-world::before { width: 54%; height: 15%; left: 5%; top: 42%; border-radius: 50% 30%; background: #f89564; transform: rotate(28deg); opacity: .75; }
.micro-world::after { width: 34%; height: 11%; right: 5%; top: 29%; border-radius: 50%; background: #efc96a; transform: rotate(-42deg); }
.micro-world span { width: 13%; height: 13%; left: 25%; top: 22%; background: #ffdd5c; }
.micro-world i { width: 8%; height: 27%; left: 62%; bottom: 13%; border-radius: 50%; background: #e66365; transform: rotate(37deg); }
.micro-world b { width: 8%; height: 8%; right: 24%; top: 18%; background: #fff1a3; }
.micro-world em { width: 11%; height: 11%; left: 18%; bottom: 19%; border: 3px solid #fff0a2; }
.micro-world-after { background: radial-gradient(circle at 30% 30%, #fff4c4 0 4%, transparent 5%), radial-gradient(circle at 52% 52%, #685a51, #2e2930); }
.micro-world-after::before { width: 39%; opacity: .42; }
.micro-world-after::after { width: 24%; opacity: .5; }
.micro-world-after i { height: 17%; opacity: .48; }
.auth-arrow { display: flex; flex-direction: column; align-items: center; }
.auth-arrow small { color: #fff3bc; font-size: 11px; font-weight: 800; }
.auth-arrow strong { margin-top: 7px; font-size: 44px; }
.floating-note { position: absolute; padding: 8px 11px; border: 1px solid rgba(255,255,255,.32); border-radius: 12px; background: rgba(113,35,43,.22); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); font-size: 10px; }
.floating-note b { color: #ffe780; }
.note-one { left: 8%; top: 16%; transform: rotate(-4deg); }
.note-two { right: 7%; bottom: 12%; transform: rotate(4deg); }
.auth-steps { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,.82); font-size: 10px; font-weight: 800; }
.auth-steps span { display: flex; align-items: center; gap: 7px; }
.auth-steps b { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; color: #7c3e20; background: var(--yellow); }
.auth-steps i { width: 30px; height: 1px; background: rgba(255,255,255,.3); }
.auth-entry { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(24px, 4vw, 58px); background: radial-gradient(circle at 0 100%, #fff2d8, transparent 32%), #fbfafc; }
.auth-card { width: min(100%, 480px); padding: clamp(26px, 3vw, 42px); border: 1px solid #ede9f0; border-radius: 30px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-lg); }
.auth-card-heading { position: relative; }
.mobile-brand { display: none; }
.capability-pill { position: absolute; right: 0; top: 0; padding: 6px 9px; border-radius: 9px; color: #7e6e46; background: var(--yellow-soft); font-size: 10px; font-weight: 800; }
.capability-pill.ready { color: #16845f; background: var(--mint-soft); }
.capability-pill.warning { color: #c94642; background: var(--red-soft); }
.auth-card h2 { margin: 32px 0 8px; color: var(--ink-deep); font-size: 28px; letter-spacing: -.03em; }
.auth-card-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.segmented { display: inline-flex; padding: 4px; border-radius: 13px; background: #f1eff4; }
.segmented button { min-height: 36px; padding: 0 13px; border-radius: 10px; color: var(--muted); background: transparent; font-size: var(--text-body); font-weight: 850; }
.segmented button.active { color: var(--ink-deep); background: #fff; box-shadow: 0 5px 14px rgba(57,48,75,.1); }
.auth-tabs { display: flex; margin: 27px 0 20px; }
.auth-tabs button { flex: 1; }
.auth-form { display: none; }
.auth-form.active { display: block; animation: rise .3s ease both; }
.field { display: flex; min-width: 0; flex-direction: column; }
.field > span, .field > label, .code-combo label > span { margin-bottom: 7px; color: #5f5a70; font-size: var(--text-body); font-weight: 850; }
.field > span b { margin-left: 6px; color: var(--red); font-size: var(--text-label); }
.field input, .field textarea, .field select, .code-combo input { width: 100%; border: 1px solid #dfdbe5; border-radius: 12px; color: var(--ink); background: #fff; outline: none; font-size: var(--text-control); transition: border-color .18s, box-shadow .18s; }
.field input, .field select, .code-combo input { height: 45px; padding: 0 13px; }
.field textarea { padding: 11px 13px; line-height: 1.7; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .code-combo input:focus { border-color: #ffaaa5; box-shadow: 0 0 0 4px rgba(255,95,87,.08); }
.auth-form > .field { margin-top: 15px; }
.code-combo { display: grid; grid-template-columns: 1fr 112px; align-items: end; gap: 9px; margin-top: 15px; }
.code-combo label { display: flex; min-width: 0; flex-direction: column; }
.code-combo button { height: 45px; }
.hero-button { display: flex; width: 100%; height: 52px; align-items: center; justify-content: space-between; padding: 0 20px; margin-top: 22px; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--red), #ff8d48); box-shadow: 0 15px 30px rgba(255,95,87,.24); font-size: 13px; font-weight: 900; }
.hero-button:hover { transform: translateY(-2px); }
.hero-button b { font-size: 20px; }
.form-footnote { margin: 13px 0 0; color: var(--subtle); font-size: 11px; line-height: 1.7; text-align: center; }
.device-code-tip { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid #ffe1ae; border-radius: 13px; background: var(--yellow-soft); }
.device-code-tip > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--yellow), #ff9448); }
.device-code-tip div { display: flex; flex-direction: column; }
.device-code-tip strong { font-size: 10px; }
.device-code-tip small { margin-top: 3px; color: #8c7449; font-size: 10px; }
.dev-login { padding-top: 16px; margin-top: 18px; border-top: 1px dashed var(--line); }
.dev-login > span { color: var(--purple); font-size: 11px; font-weight: 900; }
.dev-login > div { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 7px; }
.dev-login input { min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #dcd5f7; border-radius: 10px; outline: none; }
.dev-login button { padding: 0 12px; border-radius: 10px; color: #fff; background: var(--purple); font-size: 11px; font-weight: 900; }
.dev-login small { display: block; margin-top: 6px; color: var(--subtle); font-size: 10px; }
.auth-security { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--muted); font-size: 11px; }
.auth-security span { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(53,201,151,.12); }
.auth-legal { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.8; }
.auth-legal p { margin: 0; }
.auth-legal a { color: inherit; text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }

.device-verification-screen { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 20%, #fff0c8, transparent 28%), radial-gradient(circle at 80% 80%, #eee9ff, transparent 30%), linear-gradient(145deg, #fff, #f8f4f7); }
.device-verification-card { width: min(100%, 560px); padding: clamp(28px, 5vw, 52px); border: 1px solid #e9e3ec; border-radius: 30px; background: rgba(255,255,255,.96); box-shadow: var(--shadow-lg); text-align: center; }
.device-verification-card > .brand-orbit { margin: 0 auto 22px; color: var(--red); }
.device-verification-card h1 { margin: 13px 0 12px; color: var(--ink-deep); font-size: clamp(26px, 4vw, 36px); letter-spacing: -.04em; }
.device-verification-card > p { margin: 0; color: var(--muted); font-size: var(--text-control); line-height: 1.85; }
.device-verification-card > small { display: block; margin-top: 18px; color: var(--subtle); font-size: var(--text-supporting); line-height: 1.65; }
.device-verification-status { display: flex; min-height: 48px; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px; margin-top: 22px; border-radius: 14px; color: #7e6e46; background: var(--yellow-soft); font-size: var(--text-body); font-weight: 850; }
.device-verification-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px rgba(255,201,77,.15); }
.device-verification-status.checking { color: #4f61a8; background: #eef1ff; }
.device-verification-status.checking i { background: var(--blue); box-shadow: 0 0 0 5px rgba(76,127,240,.13); animation: pulse 1s infinite; }
.device-verification-status.denied { color: #b8413c; background: var(--red-soft); }
.device-verification-status.denied i { background: var(--red); box-shadow: 0 0 0 5px rgba(255,95,87,.12); }
.device-verification-card .hero-button { margin-top: 14px; }
.device-gate-logout { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 12px; margin-top: 5px; color: var(--muted); background: transparent; font-size: var(--text-body); text-decoration: underline; text-underline-offset: 3px; }

/* Global application shell */
.app-shell { min-height: 100vh; background: #f7f5f8; }
.app-nav { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; display: flex; width: 82px; flex-direction: column; align-items: center; padding: 18px 10px; border-right: 1px solid #eeeaf0; background: #fff; box-shadow: 8px 0 30px rgba(57,44,68,.04); }
/* 品牌：全应用只有一个 logo 元素（橘黄渐变圆角方块 + 白色 orbit），放在顶栏最左侧。 */
.topbar-brand { display: flex; align-items: center; gap: 12px; padding: 0 16px 0 0; border-right: 1px solid var(--line); background: none; text-align: left; }
.brand-logo { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg, var(--red), #ff8a48); box-shadow: 0 10px 22px rgba(255,95,87,.24); }
.brand-logo .brand-orbit { width: 25px; height: 25px; border-radius: 9px; }
.brand-logo .brand-orbit i { width: 8px; height: 8px; left: 5px; top: 5px; }
.brand-logo .brand-orbit b { width: 5px; height: 5px; right: 4px; top: 4px; }
.brand-logo .brand-orbit em { width: 7px; height: 7px; right: 5px; bottom: 4px; }
.brand-name { display: flex; flex-direction: column; }
.brand-name strong { color: var(--ink-deep); font-size: 16px; letter-spacing: .02em; }
.brand-name small { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.topbar-brand:not(:disabled):hover .brand-name strong { color: var(--red); }
/* 观诊全屏才出现的两段：本次检查摘要、对话开关与退出。普通视图一律隐藏。 */
.topbar-left > .cinema-context { display: none; }
.cinema-actions { display: none; }
.app-nav nav { display: flex; width: 100%; flex: 1; flex-direction: column; gap: 9px; padding-top: 20px; }
.nav-link { display: flex; width: 100%; min-height: 62px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 16px; color: #9290a0; background: transparent; transition: background .18s, color .18s, transform .18s; }
.nav-link span { display: grid; width: 28px; height: 28px; place-items: center; font-size: 20px; }
.nav-link small { font-size: var(--text-body); font-weight: 800; }
.nav-link:hover { color: var(--red); background: var(--red-soft); transform: translateY(-1px); }
.nav-link.active { color: #fff; background: linear-gradient(145deg, var(--red), #ff7c4e); box-shadow: 0 10px 22px rgba(255,95,87,.2); }
.nav-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg, var(--purple), #9a6fea); font-size: 12px; font-weight: 900; }
.app-frame { min-height: 100vh; margin-left: 82px; }
.topbar { position: sticky; z-index: 50; top: 0; display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 22px; padding: 12px 24px; border-bottom: 1px solid rgba(228,224,233,.9); background: rgba(255,255,255,.88); backdrop-filter: blur(18px); }
.topbar-left { display: flex; min-width: 280px; align-items: center; gap: 12px; }
.menu-button { display: none; width: 38px; height: 38px; border-radius: 11px; background: var(--soft); }
.topbar-left > .page-heading { display: flex; min-width: 0; flex-direction: column; }
.topbar-left h1 { margin: 2px 0 0; color: var(--ink-deep); font-size: 21px; letter-spacing: -.03em; }
.topbar-left p { max-width: 390px; margin: 3px 0 0; color: var(--muted); font-size: var(--text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.system-cluster { display: flex; align-items: center; gap: 8px; }
.status-chip { display: grid; min-width: 128px; grid-template-columns: 9px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.status-chip i { width: 8px; height: 8px; grid-row: 1 / 3; align-self: center; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,201,77,.12); }
.status-chip.online i, .status-chip.connected i { background: var(--mint); box-shadow: 0 0 0 4px rgba(53,201,151,.12); }
.status-chip b { font-size: var(--text-body); }
.status-chip small { margin-top: 2px; color: var(--muted); font-size: var(--text-label); }
.qwen-chip { display: flex; align-items: center; gap: 9px; padding: 7px 11px 7px 8px; border: 1px solid #ded9f5; border-radius: 13px; background: linear-gradient(135deg, #fbfaff, #f5f2ff); }
.qwen-chip > b { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(145deg, var(--purple), var(--blue)); box-shadow: 0 7px 14px rgba(113,87,232,.19); }
.qwen-chip span { display: flex; flex-direction: column; }
.qwen-chip small { color: var(--muted); font-size: var(--text-label); }
.qwen-chip strong { margin-top: 2px; font-size: var(--text-body); }
.identity-menu { position: relative; }
.identity-button { display: flex; align-items: center; gap: 9px; padding: 5px 9px 5px 5px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.identity-button > span { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(145deg, var(--purple), #a36be2); font-size: 11px; font-weight: 900; }
.identity-button > div { display: flex; min-width: 94px; flex-direction: column; align-items: flex-start; }
.identity-button strong { font-size: var(--text-body); }
.identity-button small { margin-top: 3px; color: var(--ink-deep); font-size: var(--text-supporting); font-weight: 800; }
/* 顶栏四块芯片统一高度：诊所ID框原本比旁边的千问框矮一截，归属信息看不清。 */
.status-chip, .qwen-chip, .identity-button { min-height: 58px; }
.identity-button i { color: var(--subtle); font-style: normal; }
.identity-popover { position: absolute; right: 0; top: calc(100% + 8px); width: 205px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-md); }
.identity-popover p { margin: 0 0 9px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.identity-popover button { width: 100%; min-height: 34px; border-radius: 9px; color: var(--red); background: var(--red-soft); font-size: 11px; font-weight: 900; }
.page-stage { padding: 20px 22px 42px; }
.page-view { display: none; }
.page-view.active { display: block; animation: rise .3s ease both; }

/* Workbench */
.patient-context { margin-bottom: 15px; }
.context-empty, .context-filled { display: flex; min-height: 72px; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.context-empty > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: var(--red); background: var(--red-soft); font-size: 20px; }
.context-empty > div { display: flex; flex: 1; flex-direction: column; }
.context-empty strong { font-size: 12px; }
.context-empty small { margin-top: 4px; color: var(--muted); font-size: var(--text-supporting); }
.context-filled { position: relative; overflow: hidden; }
.context-filled::before { position: absolute; width: 150px; height: 150px; right: -80px; top: -85px; border-radius: 50%; background: var(--yellow-soft); content: ""; }
.patient-avatar { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border: 3px solid #fff; border-radius: 16px; color: #fff; background: linear-gradient(145deg, var(--red), #ff994d); box-shadow: 0 8px 18px rgba(255,95,87,.18); font-size: 15px; font-weight: 900; }
.context-main { display: flex; min-width: 200px; flex: 1; flex-direction: column; }
.context-main > div { display: flex; align-items: center; gap: 8px; }
.context-main h2 { margin: 0; color: var(--ink-deep); font-size: 16px; }
.context-main b { padding: 4px 6px; border-radius: 7px; color: var(--purple); background: var(--purple-soft); font-size: var(--text-label); }
.context-main p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-body); }
.context-facts { display: flex; gap: 8px; }
.context-facts span { display: flex; min-width: 90px; flex-direction: column; padding: 7px 9px; border-radius: 10px; background: var(--soft); }
.context-facts small { color: var(--muted); font-size: var(--text-label); }
.context-facts strong { margin-top: 3px; font-size: var(--text-body); }
.context-actions { position: relative; z-index: 2; display: flex; gap: 7px; }
.workspace-empty { display: flex; min-height: calc(100vh - 205px); flex-direction: column; align-items: center; justify-content: center; padding: 50px 20px; border: 1px dashed #ddd7e2; border-radius: 26px; background: radial-gradient(circle at 50% 20%, #fff3d0, transparent 22%), #fff; text-align: center; }
.empty-illustration { position: relative; width: 150px; height: 120px; margin-bottom: 12px; }
.empty-illustration .lens { position: absolute; width: 86px; height: 86px; left: 28px; top: 4px; border: 8px solid #fff; border-radius: 50%; background: radial-gradient(circle at 35% 34%, var(--yellow) 0 5%, transparent 6%), radial-gradient(circle at 62% 57%, var(--red) 0 7%, transparent 8%), linear-gradient(145deg, #706270, #2e2636); box-shadow: 0 16px 35px rgba(62,48,69,.2); }
.empty-illustration .lens i, .empty-illustration .lens b { position: absolute; border-radius: 50%; background: #ffc965; content: ""; }
.empty-illustration .lens i { width: 13px; height: 13px; left: 17px; bottom: 15px; }
.empty-illustration .lens b { width: 8px; height: 23px; right: 18px; top: 15px; border-radius: 8px; background: #ef756d; transform: rotate(32deg); }
.empty-illustration > span { position: absolute; width: 94px; height: 14px; left: 25px; bottom: 9px; border-radius: 50%; background: #ded8e3; }
.empty-illustration > em { position: absolute; width: 28px; height: 20px; right: 5px; top: 17px; border-radius: 8px; background: var(--yellow); transform: rotate(8deg); }
.workspace-empty h2 { margin: 10px 0 8px; color: var(--ink-deep); font-size: 22px; }
.workspace-empty p { max-width: 610px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.workspace-empty > div:last-child { display: flex; gap: 8px; margin-top: 22px; }
.workspace-grid { --workspace-left-min: 650px; --workspace-right-min: 330px; --workspace-left-track: 7fr; --workspace-right-track: 3fr; display: grid; grid-template-columns: minmax(var(--workspace-left-min), var(--workspace-left-track)) 16px minmax(var(--workspace-right-min), var(--workspace-right-track)); align-items: start; gap: 0; }
.clinical-column { min-width: 0; }
.workspace-resizer { position: sticky; top: 98px; display: flex; height: calc(100vh - 120px); align-self: start; align-items: center; justify-content: center; cursor: col-resize; touch-action: none; user-select: none; }
.workspace-resizer::before { position: absolute; width: 2px; inset-block: 0; border-radius: 99px; background: #e7e2ea; content: ""; transition: background .18s, width .18s; }
.workspace-resizer span { position: relative; display: grid; width: 12px; height: 58px; place-items: center; border: 1px solid #ded7e5; border-radius: 99px; background: #f7f5f9; box-shadow: 0 5px 15px rgba(55,43,66,.1); transition: border-color .18s, background .18s, transform .18s; }
.workspace-resizer span::before { width: 3px; height: 27px; border-radius: 99px; background: repeating-linear-gradient(to bottom, #9f95aa 0 3px, transparent 3px 7px); content: ""; }
.workspace-resizer:hover::before, .workspace-resizer:focus-visible::before, body.resizing-workspace .workspace-resizer::before { width: 4px; background: #c8bdf4; }
.workspace-resizer:hover span, .workspace-resizer:focus-visible span, body.resizing-workspace .workspace-resizer span { border-color: #b7a8ef; background: var(--purple-soft); transform: scale(1.05); }
.workspace-resizer:focus-visible { outline: 0; }
body.resizing-workspace { cursor: col-resize; user-select: none; }
.step-section { padding: 17px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); }
.step-section + .step-section { margin-top: 16px; }

/* 2026-10-17 T-006：工作台步骤导航 —— 临床栏顶部吸顶步骤条（不盖患者信息条，也不进右侧对话区）。 */
.workflow-steps { position: sticky; z-index: 30; top: var(--workflow-topbar-height, 82px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); }
.workflow-step { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; transition: background .16s, border-color .16s; }
.workflow-step:hover { background: var(--soft); }
.workflow-step.active { border-color: #d9d1f6; background: var(--purple-soft); }
.workflow-step > div { display: flex; min-width: 0; flex-direction: column; }
.workflow-step strong { color: var(--ink-deep); font-size: var(--text-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workflow-step small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 900; white-space: nowrap; }
.workflow-step-number { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #fff; font-size: 11px; font-weight: 900; }
.workflow-step-number.red { background: linear-gradient(145deg, var(--red), #ff8b49); }
.workflow-step-number.yellow { color: #654200; background: linear-gradient(145deg, #ffdf70, var(--yellow)); }
.workflow-step-number.purple { background: linear-gradient(145deg, var(--purple), var(--blue)); }
.workflow-step-number.mint { background: linear-gradient(145deg, var(--mint), #47bde0); }
.workflow-step[data-step-state="done"] small { color: #16845f; }
.workflow-step[data-step-state="active"] small { color: var(--yellow-dark); }
.workflow-step[data-step-state="stale"] small { color: var(--red-dark); }

/* 固定主操作条：吸在临床栏底部（不用 fixed，避免盖住右侧对话输入框）。 */
.workflow-dock { position: sticky; z-index: 25; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 10px 12px 10px 16px; border: 1px solid #cfeee1; border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: var(--shadow-md); backdrop-filter: blur(14px); transition: opacity .18s, transform .18s; }
.workflow-dock.dock-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
.workflow-dock-copy { display: flex; min-width: 0; align-items: center; gap: 8px; }
.workflow-dock-copy i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 4px; background: var(--mint); box-shadow: 0 0 0 4px var(--mint-soft); }
.workflow-dock-copy strong { min-width: 0; color: var(--ink-deep); font-size: var(--text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-dock .primary-button { flex: 0 0 auto; }

/* 有媒体且显微镜未连接时，实时画面收起成一行。 */
.camera-collapsed-bar { display: flex; width: 100%; align-items: center; gap: 8px; padding: 13px 15px; border: 1px dashed #d8d2e4; border-radius: 16px; background: var(--soft); color: var(--muted); font-family: inherit; font-size: var(--text-control); font-weight: 800; cursor: pointer; }
.camera-collapsed-bar:hover { border-color: #c4b9e6; background: #f3f0fb; color: var(--ink); }
.capture-section { background: radial-gradient(circle at 100% 0, rgba(255,201,77,.13), transparent 16%), #fff; }
.step-heading { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; border-bottom: 1px solid #efecf1; }
.step-number { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: #fff; font-size: var(--text-body); font-weight: 900; box-shadow: 0 8px 17px rgba(50,40,70,.12); }
.step-number.red { background: linear-gradient(145deg, var(--red), #ff8b49); }
.step-number.yellow { color: #654200; background: linear-gradient(145deg, #ffdf70, var(--yellow)); }
.step-number.purple { background: linear-gradient(145deg, var(--purple), var(--blue)); }
.step-number.mint { background: linear-gradient(145deg, var(--mint), #47bde0); }
.step-heading > div:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.step-heading small { color: var(--red); font-size: var(--text-label); font-weight: 900; letter-spacing: .12em; }
.step-heading h2 { margin: 3px 0 0; color: var(--ink-deep); font-size: 16px; }
.step-heading p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-supporting); line-height: 1.65; }
.section-status { padding: 7px 10px; border-radius: 9px; color: #8a7750; background: var(--yellow-soft); font-size: var(--text-supporting); font-weight: 900; }
.section-status.saved { color: #16805e; background: var(--mint-soft); }
.capture-panel { display: none; padding-top: 14px; }
.capture-panel.active { display: block; animation: rise .25s ease both; }
.camera-stage { position: relative; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 20px; background: #15131f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 18px 40px rgba(26,21,35,.2); overflow: hidden; }
.camera-stage video { display: none; width: 100%; height: 100%; background: #050508; object-fit: contain; }
.camera-stage.connected video { display: block; }
.camera-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; color: #fff; text-align: center; background: radial-gradient(circle at 50% 35%, #392c43, #15131f 58%); }
.camera-stage.connected .camera-placeholder { display: none; }
.camera-orb { position: relative; width: 110px; height: 110px; margin-bottom: 17px; border: 7px solid rgba(255,255,255,.85); border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--yellow) 0 5%, transparent 6%), radial-gradient(circle at 64% 54%, var(--red) 0 7%, transparent 8%), linear-gradient(145deg, #8d5e5e, #33283d); box-shadow: 0 18px 35px rgba(0,0,0,.3); }
.camera-orb span, .camera-orb i, .camera-orb b { position: absolute; display: block; border-radius: 50%; }
.camera-orb span { width: 33px; height: 10px; left: 14px; bottom: 27px; border-radius: 50%; background: #f69b6b; transform: rotate(29deg); }
.camera-orb i { width: 10px; height: 31px; right: 20px; top: 19px; border-radius: 8px; background: #e9666a; transform: rotate(36deg); }
.camera-orb b { width: 11px; height: 11px; right: 18px; bottom: 19px; background: #ffe47b; }
.camera-placeholder strong { font-size: 14px; }
.camera-placeholder small { max-width: 440px; margin-top: 6px; color: rgba(255,255,255,.72); font-size: var(--text-body); line-height: 1.65; }
.camera-hud { position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.camera-hud span { padding: 7px 9px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: rgba(255,255,255,.86); background: rgba(17,14,24,.58); backdrop-filter: blur(8px); font-size: var(--text-supporting); }
/* 放大入口压在画面右下角；有它时 HUD 右侧留出位置，FPS 不会被盖住。 */
.camera-stage.connected .camera-hud { right: 98px; }
.stage-expand { position: absolute; z-index: 6; right: 12px; bottom: 12px; display: flex; height: 38px; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; color: rgba(255,255,255,.92); background: rgba(17,14,24,.62); backdrop-filter: blur(10px); font-size: var(--text-supporting); font-weight: 850; }
.stage-expand > span { font-size: 15px; line-height: 1; }
.stage-expand:not(:disabled):hover { border-color: rgba(255,255,255,.42); background: rgba(30,25,42,.82); }
.camera-stage:not(.connected) .stage-expand { display: none; }
.recording-pill { position: absolute; z-index: 5; right: 13px; top: 13px; display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 8px; color: #fff; background: var(--red); font-size: var(--text-supporting); font-weight: 900; }
.recording-pill i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1s infinite; }
.capture-toolbar { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 8px; margin-top: 11px; }
.connect-control, .capture-control { display: flex; min-width: 0; min-height: 74px; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 15px; background: #fff; text-align: left; transition: transform .18s, box-shadow .18s; }
.connect-control { color: #fff; border: 0; background: linear-gradient(135deg, var(--purple), var(--blue)); box-shadow: 0 11px 22px rgba(80,82,200,.2); }
.connect-control > span, .capture-control > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; font-size: 18px; }
.connect-control > span { background: rgba(255,255,255,.16); }
.capture-control.yellow { border-color: #ffe4a0; background: var(--yellow-soft); }
.capture-control.yellow > span { color: #865a00; background: linear-gradient(145deg, #ffe887, var(--yellow)); }
.capture-control.red { border-color: #ffd3d0; background: var(--red-soft); }
.capture-control.red > span { color: #fff; background: linear-gradient(145deg, #ff837d, var(--red)); }
.capture-control.import { cursor: pointer; }
.capture-control.import > span { color: var(--purple); background: var(--purple-soft); }
.capture-control input { display: none; }
.connect-control > div, .capture-control > div { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.connect-control strong, .capture-control strong { font-size: var(--text-body); }
.connect-control small, .capture-control small { margin-top: 4px; color: inherit; font-size: var(--text-label); line-height: 1.45; opacity: .78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connect-control > b { font-size: 17px; }
.connect-control:hover, .capture-control:not(:disabled):hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.upload-progress { display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin-top: 10px; border-radius: 14px; background: var(--purple-soft); }
.upload-progress > span { position: relative; width: 120px; height: 7px; border-radius: 99px; background: #ddd6fa; overflow: hidden; }
.upload-progress > span i { display: block; width: 35%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--blue)); animation: progressRun 1.4s ease-in-out infinite; }
.upload-progress > div { display: flex; flex-direction: column; }
.upload-progress strong { font-size: var(--text-body); }
.upload-progress small { margin-top: 3px; color: var(--muted); font-size: var(--text-label); }
.media-block { padding-top: 13px; margin-top: 13px; border-top: 1px solid #efecf1; }
.subheading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.subheading > div { display: flex; flex-direction: column; }
.subheading h3 { margin: 2px 0 0; font-size: 12px; }
.subheading h3 b { display: inline-grid; min-width: 22px; height: 22px; place-items: center; margin-left: 4px; border-radius: 6px; color: var(--red); background: var(--red-soft); font-size: var(--text-label); }
.quiet-note { color: var(--muted); font-size: var(--text-supporting); }
.media-strip { display: flex; min-height: 95px; gap: 8px; padding: 4px 1px 8px; overflow-x: auto; scrollbar-width: thin; }
.media-card { position: relative; width: 145px; height: 108px; flex: 0 0 auto; padding: 0; border: 2px solid transparent; border-radius: 14px; background: #191620; cursor: pointer; overflow: hidden; }
.media-card.selected { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,95,87,.16); }
.media-card img, .media-card video { width: 100%; height: 100%; object-fit: cover; opacity: .84; }
.media-card > span { position: absolute; left: 7px; bottom: 7px; max-width: 104px; color: #fff; font-size: var(--text-label); font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card > i { position: absolute; right: 6px; top: 6px; padding: 4px 5px; border-radius: 6px; color: #fff; background: rgba(27,22,34,.72); font-size: 10px; font-style: normal; }
.inline-empty { display: flex; width: 100%; min-height: 74px; align-items: center; justify-content: center; border: 1px dashed #ddd8e3; border-radius: 13px; color: var(--subtle); background: #faf9fb; font-size: var(--text-body); line-height: 1.6; text-align: center; }
.inline-empty.large { min-height: 250px; padding: 30px; line-height: 1.8; }
.analysis-block { margin-top: 10px; }
.analysis-placeholder, .analysis-result { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #ddd7f7; border-radius: 15px; background: linear-gradient(135deg, #fbfaff, var(--purple-soft)); }
.analysis-placeholder > span, .analysis-result > span { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--purple), var(--blue)); font-weight: 900; }
.analysis-placeholder > div, .analysis-result > div { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.analysis-placeholder strong, .analysis-result strong { font-size: var(--text-control); }
.analysis-placeholder small, .analysis-result small { margin-top: 4px; color: var(--muted); font-size: var(--text-supporting); line-height: 1.6; }
.analysis-placeholder button { min-width: 112px; }
.analysis-score { display: flex; align-items: baseline; gap: 3px; color: var(--mint); }
.analysis-score b { font-size: 20px; }
.analysis-score small { font-size: var(--text-supporting); }
.finding-list { display: grid; gap: 7px; margin-top: 9px; }
.finding-item { padding: 9px 10px; border-left: 4px solid var(--purple); border-radius: 0 10px 10px 0; background: #fff; }
.finding-item > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.finding-item strong { font-size: 16px; }
.finding-item b { padding: 3px 5px; border-radius: 6px; color: var(--purple); background: var(--purple-soft); font-size: var(--text-label); }
.finding-item p { margin: 9px 0 0; color: #514d61; font-size: 16px; line-height: 2; }
.analysis-limitations { margin: 13px 0 0; padding-left: 22px; color: #625970; font-size: 14px; line-height: 2; }
.comparison-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #ffe1a3; border-radius: 15px; background: linear-gradient(135deg, var(--yellow-soft), #fff8f1); }
.comparison-intro > div { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; }
.comparison-intro > div > span { display: grid; width: 36px; height: 36px; grid-row: 1 / 3; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--yellow), var(--red)); font-size: 18px; }
.comparison-intro strong { font-size: var(--text-control); }
.comparison-intro small { margin-top: 3px; color: #8c7855; font-size: var(--text-label); }
.comparison-intro > b { padding: 6px 8px; border-radius: 8px; color: var(--yellow-dark); background: #fff; font-size: var(--text-label); }
.history-track { display: flex; gap: 8px; padding: 14px 2px 12px; overflow-x: auto; scroll-snap-type: x proximity; }
.history-node { position: relative; display: flex; width: 170px; min-height: 100px; flex: 0 0 auto; flex-direction: column; padding: 10px; border: 1px solid var(--line); border-radius: 15px; background: #fff; scroll-snap-align: start; text-align: left; }
.history-node::after { position: absolute; width: 8px; height: 8px; right: 9px; top: 9px; border-radius: 50%; background: var(--yellow); content: ""; }
.history-node.eligible::after { background: var(--mint); }
.history-node.selected { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 0 3px rgba(255,95,87,.08); }
.history-node b { color: var(--ink-deep); font-size: var(--text-control); }
.history-node small { margin-top: 4px; color: var(--muted); font-size: var(--text-label); }
.history-node span { margin-top: auto; padding-top: 8px; color: var(--red); font-size: var(--text-label); font-weight: 900; }
.history-node:not(.eligible) span { color: #9d8290; }
.comparison-stage { min-height: 250px; }
.comparison-media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare-column { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: #faf9fb; }
.compare-column.current { border-color: #ffd1ce; background: #fff7f6; }
/* 2026-10-17 T-006：历史栏加了基线条目后，1280/1440 下日期保持一行，工具行整体换行不挤压媒体数。 */
.compare-column > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; margin-bottom: 8px; }
.compare-column h3 { margin: 0; font-size: 11px; white-space: nowrap; }
.compare-column header span { padding: 4px 6px; border-radius: 6px; color: var(--red); background: #fff; font-size: var(--text-label); font-weight: 900; }
/* 报告基线的标记与"设为报告基线"按钮：放在栏标题处，窄栏也不换行。 */
.compare-column > header .compare-column-tools { display: flex; min-width: 0; flex: 0 1 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.compare-column header .compare-baseline-tag { color: #16845f; background: var(--mint-soft); white-space: nowrap; }
.compare-column header .compare-baseline-set { min-height: 26px; padding: 0 9px; border-radius: 6px; font-size: var(--text-label); font-weight: 900; white-space: nowrap; }
.compare-column header .compare-media-count { white-space: nowrap; }
.compare-image { position: relative; height: 210px; border-radius: 13px; background: #1b1720; overflow: hidden; }
.compare-image img { width: 100%; height: 100%; object-fit: contain; }
.compare-summary { margin-top: 8px; }
.compare-summary h4 { margin: 0 0 6px; font-size: var(--text-body); }
.compare-summary p { margin: 0; color: var(--muted); font-size: var(--text-supporting); line-height: 1.65; }
.compare-summary ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: var(--text-supporting); line-height: 1.65; }
.doctor-section { background: radial-gradient(circle at 100% 0, rgba(255,201,77,.15), transparent 22%), #fff; }
.doctor-form { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding-top: 14px; }
.doctor-form .wide { grid-column: 1 / -1; }
.doctor-actions { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed #e5dfe9; }
.doctor-actions > div { display: flex; min-width: 180px; flex: 1; flex-direction: column; }
.doctor-actions strong { font-size: var(--text-body); }
.doctor-actions small { margin-top: 3px; color: var(--muted); font-size: var(--text-label); line-height: 1.55; }
.plan-section { border-top: 5px solid var(--purple); background: radial-gradient(circle at 96% 4%, rgba(113,87,232,.12), transparent 20%), #fff; }
.plan-content { padding-top: 13px; }
.plan-placeholder { display: flex; min-height: 105px; align-items: center; gap: 12px; padding: 13px; border: 1px dashed #d9d2eb; border-radius: 15px; background: #faf9fc; }
.plan-placeholder > span { display: grid; width: 45px; height: 45px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: var(--purple); background: var(--purple-soft); font-weight: 900; }
.plan-placeholder > div { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.plan-placeholder strong { font-size: var(--text-control); }
.plan-placeholder p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-supporting); line-height: 1.65; }
.plan-readiness { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.plan-readiness b { padding: 5px 7px; border-radius: 7px; color: var(--muted); background: #f0edf4; font-size: var(--text-label); }
.plan-readiness b.ready { color: #16805e; background: var(--mint-soft); }
.plan-actions { margin-bottom: 16px; }
.plan-window-player { margin-bottom: 16px; border: 1px solid #ebe6f3; border-radius: 16px; overflow: hidden; background: #fff; }
.plan-window-stage { position: relative; background: #0b1118; }
.plan-window-video { display: block; width: 100%; height: auto; background: #0b1118; }
.plan-window-bookmark { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.plan-window-player.bookend .plan-window-bookmark { opacity: 1; }
.plan-window-frame, .plan-window-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.plan-window-caption { margin: 0; padding: 8px 12px; color: var(--muted); font-size: var(--text-label); line-height: 1.6; }
.plan-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.plan-card > div { padding: 20px; border: 1px solid #ebe6f3; border-radius: 16px; background: #fff; }
.plan-card > div.wide { grid-column: 1 / -1; background: var(--purple-soft); }
.plan-card h3 { margin: 0 0 12px; color: #353149; font-size: 18px; }
.plan-card p, .plan-card li { color: #514d61; font-size: 16px; line-height: 2; overflow-wrap: anywhere; }
.plan-card p { margin: 0; }
.plan-card ul { margin: 0; padding-left: 17px; }
.plan-card footer { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.plan-card footer span { color: var(--muted); font-size: var(--text-label); }
/* 2026-10-16 T-005：方案分层的两块——与历史对比、专业解读（视觉上与通俗部分区分）。 */
.plan-comparison { padding: 16px 18px; border: 1px solid #d9e6f5; border-radius: 14px; background: #f4f8fd; }
.plan-comparison h3 { margin-bottom: 8px; color: #2f5d8a; font-size: 16px; }
.plan-comparison ul { margin: 0; padding-left: 18px; }
.plan-comparison li { font-size: 15px; line-height: 1.95; }
.plan-comparison .plan-caption { margin-top: 8px; color: var(--muted); font-size: var(--text-label); }
.plan-professional { padding: 18px 20px; border: 1px solid #cfc4ea; border-left: 4px solid var(--purple); border-radius: 14px; background: #faf8ff; }
.plan-professional > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.plan-professional > header strong { color: #4b3f7a; font-size: 16px; }
.plan-professional > header small { color: var(--muted); font-size: var(--text-label); }
.plan-professional-section + .plan-professional-section { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #ded5f2; }
.plan-professional-section h4 { margin: 0 0 6px; color: #4b3f7a; font-size: 15px; }
.plan-professional-section p { font-size: 15px; line-height: 2; }
.plan-professional-failed { border-style: dashed; background: #fbf9fe; color: var(--muted); }
.comparison-answer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.comparison-answer-actions small { color: var(--muted); font-size: var(--text-label); }
.comparison-answer-actions .secondary-button { min-height: 32px; padding: 0 12px; font-size: var(--text-body); }
.plan-card li + li { margin-top: 12px; }
.plan-summary { padding: 24px; border-radius: 18px; border: 1px solid #dcd3f2; background: linear-gradient(120deg, #f4efff, #f4faf9); }
.plan-eyebrow { display: block; color: var(--purple); font-size: 12px; font-weight: 700; letter-spacing: .08em; margin-bottom: 12px; }
.plan-scope { padding: 18px 20px; border-left: 3px solid #d2c5ef; background: #faf8fd; }
.plan-evidence-note { padding: 12px; background: #faf8fd; }
.evidence-waterfall { display: grid; gap: 20px; min-width: 0; }
.evidence-heading { padding-top: 12px; }
.evidence-heading h3 { margin: 0 0 8px; font-size: 16px; color: #353149; }
.evidence-heading p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--muted); }
.evidence-card { min-width: 0; border: 1px solid #e2deeb; border-radius: 18px; overflow: hidden; background: #fff; }
.evidence-card > header { display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.evidence-number { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 12px; background: #eee8fa; color: var(--purple); font-weight: 800; }
.evidence-card header h3 { margin: 0 0 4px; font-size: 18px; color: #353149; }
.evidence-card header small { font-size: 12px; color: var(--muted); }
.evidence-card figure { margin: 0; padding: 16px 20px 12px; background: #f3f5f6; }
.evidence-card canvas { display: block; max-width: 100%; max-height: 250px; width: auto; height: auto; margin: 0 auto; border-radius: 8px; background: #142831; }
.evidence-card figcaption { margin-top: 11px; font-size: 13px; line-height: 1.85; color: #657078; }
.evidence-copy { padding: 20px; }
.evidence-copy h4 { margin: 0 0 7px; font-size: 14px; color: #353149; }
.evidence-copy p { margin: 0 0 19px; color: #514d61; font-size: 16px; line-height: 2; overflow-wrap: anywhere; }
.evidence-action { margin: 18px 0; padding: 16px; background: #f0f7f5; border-left: 3px solid #70aa99; border-radius: 0 12px 12px 0; }
.evidence-action p:last-child { margin-bottom: 0; }
.evidence-copy .evidence-rationale { margin-top: 11px; font-size: 14px; }
.evidence-copy details { border-top: 1px solid #eeeaf3; padding-top: 12px; }
.evidence-copy summary, .analysis-details > summary { cursor: pointer; color: #625773; font-size: 13px; line-height: 1.9; }
.evidence-copy details p { margin-top: 11px; font-size: 13px; }
.analysis-details { margin-top: 16px; padding: 14px; border: 1px solid #e5e0eb; border-radius: 14px; }
.report-action-section { border: 0; color: #fff; background: radial-gradient(circle at 90% 10%, rgba(255,201,77,.25), transparent 24%), linear-gradient(135deg, #332747, #5d3c74 55%, #744451); box-shadow: 0 18px 40px rgba(58,42,73,.18); }
.report-action-copy { display: flex; align-items: center; gap: 11px; }
.report-action-copy > div { display: flex; flex-direction: column; }
.report-action-copy small { color: #d8cee5; font-size: var(--text-label); font-weight: 900; letter-spacing: .12em; }
.report-action-copy h2 { margin: 3px 0 0; font-size: 16px; }
.report-action-copy p { margin: 5px 0 0; color: rgba(255,255,255,.76); font-size: var(--text-supporting); line-height: 1.65; }
.report-readiness { display: flex; flex-wrap: wrap; gap: 6px; margin: 13px 0 10px; }
.report-readiness span { display: flex; align-items: center; gap: 5px; padding: 7px 9px; border-radius: 8px; color: rgba(255,255,255,.8); background: rgba(255,255,255,.08); font-size: var(--text-label); }
.report-readiness span.ready { color: #b5f5df; background: rgba(53,201,151,.13); }
.report-readiness span i { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }
.report-readiness span.ready i { background: var(--mint); }
.report-generate-button { display: flex; width: 100%; min-height: 62px; align-items: center; gap: 11px; padding: 9px 13px; border-radius: 15px; color: #49320a; background: linear-gradient(135deg, #ffe888, var(--yellow)); box-shadow: 0 11px 24px rgba(255,201,77,.18); text-align: left; }
.report-generate-button > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--red), #ff864b); font-size: 20px; }
.report-generate-button > div { display: flex; flex: 1; flex-direction: column; }
.report-generate-button strong { font-size: var(--text-control); }
.report-generate-button small { margin-top: 4px; color: #715815; font-size: var(--text-label); }
.report-generate-button > b { font-size: 19px; }
.chat-panel { position: sticky; top: 98px; display: flex; height: calc(100vh - 120px); min-height: 610px; flex-direction: column; border: 1px solid #e1dced; border-top: 5px solid var(--purple); border-radius: 22px; background: #fff; box-shadow: var(--shadow-md); overflow: hidden; }
.chat-heading { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid #eeeaf2; background: radial-gradient(circle at 100% 0, #eee9ff, transparent 44%), #fff; }
.qwen-avatar { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg, var(--purple), var(--blue)); box-shadow: 0 8px 18px rgba(113,87,232,.2); font-size: 15px; font-weight: 900; }
.chat-heading > div:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.chat-heading span { color: var(--purple); font-size: var(--text-label); font-weight: 900; letter-spacing: .1em; }
.chat-heading h2 { margin: 3px 0 0; font-size: 15px; }
.chat-heading p { margin: 4px 0 0; color: var(--muted); font-size: var(--text-supporting); line-height: 1.5; }
.chat-heading > i { padding: 6px 8px; border-radius: 7px; color: #8a7750; background: var(--yellow-soft); font-size: var(--text-label); font-style: normal; font-weight: 900; }
.chat-heading > i.ready { color: #16805e; background: var(--mint-soft); }
.chat-boundary { display: flex; align-items: flex-start; gap: 7px; padding: 9px 11px; margin: 10px 10px 0; border-radius: 11px; color: #7d6433; background: var(--yellow-soft); }
.chat-boundary > span { font-size: 11px; }
.chat-boundary p { margin: 0; font-size: var(--text-label); line-height: 1.65; }
.chat-messages { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 10px; padding: 12px; overflow-y: auto; }
.chat-welcome { display: flex; flex-direction: column; align-items: center; padding: 24px 12px; color: var(--muted); text-align: center; }
.chat-welcome > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 15px; color: var(--purple); background: var(--purple-soft); font-weight: 900; }
.chat-welcome strong { margin-top: 11px; color: var(--ink); font-size: var(--text-control); }
.chat-welcome p { margin: 6px 0 0; font-size: var(--text-supporting); line-height: 1.7; }
.chat-message { display: flex; max-width: 92%; flex-direction: column; align-self: flex-start; }
.chat-message.user { align-self: flex-end; align-items: flex-end; }
.chat-message > div { padding: 10px 11px; border-radius: 6px 14px 14px 14px; color: #514c60; background: #f3f1f6; font-size: var(--text-body); line-height: 1.7; white-space: pre-wrap; }
.chat-message.user > div { color: #fff; border-radius: 14px 6px 14px 14px; background: linear-gradient(145deg, var(--red), #ff7e4b); }
.chat-message small { margin-top: 4px; color: var(--subtle); font-size: var(--text-label); }
.chat-message .citations { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.chat-message .citations b { padding: 3px 5px; border-radius: 5px; color: var(--purple); background: var(--purple-soft); font-size: var(--text-label); }
.chat-composer { padding: 10px; border-top: 1px solid #eeeaf1; background: #fff; }
.chat-composer textarea { width: 100%; min-height: 72px; padding: 10px 11px; border: 1px solid #ded9e6; border-radius: 12px; outline: none; font-size: var(--text-body); line-height: 1.6; resize: none; }
.chat-composer textarea:focus { border-color: #bdb1f1; box-shadow: 0 0 0 4px rgba(113,87,232,.08); }
.chat-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 7px; }
.chat-composer span { color: var(--muted); font-size: var(--text-label); line-height: 1.5; }
.chat-composer button { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(145deg, var(--purple), var(--blue)); font-size: 17px; }

/* Patient manager */
.page-hero { display: flex; min-height: 138px; align-items: center; justify-content: space-between; gap: 25px; padding: 24px 26px; margin-bottom: 15px; border-radius: 24px; overflow: hidden; }
.page-hero > div:first-child { position: relative; z-index: 2; }
.page-hero h2 { margin: 7px 0 7px; color: var(--ink-deep); font-size: 24px; letter-spacing: -.04em; }
.page-hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: var(--text-body); line-height: 1.7; }
.patient-hero { position: relative; background: radial-gradient(circle at 82% 18%, rgba(255,201,77,.42), transparent 18%), linear-gradient(135deg, #fff, #fff4ef); }
.patient-hero::after { position: absolute; width: 240px; height: 240px; right: -90px; bottom: -135px; border-radius: 50%; background: rgba(255,95,87,.1); content: ""; }
.hero-add-button { position: relative; z-index: 2; display: flex; min-width: 220px; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--red), #ff8e49); box-shadow: 0 14px 28px rgba(255,95,87,.2); text-align: left; }
.hero-add-button > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: rgba(255,255,255,.18); font-size: 22px; }
.hero-add-button div { display: flex; flex-direction: column; }
.hero-add-button strong { font-size: var(--text-control); }
.hero-add-button small { margin-top: 4px; color: rgba(255,255,255,.82); font-size: var(--text-label); line-height: 1.45; }
.patient-manager { display: grid; min-height: calc(100vh - 275px); grid-template-columns: 330px 1fr; gap: 14px; }
.patient-browser, .patient-detail { border: 1px solid var(--line); border-radius: 21px; background: #fff; box-shadow: var(--shadow-sm); }
.patient-browser { padding: 13px; }
.search-box { display: flex; height: 46px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #dedae4; border-radius: 12px; background: #fff; }
.search-box > span { color: var(--red); font-size: 17px; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: none; background: transparent; font-size: var(--text-body); }
.search-box kbd { padding: 4px 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--subtle); background: var(--soft); font-size: 10px; }
.search-box.compact { width: min(340px, 100%); height: 42px; }
.list-meta { display: flex; align-items: center; justify-content: space-between; padding: 14px 3px 8px; }
.list-meta strong { font-size: var(--text-control); }
.list-meta span { color: var(--muted); font-size: var(--text-supporting); }
.patient-list { display: flex; flex-direction: column; gap: 7px; }
.patient-list-item { display: flex; width: 100%; min-height: 68px; align-items: center; gap: 10px; padding: 10px; border: 1px solid transparent; border-radius: 13px; background: #faf9fb; text-align: left; }
.patient-list-item:hover { border-color: #ffd0cd; background: #fff7f6; }
.patient-list-item.active { border-color: #ffb9b4; background: var(--red-soft); box-shadow: 0 6px 16px rgba(255,95,87,.08); }
.patient-list-item > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--red), #ff9950); font-size: 11px; font-weight: 900; }
.patient-list-item > div { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.patient-list-item strong { font-size: var(--text-body); }
.patient-list-item small { margin-top: 4px; color: var(--muted); font-size: var(--text-label); line-height: 1.5; }
.patient-list-item > b { color: var(--subtle); font-size: 15px; }
.patient-detail { min-width: 0; padding: 17px; }
.detail-empty { display: flex; min-height: 420px; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.detail-empty > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; color: var(--red); background: var(--red-soft); font-size: 28px; }
.detail-empty h3 { margin: 13px 0 5px; color: var(--ink); font-size: 14px; }
.detail-empty p { max-width: 470px; margin: 0; font-size: var(--text-body); line-height: 1.7; }
.detail-header { display: flex; align-items: center; gap: 12px; padding: 4px 3px 15px; border-bottom: 1px solid #eeeaf1; }
.detail-header .patient-avatar { width: 54px; height: 54px; }
.detail-title { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.detail-title > div { display: flex; align-items: center; gap: 8px; }
.detail-title h2 { margin: 0; font-size: 18px; }
.detail-title b { padding: 4px 7px; border-radius: 6px; color: var(--purple); background: var(--purple-soft); font-size: var(--text-label); }
.detail-title p { margin: 5px 0 0; color: var(--muted); font-size: var(--text-body); line-height: 1.55; }
.detail-actions { display: flex; gap: 7px; }
.patient-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 13px 0; }
.patient-facts span { display: flex; min-height: 64px; flex-direction: column; justify-content: center; padding: 10px 11px; border-radius: 12px; background: #f8f7fa; }
.patient-facts small { color: var(--muted); font-size: var(--text-label); }
.patient-facts strong { margin-top: 5px; font-size: var(--text-body); }
.timeline-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 1px 10px; }
.timeline-heading h3 { margin: 0; font-size: 16px; }
.timeline-heading span { color: var(--muted); font-size: var(--text-supporting); }
.patient-timeline { position: relative; padding-left: 23px; }
.patient-timeline::before { position: absolute; width: 2px; left: 7px; top: 7px; bottom: 7px; background: linear-gradient(var(--red), var(--yellow)); content: ""; }
.timeline-item { position: relative; display: grid; min-height: 82px; grid-template-columns: minmax(220px, .65fr) 1fr auto; gap: 10px; padding: 12px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.timeline-item::before { position: absolute; width: 12px; height: 12px; left: -22px; top: 18px; border: 3px solid #fff; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #ffaaa5; content: ""; }
.timeline-item-main { display: flex; flex-direction: column; }
.timeline-item-main > div { display: flex; align-items: center; gap: 6px; }
.timeline-item-main h4 { margin: 0; font-size: var(--text-control); }
.timeline-item-main b { padding: 4px 6px; border-radius: 6px; color: var(--mint); background: var(--mint-soft); font-size: var(--text-label); }
.timeline-item-main p { margin: 6px 0 0; color: var(--muted); font-size: var(--text-supporting); line-height: 1.65; }
.timeline-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.timeline-summary span { display: flex; min-height: 56px; flex-direction: column; justify-content: center; padding: 8px 9px; border-radius: 9px; background: var(--soft); }
.timeline-summary small { color: var(--muted); font-size: var(--text-label); }
.timeline-summary strong { margin-top: 4px; font-size: var(--text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-item-actions { display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.timeline-item-actions button { min-width: 104px; min-height: 38px; padding: 0 11px; border-radius: 9px; color: var(--red); background: var(--red-soft); font-size: var(--text-body); font-weight: 900; }
.timeline-item-actions button.report { color: var(--purple); background: var(--purple-soft); }

/* Knowledge */
/* Knowledge reading styles live in knowledge.css. */
.loading-card { display: flex; min-height: 160px; grid-column: 1 / -1; align-items: center; justify-content: center; padding: 24px; border: 1px dashed #ddd8e3; border-radius: 18px; color: var(--muted); background: #fff; font-size: var(--text-body); line-height: 1.65; text-align: center; }

/* Reports */
.report-hero { background: radial-gradient(circle at 86% 15%, rgba(53,201,151,.2), transparent 20%), linear-gradient(135deg, #fff, #f0fcf8); }
.report-stats { display: flex; min-width: 250px; align-items: center; justify-content: space-around; padding: 12px 17px; border: 1px solid #d8eee6; border-radius: 16px; background: rgba(255,255,255,.78); }
.report-stats span { display: flex; flex-direction: column; align-items: center; }
.report-stats small { color: var(--muted); font-size: var(--text-label); }
.report-stats strong { margin-top: 4px; color: var(--mint); font-size: 20px; }
.report-stats i { width: 1px; height: 36px; background: #dfeae6; }
.report-searchbar { display: grid; grid-template-columns: minmax(240px, 1fr) 172px 172px auto; align-items: end; gap: 8px; padding: 12px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow-sm); }
.report-searchbar > .report-date-field { display: flex; flex-direction: column; }
.report-searchbar > .report-date-field > label > span { margin-bottom: 5px; color: var(--muted); font-size: var(--text-label); font-weight: 850; }
.report-searchbar .date-picker-field { height: 46px; padding: 0 10px; border: 1px solid #dedae4; border-radius: 12px; font-size: var(--text-body); }
.report-searchbar .primary-button { min-height: 46px; }
.report-groups { display: flex; flex-direction: column; gap: 10px; }
.report-group { border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.report-group-header { display: flex; align-items: center; gap: 10px; padding: 13px 15px; background: linear-gradient(90deg, #fff, #fff9f4); }
.report-group-header .patient-avatar { width: 42px; height: 42px; }
.report-group-header > div:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.report-group-header h3 { margin: 0; font-size: var(--text-control); }
.report-group-header p { margin: 4px 0 0; color: var(--muted); font-size: var(--text-supporting); line-height: 1.55; }
.report-group-header > span { display: flex; flex-direction: column; align-items: flex-end; }
.report-group-header > span strong { color: var(--red); font-size: var(--text-control); }
.report-group-header > span small { margin-top: 3px; color: var(--muted); font-size: var(--text-label); }
.report-timeline { display: flex; gap: 9px; padding: 13px 15px 16px; border-top: 1px solid #f0edf2; overflow-x: auto; }
.report-node { position: relative; display: flex; width: 260px; min-height: 130px; flex: 0 0 auto; flex-direction: column; padding: 12px; border: 1px solid #e8e3eb; border-radius: 14px; background: #faf9fb; text-align: left; }
.report-node:hover { border-color: #ffc1bd; background: #fff8f7; }
.report-node header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.report-node header strong { font-size: var(--text-body); }
.report-node header b { padding: 4px 5px; border-radius: 6px; color: var(--purple); background: var(--purple-soft); font-size: var(--text-label); }
.report-node h4 { margin: 8px 0 5px; font-size: var(--text-control); }
.report-node p { display: -webkit-box; margin: 0; color: var(--muted); font-size: var(--text-supporting); line-height: 1.65; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.report-node footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 9px; margin-top: auto; }
.report-node footer span { color: var(--subtle); font-size: var(--text-label); }
.report-node footer b { color: var(--red); font-size: var(--text-label); }

/* Dialogs and report rendering */
dialog { padding: 0; border: 0; }
dialog::backdrop { background: rgba(27,22,34,.58); backdrop-filter: blur(5px); }
.app-dialog { width: min(760px, calc(100vw - 30px)); max-height: calc(100vh - 35px); border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg); overflow: auto; }
.app-dialog > form, .app-dialog > div:not(.dialog-heading):not(.share-result) { padding: 0; }
.app-dialog form { padding: 22px; }
.small-dialog { width: min(610px, calc(100vw - 30px)); padding: 22px; }
.small-dialog form { padding: 0; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 15px; border-bottom: 1px solid #eeeaf1; }
/* 表单弹窗内容超出高度时，标题行与 × 吸顶，不用先滚回顶部才能关闭。 */
.app-dialog .dialog-heading { position: sticky; z-index: 5; top: 0; background: #fff; }
.dialog-heading h2 { margin: 5px 0 5px; font-size: 20px; }
.dialog-heading p { margin: 0; color: var(--muted); font-size: var(--text-body); line-height: 1.65; }
.dialog-close { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--muted); background: var(--soft); font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding-top: 15px; }
/* 全系统统一的日期选择器：中文日历面板。原生日历跟随浏览器语言，Safari 与 Chrome 也不一样。 */
.date-picker { position: relative; }
.date-picker-field { width: 100%; height: 45px; padding: 0 13px; border: 1px solid #dfdbe5; border-radius: 12px; color: var(--ink); background: #fff; font-size: var(--text-control); text-align: left; }
.date-picker-field:focus-visible { outline: none; border-color: #ffaaa5; box-shadow: 0 0 0 4px rgba(255,95,87,.08); }
.date-picker-panel { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 296px; max-height: min(48vh, 300px); overflow: auto; padding: 10px; border: 1px solid #e7e2ee; border-radius: 14px; background: #fff; box-shadow: 0 18px 40px rgba(60,45,80,.18); }
/* 面板贴近右边缘时改为与输入框右边缘对齐向左展开，避免超出视口。 */
.date-picker-panel.is-right { right: 0; left: auto; }
.date-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 8px; }
.date-picker-title { border: 0; background: none; color: var(--ink); font-size: var(--text-body); font-weight: 700; cursor: pointer; }
.date-picker-actions { display: flex; align-items: center; gap: 8px; }
.date-picker-clear, .date-picker-today { border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.date-picker-today { color: #d9541c; }
.date-picker-weekdays, .date-picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.date-picker-weekdays span { padding: 4px 0; color: var(--muted); font-size: 12px; }
.date-picker-days button, .date-picker-days span { display: grid; height: 32px; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 13px; cursor: pointer; }
.date-picker-days button:hover, .date-picker-grid button:hover, .date-picker-years button:hover { background: #f4f0f8; }
.date-picker-days button.is-active, .date-picker-grid button.is-active { background: #ff5f57; color: #fff; }
.date-picker-days button.is-disabled { color: #cfc9d8; cursor: not-allowed; background: none; }
.date-picker-years button.is-active { background: #efeaf7; color: #6b5a83; font-weight: 700; }
.date-picker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.date-picker-grid button { height: 34px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 13px; cursor: pointer; }
.date-picker-years { display: grid; max-height: 118px; gap: 2px; margin-top: 6px; overflow: auto; }
.date-picker-years button { height: 30px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 13px; cursor: pointer; }
.form-grid .wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 16px; margin-top: 15px; border-top: 1px solid #eeeaf1; }
.sampling-note { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; margin-top: 13px; border-radius: 12px; color: #806e49; background: var(--yellow-soft); }
.sampling-note > span { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: #fff; background: var(--yellow); font-size: var(--text-body); font-weight: 900; }
.sampling-note p { margin: 0; font-size: var(--text-supporting); line-height: 1.65; }
.viewer-dialog { position: relative; width: min(900px, calc(100vw - 40px)); max-height: calc(100vh - 50px); border-radius: 20px; background: #17131e; box-shadow: var(--shadow-lg); overflow: hidden; }
.viewer-close { position: absolute; z-index: 9; right: 12px; top: 12px; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: #fff; background: rgba(18,15,24,.65); font-size: 20px; backdrop-filter: blur(8px); }
.viewer-close.dark { color: var(--ink); background: #f0edf3; }
.viewer-heading { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 64px 15px 20px; border-bottom: 1px solid rgba(255,255,255,.09); background: #241e2d; }
.viewer-heading > div { display: flex; min-width: 0; flex-direction: column; }
.viewer-heading span { color: var(--yellow); font-size: var(--text-label); font-weight: 900; letter-spacing: .12em; }
.viewer-heading h2 { margin: 5px 0 0; color: #fff; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-heading p { margin: 0; color: #cfc7d5; font-size: var(--text-supporting); white-space: nowrap; }
.media-viewer { display: grid; min-height: 420px; max-height: calc(100vh - 132px); padding: 14px; place-items: center; background: #17131e; overflow: hidden; }
.media-viewer img, .media-viewer video { display: block; max-width: 100%; max-height: calc(100vh - 160px); border-radius: 8px; object-fit: contain; }
/* 2026-10-17 T-008：报告是白底紧凑版面，弹窗外圈改成浅灰细边，纸面留白由 report.css 控制。 */
.report-dialog { position: relative; width: min(1000px, calc(100vw - 25px)); max-height: calc(100vh - 24px); padding: 0; border-radius: 16px; background: #eef0f1; box-shadow: var(--shadow-lg); overflow: auto; }
/* 报告弹窗自己滚动：× 改为吸顶（写法对齐知识库弹窗 knowledge.css:41），滚到报告底部也够得着。 */
.report-dialog > .viewer-close { position: sticky; top: 12px; float: right; margin: 0 12px 0 0; }
.share-result { padding: 15px 0; }
.share-result > div { padding: 13px; border: 1px solid #d9d3e2; border-radius: 13px; background: #f8f7fa; word-break: break-all; }
.share-result strong { display: block; margin-bottom: 5px; font-size: var(--text-body); }
.share-result a { color: var(--purple); font-size: var(--text-body); line-height: 1.65; }
.share-result p { margin: 9px 0 0; color: var(--muted); font-size: var(--text-supporting); line-height: 1.65; }

/* Toasts */
.toast-region { position: fixed; z-index: 200; right: 18px; top: 18px; display: flex; width: min(380px, calc(100vw - 36px)); flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 12px 13px; border: 1px solid #e5e0e8; border-left: 5px solid var(--mint); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: var(--shadow-md); animation: toastIn .28s ease both; pointer-events: auto; }
.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--yellow); }
.toast > span { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #16805e; background: var(--mint-soft); font-size: 10px; font-weight: 900; }
.toast.error > span { color: var(--red); background: var(--red-soft); }
.toast.warning > span { color: var(--yellow-dark); background: var(--yellow-soft); }
.toast > div { display: flex; flex: 1; flex-direction: column; }
.toast strong { font-size: 11px; }
.toast p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes progressRun { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }

/* T-006：报告打印路径不包含工作台导航；直接打印工作台窗口时也隐藏它们。 */
@media print {
  .workflow-steps, .workflow-dock, .camera-collapsed-bar { display: none !important; }
}

@media (max-width: 1280px) {
  .system-cluster .status-chip:first-child { display: none; }
  .workspace-grid { --workspace-left-min: 590px; --workspace-right-min: 300px; }
  .capture-toolbar { grid-template-columns: 1fr 1fr; }
  .knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  /* T-006：单列回退后步骤条换成两列，仍吸在顶栏下面，不遮输入框。 */
  .workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-screen { grid-template-columns: 1fr 440px; }
  .auth-story { padding: 36px; }
  .auth-copy h1 { font-size: 43px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace-resizer { display: none; }
  .chat-panel { position: relative; top: auto; height: 650px; }
  .system-cluster .qwen-chip { display: none; }
  .patient-manager { grid-template-columns: 280px 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-item-actions { flex-direction: row; justify-content: flex-start; }
}

@media (max-width: 820px) {
  .auth-screen { display: block; background: linear-gradient(145deg, #f8f3f5, #fff8e9); }
  .auth-story { min-height: 310px; padding: 28px 24px 70px; }
  .auth-copy { margin-top: 35px; }
  .auth-copy h1 { font-size: 36px; }
  .auth-copy p { font-size: 11px; }
  .auth-visual, .auth-steps { display: none; }
  .auth-entry { padding: 0 17px 28px; background: transparent; }
  .auth-card { margin-top: -45px; }
  .mobile-brand { display: inline-flex; align-items: center; gap: 6px; color: var(--red); font-size: 10px; font-weight: 900; }
  .brand-dot { width: 9px; height: 9px; border-radius: 4px; background: var(--yellow); box-shadow: 0 0 0 4px var(--red-soft); }
  .app-nav { width: 72px; transform: translateX(-100%); transition: transform .2s; }
  .app-nav.open { transform: translateX(0); }
  .app-frame { margin-left: 0; }
  .menu-button { display: block; }
  .topbar { padding: 10px 14px; }
  .system-cluster { display: none; }
  .page-stage { padding: 14px; }
  .context-facts { display: none; }
  .patient-manager { grid-template-columns: 1fr; }
  .patient-browser { max-height: 400px; overflow-y: auto; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .report-searchbar { grid-template-columns: 1fr 1fr; }
  .report-searchbar .date-picker-panel { width: min(296px, calc(100vw - 32px)); }
  .report-searchbar .search-box { grid-column: 1 / -1; }
  .patient-facts { grid-template-columns: 1fr 1fr; }
  .page-hero { align-items: flex-start; flex-direction: column; }
  .hero-add-button, .release-badge, .report-stats { width: 100%; }
}

@media (max-width: 560px) {
  .auth-story { min-height: 280px; }
  .brand-lockup strong { font-size: 17px; }
  .auth-copy h1 { font-size: 29px; }
  .auth-card { padding: 23px 18px; border-radius: 23px; }
  .capability-pill { position: static; display: inline-block; margin-top: 14px; }
  .auth-card h2 { margin-top: 24px; }
  .code-combo { grid-template-columns: 1fr 100px; }
  .identity-button > div, .identity-button > i { display: none; }
  .topbar-left h1 { font-size: 17px; }
  .topbar-left { min-width: 0; flex: 1; }
  .page-stage { padding: 10px; }
  .context-filled { flex-wrap: wrap; }
  .context-main { min-width: calc(100% - 65px); }
  .context-actions { width: 100%; }
  .context-actions button { flex: 1; }
  .step-heading { align-items: flex-start; flex-wrap: wrap; }
  .step-heading .segmented { width: 100%; margin-left: 50px; }
  .step-heading .segmented button { flex: 1; }
  .camera-stage { height: 330px; }
  .capture-toolbar { grid-template-columns: 1fr; }
  .doctor-form, .form-grid, .plan-card, .comparison-media-grid, .report-columns { grid-template-columns: 1fr; }
  .doctor-form .wide, .form-grid .wide, .plan-card > div.wide { grid-column: auto; }
  .doctor-actions { align-items: stretch; flex-direction: column; }
  .doctor-actions button { width: 100%; }
  .chat-panel { height: 610px; min-height: 0; }
  .patient-facts { grid-template-columns: 1fr; }
  .detail-header { flex-wrap: wrap; }
  .detail-actions { width: 100%; }
  .detail-actions button { flex: 1; }
  .timeline-summary { grid-template-columns: 1fr; }
  .knowledge-tools { align-items: stretch; flex-direction: column; }
  .knowledge-tools .segmented { display: grid; grid-template-columns: 1fr 1fr; }
  .report-searchbar { grid-template-columns: 1fr; }
  .report-searchbar .search-box { grid-column: auto; }
  .report-patient-row { grid-template-columns: 1fr 1fr; }
  .report-media-grid { grid-template-columns: 1fr; }
  .viewer-dialog { width: calc(100vw - 18px); max-height: calc(100vh - 18px); border-radius: 16px; }
  .viewer-heading { min-height: 94px; align-items: flex-start; flex-direction: column; gap: 6px; padding: 15px 58px 13px 16px; }
  .viewer-heading p { white-space: normal; }
  .media-viewer { min-height: 280px; max-height: calc(100vh - 112px); padding: 8px; }
  .media-viewer img, .media-viewer video { max-height: calc(100vh - 130px); }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
}

/* 知识卡片与可追溯视觉定位 */

.knowledge-notice { padding:18px; background:#eef4f4; border-radius:12px; }
.scan-summary { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:12px 0; }
.scan-summary strong { flex:1; }
.scan-summary button,.scan-times button { border:1px solid #c9d9d8; padding:8px 12px; background:#fff; border-radius:9px; cursor:pointer; }
.scan-times { display:flex; overflow-x:auto; gap:8px; padding:8px 0 14px; }
.scan-times button { flex:0 0 auto; }
.scan-times button.active { background:#174e52; color:white; }
.annotation-stage { position:relative; width:100%; background:#102934; border-radius:12px; overflow:hidden; }
.annotation-stage img { display:block; width:100%; height:auto; }
.annotation-stage canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
/* 整帧标注区：从"查看完整画面"折叠块提到分析结果最前，先看全景再看局部小图。 */
.analysis-frame { margin:4px 0 18px; padding:14px; border:1px solid #e5e0eb; border-radius:14px; background:#fff; }
.analysis-frame-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:11px; }
.analysis-frame-head h3 { margin:0; color:#353149; font-size:16px; }
.analysis-frame-head button { flex:0 0 auto; padding:6px 12px; border:1px solid #c9d9d8; border-radius:9px; color:#174e52; background:#fff; font-size:12px; font-weight:700; }
.analysis-frame .scan-times { padding-bottom:0; }
button.finding-item { display:block; width:100%; text-align:left; background:#f5f9f8; border:1px solid #dbe7e3; cursor:pointer; margin:8px 0; }
button.finding-item b { margin-left:14px; font-size:12px; color:#617774; }

/* 两次检查的媒体/帧选择与同源标注预览 */
.comparison-scope { color: var(--muted, #656375); font-size: 12px; line-height: 1.7; }
.compare-column { min-width: 0; }
.compare-column > p { padding: 0 12px; font-size: 12px; overflow-wrap: anywhere; }
.compare-column .scan-times { padding: 8px 12px; max-height: 130px; overflow-y: auto; }
.compare-column > button { margin: 8px 12px; }
.compare-column details { padding: 12px; }
.compare-column video { width: 100%; max-height: 260px; background: #121b24; }

.identification-result { margin: 9px 0 17px; padding: 12px; background: #f4f8f7; border: 1px solid #d9e5e0; border-radius: 10px; font-size: 16px; line-height: 2; overflow-wrap: anywhere; }
.identification-result p { margin: 6px 0; }
.identification-result small, .identification-notice { color: #586960; font-size: 13px; line-height: 1.95; }
/* 提示词原文按原样换行。用类而不是内联 style：CSP 的 style-src 'self' 会拦掉内联样式。 */
.identification-notice pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.identification-result canvas { display: block; width: 100%; height: auto; margin-top: 8px; }

/* 分析起点随"连续视频识别与标注"标题同一行，紧邻开始识别标注按钮。 */
#video-analysis-start { width: 6rem; padding: .35rem; margin: 0; border: 1px solid #d4dfe7; border-radius: .4rem; }

/* Persistent, quiet feedback: real byte progress, no fabricated total AI percentage. */
#upload-progress-bar { animation: none; width: 0; transition: width .2s linear; }
.task-feedback { margin: 12px 0; padding: 12px 14px; border-left: 3px solid #7465a8; background: #f4f2f8; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.task-feedback strong, .task-feedback span { display: block; }
.task-feedback strong { color: #342d43; font-weight: 600; }
.task-feedback span { color: #625b6d; margin-top: 3px; }
.task-feedback[data-status="failed"] { background: #fff3ed; border-color: #bd522b; }
.task-feedback[data-status="succeeded"] { background: #edf6f1; border-color: #38805d; }
.task-feedback button { margin-top: 8px; }
.chat-panel > .task-feedback { margin: 8px 16px; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { #upload-progress-bar { transition: none; } }

.context-loading { opacity: .45; transition: opacity .15s ease; }
#workspace-feedback { margin: 12px 0 20px; }
#workspace-feedback button { border: 0; background: transparent; color: #51416f; text-decoration: underline; cursor: pointer; }
#doctor-note-status { max-width: 320px; white-space: normal; line-height: 1.6; }
.task-feedback button { color: #423550; }

/* 长任务过程日志：把"连续视频识别与标注"的进度按行累积，可收起只看一行。 */
.task-feedback.has-log { padding: 0; overflow: hidden; }
.task-log-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 14px; }
.task-log-toggle { flex: 0 0 auto; margin-top: 0; padding: 4px 11px; border: 1px solid #d9d2e6; border-radius: 8px; color: #4a3f5c; background: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.task-log { max-height: 300px; margin: 0; padding: 0 14px 12px; overflow-y: auto; list-style: none; }
.task-log li { display: flex; gap: 10px; padding: 3px 0; border-top: 1px dashed #e6e1ee; }
.task-log li:first-child { border-top: 0; }
.task-log time { flex: 0 0 auto; color: #8d86a0; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.8; }
.task-log li > span { margin-top: 0; color: #4f4860; font-size: 12px; line-height: 1.8; }
.task-feedback.log-collapsed .task-log { display: none; }

.plan-card ol { margin: 0; padding-left: 24px; }
.evidence-copy { max-width: 780px; margin-inline: auto; }

/* ---------- 诊所多用户与管理 ---------- */
.link-button {
  border: 0;
  background: none;
  color: var(--accent, #e2604a);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}

.device-gate-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 24px 12px;
  padding: 10px 16px;
  border: 1px solid #f0d8a8;
  background: #fff8e8;
  border-radius: 12px;
  color: #7a5a17;
  font-size: 13px;
}

.management-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.management-clinic {
  display: grid;
  gap: 4px;
  min-width: 240px;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(40, 40, 40, 0.08);
}

.management-clinic span {
  font-size: 12px;
  color: #8a8a8a;
}

.management-clinic strong {
  font-size: 22px;
  letter-spacing: 1px;
}

.management-clinic small {
  color: #6c6c6c;
}

.management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 18px;
  padding: 0 24px 32px;
}

.management-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(40, 40, 40, 0.08);
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(60, 40, 30, 0.05);
}

.management-card.wide {
  grid-column: 1 / -1;
}

.management-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.management-card h3 {
  margin: 0 0 4px;
}

.management-card p {
  margin: 0;
  color: #7a7a7a;
  font-size: 13px;
}

.management-table-el {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.management-table-el th,
.management-table-el td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(40, 40, 40, 0.06);
  vertical-align: middle;
}

.management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.management-actions button {
  border: 1px solid rgba(40, 40, 40, 0.12);
  background: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
}

.manage-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ffe9d6;
  color: #b25a1f;
  font-size: 11px;
  font-style: normal;
}

.transfer-list {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 6px 2px;
}

.transfer-list label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
}

/* Editable sampling conditions: saved history is offered, never prefilled. */
.exam-condition { position: relative; }
.exam-condition > label { margin-bottom: 7px; color: #5f5a70; font-size: var(--text-body); font-weight: 850; }
.condition-entry { position: relative; }
.condition-entry input { padding-right: 42px; }
.condition-toggle { position: absolute; right: 3px; top: 3px; display: grid; width: 38px; height: 39px; place-items: center; border-radius: 9px; color: var(--muted); background: transparent; font-size: 22px; }
.condition-toggle:hover { color: var(--red); background: var(--red-soft); }
.condition-toggle:focus-visible { outline: 2px solid var(--purple); }
.condition-options { position: absolute; z-index: 8; top: calc(100% + 6px); left: 0; right: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-md); }
.exam-condition:nth-last-child(-n+2) .condition-options { top: auto; bottom: calc(100% - 18px); }
.condition-options-title { padding: 9px 11px; color: var(--muted); background: var(--soft); font-size: 11px; line-height: 1.6; }
.condition-options [role="listbox"] { max-height: 170px; overflow-y: auto; overscroll-behavior: contain; }
.condition-options [role="option"] { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 9px 12px; color: var(--ink); background: #fff; text-align: left; font-size: 13px; }
.condition-options [role="option"] span { margin: 0; overflow-wrap: anywhere; }
.condition-options [role="option"] small { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.condition-options [role="option"]:hover, .condition-options [aria-selected="true"] { color: var(--red-dark); background: var(--red-soft); }
.condition-empty { margin: 0; padding: 14px 12px; color: var(--muted); font-size: 12px; }
.condition-history-status { margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

/* Keep navigation, selection and preview as explicit actions. */
.workspace-back { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 10px 12px; margin-right: 2px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #fff; font-size: var(--text-body); font-weight: 800; }
.workspace-back > span:first-child { color: var(--red); font-size: 20px; line-height: 1; }
.workspace-back:hover { color: var(--red-dark); border-color: var(--red); background: var(--red-soft); }
.workspace-back:focus-visible, .media-card:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.media-selection-hint { margin: 0 0 9px; color: var(--muted); font-size: var(--text-supporting); }
.media-card .media-selected-mark { position: absolute; z-index: 1; left: 5px; top: 5px; padding: 4px 6px; border-radius: 6px; color: #fff; background: var(--red); font-size: 10px; line-height: 1.2; }
.media-video-placeholder { display: flex; height: 100%; align-items: center; justify-content: center; gap: 7px; padding-bottom: 7px; color: #e6e0ff; background: linear-gradient(140deg, #292339, #191620); }
.media-video-placeholder > span { font-size: 22px; }
.media-video-placeholder > small { font-size: var(--text-body); font-weight: 800; }
.media-tile { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 4px; }
.media-tile-action { min-height: 26px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: var(--text-supporting); font-weight: 800; white-space: nowrap; }
.media-tile-action:hover { color: var(--purple); border-color: var(--purple); }
@media (max-width: 680px) {
  .workspace-back { width: 100%; justify-content: flex-start; margin-right: 0; }
}

/* Time-based review always opens original media, with optional saved observations. */
.comparison-view-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 12px; }
.comparison-view-heading strong { color: var(--ink-deep); font-size: 16px; }
.comparison-view-heading span { color: var(--muted); font-size: var(--text-supporting); }
.comparison-empty { display: grid; min-height: 250px; align-content: center; justify-items: center; gap: 12px; padding: 24px; border: 1px dashed var(--line); border-radius: 18px; background: #faf9fd; text-align: center; }
.comparison-empty > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; color: var(--purple); background: var(--purple-soft); font-size: 30px; }
.comparison-empty > strong { font-size: 16px; }
.comparison-empty p { margin: 0; color: var(--muted); font-size: var(--text-body); line-height: 1.8; }
.compare-column { padding: 14px; background: #fff; }
.compare-column.baseline { border-top: 3px solid var(--purple); }
.compare-column.current { border-top: 3px solid var(--red); background: #fffaf8; }
.compare-column header .compare-side-label { display: inline-block; padding: 0; color: var(--muted); background: transparent; font-size: var(--text-supporting); }
.compare-column h3 { margin-top: 6px; font-size: var(--text-control); }
.compare-media-choices { min-height: 32px; margin: 12px 0; }
.compare-original-stage { display: grid; aspect-ratio: 4 / 3; place-items: center; overflow: hidden; border-radius: 12px; background: #191620; }
.compare-original-stage > img, .compare-original-stage > video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
/* 2026-10-17 Owner：对比区视频尺寸有误。旧的 .compare-column video { max-height: 260px } 把视频压成一条，
   外面的 4:3 舞台又很高，视频缩在大片黑底中间。视频舞台改为跟随视频本身的比例。 */
.compare-original-stage.is-video { display: block; aspect-ratio: auto; }
.compare-original-stage.is-video > video { width: 100%; height: auto; max-height: min(70vh, 640px); margin: 0 auto; background: #191620; }
.compare-no-media { display: grid; gap: 8px; padding: 18px; color: #eee9fa; text-align: center; }
.compare-no-media span { font-size: var(--text-supporting); line-height: 1.6; }
.compare-file { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; margin: 6px 0; }
.compare-file strong { min-width: 0; overflow-wrap: anywhere; font-size: var(--text-body); }
.compare-file button { flex: 0 0 auto; padding: 8px 10px; font-size: var(--text-supporting); }
.compare-analysis, .compare-conditions { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px; font-size: var(--text-supporting); }
.compare-analysis summary, .compare-conditions summary { cursor: pointer; color: var(--muted); font-weight: 750; }
.compare-analysis-note { color: var(--muted); font-size: var(--text-supporting); line-height: 1.6; }
.compare-conditions dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare-conditions dt { color: var(--muted); }
.compare-conditions dd { margin: 4px 0 0; overflow-wrap: anywhere; }

/* 多时间点仍复用原始媒体列；宽屏可容纳三栏，小屏保持可读。 */
.comparison-media-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }
.compare-ai-selection { display: grid; gap: 8px; margin: 12px 0; }
.compare-include { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); font-weight: 800; cursor: pointer; }
.compare-include.selected { border-color: #c9bdff; color: var(--purple); background: #f4f0ff; }
.compare-ai-selection label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.compare-ai-selection input { width: 86px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; }
.compare-ai-selection small, .comparison-ai-bar small { color: var(--muted); font-size: 11px; }
.comparison-ai-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 18px; border: 1px solid #ddd4ff; border-radius: 18px; background: #f7f4ff; }
.comparison-ai-bar > div { flex: 1; min-width: 200px; }
.comparison-ai-bar p { margin: 7px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.comparison-answer { margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.comparison-answer p { line-height: 1.85; font-size: 14px; }
.comparison-answer small { color: var(--muted); }

/* ===== 观诊全屏（cinema）：整块显示器只留顶条、画面卡、千问对话卡 =====
   进入条件是 document.fullscreenElement 存在（app.js 的 syncCinemaState 负责加类）；
   本段只做重排，不复制 <video>、不重开流，采集/拍照/录像/分析链路完全不受影响。 */
html.cinema { --cinema-bar: 74px; --cinema-gap: 14px; --cinema-chat: 392px; overflow: hidden; }
html.cinema body { overflow: hidden; background: #f6f4f8; }
html.cinema .app-nav,
html.cinema .patient-context,
html.cinema .workflow-steps,
html.cinema .step-heading,
html.cinema .capture-toolbar,
html.cinema .media-block,
html.cinema .analysis-block,
html.cinema .workflow-dock,
html.cinema .workspace-resizer,
html.cinema .doctor-section,
html.cinema .plan-section,
html.cinema .report-action-section,
html.cinema #workspace-feedback,
html.cinema .device-gate-banner { display: none !important; }

html.cinema .app-frame { margin-left: 0; }
html.cinema .page-stage { padding: 0; }
/* .page-view.active 的 rise 动画带 fill-mode: both，残留 transform 会让 fixed 相对它定位。 */
html.cinema .page-view.active { animation: none; transform: none; }
html.cinema .workspace-grid { display: block; }

/* 顶条：沿用原来的白底 topbar，标题区换成本次检查，右侧换成功对话开关与退出。 */
html.cinema .topbar { position: fixed; z-index: 300; inset: 0 0 auto; height: var(--cinema-bar); min-height: var(--cinema-bar); padding: 0 18px; background: rgba(255,255,255,.94); backdrop-filter: blur(18px); }
html.cinema .topbar-left { min-width: 0; gap: 16px; }
html.cinema .topbar-left > .page-heading { display: none; }
html.cinema .topbar-left > .cinema-context { display: flex; min-width: 0; align-items: center; gap: 10px; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; }
html.cinema .cinema-context b { color: var(--ink-deep); font-size: 13px; }
html.cinema .cinema-context i { width: 3px; height: 3px; flex: 0 0 auto; border-radius: 50%; background: #d4cfdc; }
html.cinema .cinema-context span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html.cinema .identity-menu { display: none; }
html.cinema .cinema-actions { display: flex; align-items: center; gap: 8px; }
html.cinema .cinema-actions button { display: flex; height: 38px; align-items: center; gap: 6px; padding: 0 14px; border-radius: 11px; font-size: 12px; font-weight: 850; }
html.cinema .cinema-actions .chat-toggle { color: var(--purple); border: 1px solid #d8d0ff; background: var(--purple-soft); }
html.cinema .cinema-actions .chat-toggle.is-on { color: #fff; border-color: transparent; background: linear-gradient(145deg, var(--purple), #8f6ce6); }
html.cinema .cinema-actions .cinema-exit { color: #553b00; background: linear-gradient(135deg, #ffdc69, var(--yellow)); box-shadow: 0 8px 18px rgba(255,201,77,.28); }

/* 画面卡：与右侧对话卡同圆角、同间距、同阴影（--cinema-gap 14px / 22px）。 */
html.cinema .capture-section { position: fixed; z-index: 200; top: calc(var(--cinema-bar) + var(--cinema-gap)); right: var(--cinema-gap); bottom: var(--cinema-gap); left: var(--cinema-gap); display: flex; min-width: 0; flex-direction: column; padding: 0; border: 0; border-radius: 22px; background: #15131f; box-shadow: var(--shadow-md); overflow: hidden; transition: right .24s ease; }
html.cinema .capture-panel[data-capture-panel="live"] { display: flex; flex: 1; min-height: 0; flex-direction: column; padding: 0; }
html.cinema .capture-panel.active { animation: none; }
html.cinema .camera-stage { flex: 1; width: auto; height: auto; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
html.cinema .stage-expand { display: none; }
html.cinema .camera-hud,
html.cinema .camera-stage.connected .camera-hud { left: 16px; right: 16px; bottom: 14px; }
html.cinema .camera-hud span { border-color: transparent; background: rgba(12,10,18,.5); }

/* 对话卡：同样的 22px 圆角与阴影，默认展开，可一键收起。 */
html.cinema .chat-panel { position: fixed; z-index: 250; top: calc(var(--cinema-bar) + var(--cinema-gap)); right: var(--cinema-gap); bottom: var(--cinema-gap); width: var(--cinema-chat); height: auto; min-height: 0; border-radius: 22px; transition: transform .24s ease, opacity .24s ease; }
html.cinema.chat-open .capture-section { right: calc(var(--cinema-gap) * 2 + var(--cinema-chat)); }
html.cinema:not(.chat-open) .chat-panel { transform: translateX(24px); opacity: 0; pointer-events: none; }
html.cinema .chat-panel > .chat-heading { padding: 12px; }

/* 小屏（笔记本单屏）放不下挤压式布局时，对话卡改为压在画面右侧。 */
@media (max-width: 1050px) {
  html.cinema { --cinema-chat: min(420px, 86vw); }
  html.cinema.chat-open .capture-section { right: var(--cinema-gap); }
  html.cinema.chat-open .chat-panel { box-shadow: var(--shadow-lg); }
}

@media (max-width: 1050px) {
  /* 窄屏只在顶条留一个品牌方块，把位置让给标题和状态芯片。 */
  .brand-name { display: none; }
  html.cinema .menu-button { display: none; }
}

/* T-028 确认并完成检查：条件清单、完成态、锁定提示与“待完成检查”步骤状态 */
.workflow-step[data-step-state="signoff"] small { color: var(--yellow-dark); }
.completion-section { border-color: #cfe8dd; background: linear-gradient(180deg, #f7fdf9, #fff); }
.completion-conditions { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.completion-conditions li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: var(--text-control); }
.completion-conditions li i { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #f2eef7; color: var(--muted); font-style: normal; font-size: 12px; }
.completion-conditions li.ready { border-color: #cfe8dd; }
.completion-conditions li.ready i { background: #e3f6ec; color: #16845f; }
.completion-jump { margin-left: auto; border: 0; background: none; color: #b4581f; font-size: 12px; text-decoration: underline; cursor: pointer; }
.completion-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.completion-actions .primary-button { min-width: 200px; }
.completion-note { margin: 0; color: var(--muted); font-size: 12px; }
.completion-done { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 12px; }
.completion-done strong { color: #16845f; }
.completion-lock-hint, .report-completion-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 9px 12px; border: 1px dashed #e6c98d; border-radius: 10px; color: #8a5b12; background: #fffaef; font-size: 13px; }
.exam-completed #doctor-note-form textarea:disabled, .exam-completed .completion-section :disabled { background: #f6f4f8; color: #8b8697; cursor: not-allowed; }
.exam-completed #chat-form textarea:disabled { background: #f6f4f8; }

/* 2026-10-26 T-036：左侧前后对比结果（时间轴图组 + 逐条要点配图 + 服务器纳入） */
.compare-limited-tag { padding: 2px 7px; border-radius: 999px; color: #8a5a00; background: #fff2cf; font-size: var(--text-label); font-weight: 800; white-space: nowrap; }
.compare-required { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border-radius: 8px; color: var(--muted); background: #f0eef5; font-size: var(--text-label); font-weight: 800; }
.comparison-reason { display: block; margin-top: 6px; color: #8c7855; font-size: var(--text-label); line-height: 1.6; }
.comparison-progress { display: grid; gap: 4px; margin-top: 12px; padding: 12px 14px; border: 1px solid #cfe3ff; border-radius: 14px; background: #f3f8ff; }
.comparison-progress strong { color: #1c5f9e; font-size: var(--text-body); }
.comparison-progress span { color: var(--muted); font-size: var(--text-supporting); line-height: 1.65; }
.comparison-result { display: grid; gap: 14px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: 16px; background: #fff; }
.comparison-result > header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.comparison-result > header strong { display: block; color: var(--ink-deep); font-size: var(--text-control); }
.comparison-result > header span { display: block; margin-top: 3px; color: var(--muted); font-size: var(--text-label); }
.comparison-included-tag { padding: 4px 9px; border-radius: 999px; color: #16845f; background: var(--mint-soft); font-size: var(--text-label); font-weight: 900; white-space: nowrap; }
.comparison-result h3 { margin: 0 0 6px; color: var(--ink-deep); font-size: var(--text-body); }
.comparison-timeline-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.comparison-shot { display: grid; gap: 4px; min-width: 0; margin: 0; }
.comparison-shot canvas { display: block; width: 100%; max-width: 240px; max-height: 180px; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 10px; background: #1b1720; }
.comparison-shot figcaption { color: var(--muted); font-size: var(--text-label); line-height: 1.45; overflow-wrap: anywhere; }
.comparison-shot-empty, .comparison-timeline-empty { display: grid; align-content: center; gap: 4px; min-height: 86px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); background: #faf9fd; font-size: var(--text-label); text-align: center; }
.comparison-timeline-empty small { font-size: var(--text-label); }
.comparison-result-summary p, .comparison-point p { margin: 0; color: var(--muted); font-size: var(--text-supporting); line-height: 1.75; }
.comparison-result-points { display: grid; gap: 10px; }
.comparison-point { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #faf9fd; }
.comparison-point > header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.comparison-point > header strong { color: var(--ink-deep); font-size: var(--text-body); }
.comparison-point-kind { padding: 2px 7px; border-radius: 999px; color: var(--purple); background: var(--purple-soft); font-size: var(--text-label); font-weight: 800; }
.comparison-point-kind.kind-appeared { color: #16845f; background: var(--mint-soft); }
.comparison-point-kind.kind-disappeared { color: var(--red); background: #ffe9e7; }
.comparison-point-kind.kind-condition { color: #8a5a00; background: #fff2cf; }
.comparison-point-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.comparison-result-risks ul, .comparison-result-limits ul, .comparison-result-review ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: var(--text-supporting); line-height: 1.7; }
.comparison-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.comparison-result-actions small { color: var(--muted); font-size: var(--text-label); }
.comparison-result-failed { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top-color: var(--red); background: #fff7f6; }
.comparison-result-failed p { margin: 4px 0; color: var(--red); font-size: var(--text-body); }
.comparison-result-failed small { color: var(--muted); font-size: var(--text-label); }
.comparison-include-note { margin: 10px 0 0; color: #8a5a00; font-size: var(--text-label); font-weight: 750; }
.comparison-shot-failed { outline: 1px dashed var(--red); }

/* T-045：左侧时间点数量、变化与计数画圈弹窗 */
.comparison-quantity-overall { margin: 0; padding: 9px 11px; border: 1px solid #e7e0ee; border-radius: 10px; color: var(--ink-deep); background: #faf7ff; font-size: var(--text-supporting); font-weight: 700; line-height: 1.6; }
.comparison-timepoint-card { display: grid; gap: 6px; min-width: 0; }
.comparison-timepoint-quantity { display: grid; gap: 3px; padding: 8px 9px; border: 1px solid #eee9f3; border-radius: 10px; background: #fbfafd; }
.comparison-quantity-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.comparison-quantity-line strong { color: var(--ink-deep); font-size: var(--text-supporting); }
.comparison-quantity-tier { padding: 1px 6px; border-radius: 6px; color: #6b4b86; background: #f0e7fb; font-size: var(--text-label); font-weight: 700; }
.comparison-timepoint-quantity small { color: var(--muted); font-size: var(--text-label); line-height: 1.5; overflow-wrap: anywhere; }
.comparison-timepoint-quantity .comparison-change { color: #8a4c12; font-weight: 600; }
.comparison-timepoint-quantity .comparison-count-button { justify-self: start; margin-top: 2px; padding: 4px 8px; font-size: var(--text-label); }
.comparison-quantity-note { margin: 8px 0 0; color: var(--muted); font-size: var(--text-label); line-height: 1.55; }
.comparison-count-dialog { width: min(980px, calc(100vw - 26px)); max-height: calc(100vh - 30px); overflow: auto; }
.comparison-count-body { display: grid; gap: 9px; padding: 14px 20px 20px; }
.comparison-count-stage { display: grid; place-items: center; border-radius: 12px; background: #17131e; overflow: hidden; }
.comparison-count-stage canvas { display: block; width: 100%; max-height: 62vh; object-fit: contain; }
.comparison-count-body .report-count-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: var(--text-label); }
.comparison-count-body .report-count-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 50%; }
.comparison-count-body strong { color: var(--ink-deep); font-size: var(--text-body); }
.comparison-count-body small { color: var(--muted); font-size: var(--text-label); }

/* ===== T-048：框内保持 b2709c6 原样，只收框与框之间的间距 =====
   这里只改页面外圈、框自身的外边距、容器 gap 与容器 padding；不动任何框内的
   padding / 圆角 / 字号 / 控件高度。顶栏保持原来的 90 px。 */
:root {
  --page-pad-top: 8px;
  --page-pad-x: 10px;
  --page-gap: 8px;
  --topbar-h: 90px;
}

.page-stage { padding: var(--page-pad-top) var(--page-pad-x) 24px; }
.page-hero { margin-bottom: var(--page-gap); }
/* report.css 的 .report-hero { margin:0 } 会压掉页面页头的下边距；只补框外间距。 */
.page-view > .page-hero { margin-bottom: var(--page-gap); }
.patient-context { margin-bottom: var(--page-gap); }
.workflow-steps { margin-bottom: var(--page-gap); }
.step-section + .step-section { margin-top: var(--page-gap); }
.workflow-dock { margin-top: var(--page-gap); }
.report-searchbar { margin-bottom: var(--page-gap); }
.report-groups { gap: var(--page-gap); }
.patient-manager {
  gap: var(--page-gap);
  min-height: calc(100vh - var(--topbar-h) - var(--page-pad-top) - 138px - var(--page-gap) - 24px);
}
.workspace-empty {
  min-height: calc(100vh - var(--topbar-h) - var(--page-pad-top) - 72px - var(--page-gap) - 24px);
}
.page-view .knowledge-categories { gap: var(--page-gap); margin: var(--page-gap) 0; }
.page-view .knowledge-tools { margin: var(--page-gap) 0; }
.page-view .knowledge-grid { gap: var(--page-gap); padding-bottom: 0; }
.page-view .training-blocks { gap: var(--page-gap); margin: 0; }
.page-view .management-grid {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--page-gap);
  padding: 0;
}
.workspace-resizer, .chat-panel { top: calc(var(--topbar-h) + var(--page-pad-top)); }

/* T-046 的状态条和采集卡提示保留；框内 .task-feedback 基类恢复 b2709c6。 */
#workspace-feedback { display: flex; align-items: center; margin: 0 0 8px; padding: 5px 12px; min-height: 30px; font-size: 12.5px; line-height: 1.4; }
#workspace-feedback .feedback-content { display: block; width: 100%; min-width: 0; }
#workspace-feedback .feedback-text { display: inline; margin-top: 0; color: #625b6d; }
#workspace-feedback .feedback-sep { display: inline; margin: 0 6px; color: var(--subtle); }
#workspace-feedback .feedback-loading { display: inline-flex; align-items: center; gap: 6px; margin-top: 0; color: #625b6d; }
#workspace-feedback .feedback-spinner { width: 8px; height: 8px; flex: 0 0 auto; border: 2px solid rgba(113,87,232,.22); border-top-color: var(--purple); border-radius: 50%; animation: feedback-spin .8s linear infinite; }
#workspace-feedback button { min-height: 28px; margin: 0 0 0 4px; padding: 0 6px; border: 0; background: transparent; color: #51416f; font-size: 12.5px; line-height: 1.2; text-decoration: underline; cursor: pointer; vertical-align: middle; }
@keyframes feedback-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .feedback-spinner { animation: none; } }
.device-gate-banner {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  padding: 6px 10px;
  border: 1px solid #f0d8a8;
  background: #fff8e8;
  border-radius: 8px;
  color: #7a5a17;
  font-size: 12.5px;
  line-height: 1.4;
}
.device-gate-banner > span { min-width: 0; }
.device-gate-banner .secondary-button { min-height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12px; }

@media (max-width: 1180px) {
  .page-view .management-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .page-stage { padding: var(--page-pad-top) 8px 20px; }
}
@media (max-width: 560px) {
  .page-stage { padding: var(--page-pad-top) 8px; }
}

/* T-054：比较成功即写入报告的状态条、就绪清单提醒和禁用按钮。 */
.comparison-report-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 10px 12px; border: 1px solid #bfe7d2; border-radius: 10px; color: #146e50; background: #eaf8f1; }
.comparison-report-status > div { display: grid; min-width: 0; gap: 2px; }
.comparison-report-status strong { font-size: var(--text-body); }
.comparison-report-status small { color: #4d6d60; font-size: var(--text-label); line-height: 1.55; }
.comparison-report-status.is-excluded { border-color: #f3d58a; color: #8a5a00; background: #fff8e5; }
.comparison-report-status.is-excluded small { color: #8c7855; }
.comparison-report-status .secondary-button { flex: 0 0 auto; min-height: 32px; }
.comparison-ai-bar [data-compare-analyze]:disabled { color: #76717d; background: #d6d2db; box-shadow: none; opacity: 1; cursor: not-allowed; }
.comparison-readiness-warning { color: #ffe4a3 !important; background: rgba(255,201,77,.14) !important; }
.comparison-readiness-warning i { background: var(--yellow) !important; }
