
        /* ============ CONPASS design tokens ============ */
        :root {
            --ink: #1f2430;
            --ink-soft: #626976;
            --ink-faint: #7c8390;
            --bg: #f6f7f9;
            --bg-2: #f0f2f6;
            --surface: #ffffff;
            --surface-raised: #ffffff;
            --line: rgba(31, 36, 48, .10);
            --line-strong: #a9c4ea;
            --primary: #2f6fd0;
            --primary-strong: #1b4a9c;
            --primary-soft: #eef4fd;
            --primary-softer: #f4f7fc;
            --accent: #2f6fd0;
            --sel: #2f6fd0;
            --warm: #96520a;
            --ok: #0b6e63;
            --ok-soft: #e7f6f3;
            --danger: #b42335;
            --danger-soft: #fff0f2;
            --radius-sm: 12px;
            --radius: 16px;
            --radius-lg: 16px;
            --shadow-sm: 0 1px 2px rgba(31, 36, 48, .04);
            --shadow-md: none;
            --shadow-lg: 0 12px 36px rgba(31, 36, 48, .10);
            --font-sans: 'Noto Sans SC', 'Archivo', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
            --font-tech: var(--font-sans);
            --ease: cubic-bezier(.4, 0, .2, 1);
        }

        * { box-sizing: border-box; }
        html { -webkit-text-size-adjust: 100%; }

        body {
            font-family: var(--font-sans);
            background-color: var(--bg);
            margin: 0;
            min-height: 100vh;
            color: var(--ink);
            -webkit-font-smoothing: antialiased;
            text-rendering: optimizeLegibility;
        }

        :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
        h1, h2 { font-family: var(--font-tech); letter-spacing: -.025em; }
        h3, h4 { letter-spacing: 0.01em; }

        /* ============ Sidebar ============ */
        .sidebar {
            background: var(--surface);
            border-right: 1px solid var(--line);
            color: var(--ink-soft);
            flex-shrink: 0;
        }
        .sidebar-nav a { color: var(--ink-soft); transition: background-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease); }
        .sidebar-nav a:hover { background: var(--primary-softer); color: var(--primary-strong); }
        .sidebar-nav a.active {
            background: var(--primary);
            color: #fff;
            font-weight: 600;
            box-shadow: none;
        }

        /* ============ Card ============ */
        .glass-card {
            position: relative;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: var(--radius);
            box-shadow: var(--shadow-md);
        }
        /* ============ Preconsult progress ============ */
        .pc-bar-done { background: var(--primary); }
        .pc-bar-current { background: var(--accent); opacity: .75; }
        .pc-bar-pending { background: var(--bg-2); }
        .pc-label-done { color: var(--primary-strong); font-weight: 600; }
        .pc-label-current { color: var(--primary); }
        .pc-label-pending { color: var(--ink-faint); }

        /* ============ Form ============ */
        label { font-weight: 500; color: var(--ink-soft); }

        .number-input-container { position: relative; }
        .field-input {
            width: 100%;
            padding: 0.55rem 0.75rem;
            padding-right: 2.6rem;
            background: var(--surface-raised);
            border: 1px solid var(--line);
            border-radius: var(--radius-sm);
            color: var(--ink);
            font-size: 0.95rem;
            min-height: 44px;
            transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
        }
        .field-input:hover { border-color: var(--line-strong); }
        .field-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,208,.10); }
        .number-input-buttons {
            position: absolute; right: 1px; top: 1px; bottom: 1px;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            background: var(--bg); border-left: 1px solid var(--line); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
        }
        .number-input-buttons button {
            width: 1.4rem; height: 50%; color: var(--ink-soft);
            display: flex; align-items: center; justify-content: center;
            font-weight: 600; line-height: 1; transition: background-color .14s var(--ease), color .14s var(--ease);
        }
        .number-input-buttons button:hover { background: var(--primary-softer); color: var(--primary-strong); }
        .number-input-buttons button:first-child { border-bottom: 1px solid var(--line); border-radius: 0 var(--radius-sm) 0 0; }
        .number-input-buttons button:last-child { border-radius: 0 0 var(--radius-sm) 0; }

        .field-select {
            width: 100%;
            padding: 0.55rem 2rem 0.55rem 0.75rem;
            background: var(--surface-raised);
            border: 1px solid var(--line);
            border-radius: var(--radius-sm);
            color: var(--ink);
            font-size: 0.95rem;
            min-height: 44px;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23626976' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 0.7rem center;
            transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
        }
        .field-select option { background: var(--surface); color: var(--ink); }
        .field-select:hover { border-color: var(--line-strong); }
        .field-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,208,.10); }
        .field-error { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(180,35,53,.10) !important; }

        /* ============ Stepper / Segmented / Radio ============ */
        .stepper {
            display: flex;
            align-items: stretch;
            border: 1px solid var(--line);
            border-radius: var(--radius-sm);
            background: var(--surface-raised);
            overflow: hidden;
            transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
        }
        .stepper:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,208,.10); }
        .step-btn {
            width: 26px;
            flex-shrink: 0;
            color: var(--ink-soft);
            background: var(--bg);
            font-size: 1.2rem;
            font-weight: 600;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color .14s var(--ease), color .14s var(--ease);
            margin: 0 3px;
        }
        .step-btn:hover { background: var(--primary-softer); color: var(--primary-strong); }
        .step-input {
            flex: 1;
            min-width: 0;
            background: transparent;
            border: none;
            color: var(--ink);
            text-align: center;
            padding: 0.55rem 0.5rem;
            font-size: 0.95rem;
            min-height: 44px;
        }
        .step-input:focus { outline: none; }
        .step-input::placeholder { color: var(--ink-faint); }

        .step-warn { border-color: var(--warm) !important; box-shadow: 0 0 0 3px rgba(150,82,10,.10) !important; }

        .seg {
            display: inline-flex;
            border: 0;
            border-radius: 999px;
            background: var(--bg-2);
            overflow: hidden;
            flex-shrink: 0;
            padding: 3px;
        }
        .seg-btn {
            padding: 6px 11px;
            color: var(--ink-soft);
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap;
            transition: background-color .14s var(--ease), color .14s var(--ease);
            min-height: 32px;
            border-radius: 999px;
        }
        .seg-btn + .seg-btn {
            border-left: 1px solid var(--line);
            border: 0;
        }
        .seg-btn.active {
            background: #fff;
            color: var(--primary-strong);
            box-shadow: 0 1px 2px rgba(31,36,48,.12);
        }

        .radio-round { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
        .radio-round input {
            appearance: none; -webkit-appearance: none;
            width: 1.15rem; height: 1.15rem;
            border: 2px solid var(--line-strong);
            border-radius: 50%;
            margin: 0;
            position: relative;
            cursor: pointer;
            transition: border-color .16s var(--ease);
        }
        .radio-round input:checked { border-color: var(--sel); }
        .radio-round input:checked::after {
            content: '';
            position: absolute; left: 50%; top: 50%;
            transform: translate(-50%, -50%);
            width: 0.6rem; height: 0.6rem;
            border-radius: 50%;
            background: var(--sel);
        }
        .radio-round input:checked ~ span { color: var(--ink); font-weight: 600; }

        /* Checkbox */
        .checkbox-label {
            display: flex;
            align-items: center;
            padding: 0.7rem 0.8rem;
            border: 1px solid var(--line);
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all .16s var(--ease);
            background: var(--surface);
            color: var(--ink);
        }
        .checkbox-label:hover { background: var(--primary-softer); border-color: var(--line-strong); }
        .checkbox-label input:checked ~ span { font-weight: 600; color: var(--primary-strong); }
        .checkbox-label input {
            appearance: none;
            width: 1.2rem; height: 1.2rem;
            border: 2px solid var(--line-strong);
            border-radius: 5px;
            margin-right: 0.7rem;
            flex-shrink: 0;
            position: relative;
            cursor: pointer;
            transition: all .16s var(--ease);
        }
        .checkbox-label input:checked { background-color: var(--primary); border-color: var(--primary); box-shadow: none; }
        .checkbox-label input:checked::after {
            content: '';
            position: absolute;
            left: 6px; top: 2px;
            width: 4px; height: 9px;
            border: solid #ffffff;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }
        .checkbox-label input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

        /* Loader */
        .loader { border: 3px solid rgba(120,150,180,.2); border-top: 3px solid var(--primary); border-radius: 50%; width: 22px; height: 22px; animation: spin .8s linear infinite;  }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        /* Result box */
        .result-box-error { background: var(--danger-soft); border-left: 4px solid var(--danger); border-radius: var(--radius-sm); }
        .result-box-success { background: var(--ok-soft); border-left: 4px solid var(--ok); border-radius: var(--radius-sm); }

        /* Content text */
        .content-text { line-height: 1.85; color: var(--ink-soft); }
        .content-text p { margin-bottom: 1rem; }
        .content-text ol { list-style-type: decimal; padding-left: 1.5rem; }
        .content-text li { margin-bottom: 0.75rem; }

        /* AI guide avatar */
        .guide-avatar { flex-shrink: 0; }

        /* ============ Buttons ============ */
        .btn-primary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.65rem 1.5rem;
            background: var(--primary);
            color: #fff;
            font-weight: 600;
            border: none;
            border-radius: var(--radius-sm);
            box-shadow: none;
            cursor: pointer;
            transition: box-shadow .18s var(--ease), filter .18s var(--ease), transform .12s var(--ease);
        }
        .btn-primary:hover { background: #255cb0; }
        .btn-primary:active { transform: translateY(1px); }
        .btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
        .btn-primary.hidden, .btn-ghost.hidden { display: none; }

        .btn-ghost {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0.55rem 1.1rem;
            background: var(--surface);
            color: var(--primary-strong);
            font-weight: 600;
            border: 1px solid var(--line-strong);
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: background-color .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
        }
        .btn-ghost:hover { background: var(--primary-softer); border-color: var(--line-strong); }

        .btn-chip {
            font-size: 0.82rem;
            padding: 0.42rem 0.85rem;
            border-radius: 999px;
            border: 1px solid var(--line-strong);
            color: var(--primary-strong);
            background: var(--surface);
            cursor: pointer;
            transition: background-color .14s var(--ease), border-color .14s var(--ease);
        }
        .btn-chip:hover { background: var(--primary-soft); border-color: var(--accent); }

        .chat-input {
            flex: 1;
            padding: 0.55rem 0.75rem;
            background: var(--surface-raised);
            border: 1px solid var(--line);
            border-radius: var(--radius-sm);
            color: var(--ink);
            font-size: 0.95rem;
            min-height: 44px;
        }
        .chat-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,208,.10); }

        .text-heading { color: var(--ink); }

        /* Semantic text helpers */
        .tx-soft { color: var(--ink-soft); }
        .tx-faint { color: var(--ink-faint); }
        .bd-line { border-color: var(--line); }

        /* Risk badges */
        .risk-high { background: var(--danger-soft); color: var(--danger); border-color: #efc5cc; }
        .risk-med { background: #fdf3e6; color: var(--warm); border-color: #f1d9b8; }
        .risk-low { background: var(--ok-soft); color: var(--ok); border-color: #b6dfd8; }

        /* The consultation surface remains quiet behind the conversation. */
        .pc-particles { display: none; }

        /* ============ Responsive & A11y ============ */
        @media (max-width: 768px) {
            .sidebar { box-shadow: var(--shadow-lg); }
        }

        @media (prefers-reduced-motion: reduce) {
            .guide-avatar, .loader { animation: none; }
            .sidebar-nav a, .btn-primary, .btn-ghost, .btn-chip { transition: none; }
        }

/* ============ 顶栏（独立页导航） ============ */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .inner { max-width: 1200px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.back { color: var(--primary-strong); text-decoration: none; font-size: .92rem; font-weight: 600; padding: 6px 10px; border-radius: var(--radius-sm); transition: background-color .16s var(--ease), color .16s var(--ease); }
.back:hover { background: var(--primary-softer); color: var(--primary); }
.tag { color: var(--ink-faint); font-size: .78rem; letter-spacing: .08em; }
/* Page content shared by assessment and consultation. */
.clinical-page { max-width: 1240px; margin: 0 auto; padding: 32px 36px 20px; }
.page-language { display: flex; justify-content: flex-end; margin-bottom: 24px; }
#language-selector { flex-wrap: wrap; row-gap: 8px; }
.page-label { display: inline-flex; padding: 5px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong); font-size: 12px; font-weight: 600; }
.page-heading { margin: 12px 0 10px; font-size: 28px; line-height: 1.45; font-weight: 750; }
.page-description { max-width: 740px; margin: 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.9; }
.assessment-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 20px; margin-top: 24px; }
.assessment-card { overflow: hidden; }
.guide-card { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px; background: #fbfcfd; border-bottom: 1px solid var(--line); }
.guide-image { width: 38px; height: 38px; object-fit: cover; border-radius: 12px; background: var(--primary-soft); }
.guide-badge { color: var(--primary-strong); font-size: 11.5px; font-weight: 600; }
.guide-greeting { display: inline; margin: 0 0 0 6px; font-size: 13.5px; font-weight: 700; letter-spacing: 0; }
.guide-message { font-size: 12.5px; line-height: 1.8; color: var(--ink-soft); margin-top: 5px; }
.form-section { padding: 22px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 14.5px; font-weight: 700; }
.form-section-number { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-strong); font: 600 11.5px ui-monospace, monospace; }
.form-section:nth-child(2) .form-section-number { background: #e7f6f3; color: #0b6e63; }
.form-section:nth-child(3) .form-section-number { background: #f1ecfd; color: #4c31a5; }
.form-section-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-section-fields > div { min-width: 0; }
.form-section-fields label.block { color: var(--ink); font-size: 13px; margin-bottom: 8px; }
.unit-field { display: flex; flex-direction: column-reverse; gap: 8px; }
.unit-field .seg { align-self: flex-start; }
.unit-field > .stepper { flex: auto; }




.step-btn { align-self: center; width: 30px; height: 30px; border-radius: 8px; margin: 0 6px; font-size: 17px; }
.step-input { font-variant-numeric: tabular-nums; }
.assessment-actions { padding: 18px 22px; border-top: 1px solid var(--line); background: #fbfcfd; }
.assessment-actions .btn-primary { min-height: 46px; }
.assessment-aside { display: flex; flex-direction: column; gap: 16px; }
.assessment-help { padding: 20px; }
.assessment-help h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.assessment-help p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--ink-soft); }
#result-container { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
#result-prob-text { color: var(--primary-strong); font-size: 17px; font-weight: 650; }
.consultation-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; margin-top: 24px; align-items: start; }
.consultation-chat { height: 600px; }
.consultation-chat-header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fbfcfd; color: var(--ink); font-size: 13.5px; font-weight: 650; }
.consultation-chat-header > span:first-child { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.chat-avatar { width: 36px; height: 36px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); border: 1px solid var(--line); }
.consultation-chat .chat-input { min-width: 0; }
.chat-bubble-assistant { border-radius: 16px 16px 16px 6px; background: #fff; border: 1px solid var(--line); color: var(--ink-soft); }
.chat-bubble-user { border-radius: 16px 16px 6px 16px; background: var(--primary-soft); color: #17427f; }
#preconsult-chat { padding: 22px; }
.consultation-composer { background: #fbfcfd; padding: 16px 20px; }
.human-model-card { position: relative; overflow: hidden; height: 430px; border: 1px solid var(--line); border-radius: var(--radius); background: #f6f8fc; }
.human-model-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: 50% 55%;
    animation: human-model-drift 6.8s ease-in-out infinite;
    will-change: transform;
}
@keyframes human-model-drift {
    0%, 100% { transform: perspective(900px) translate3d(-3px, 2px, 0) rotateY(-7deg); }
    50% { transform: perspective(900px) translate3d(3px, -4px, 0) rotateY(7deg); }
}
.human-model-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.human-model-particles i {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(103, 190, 232, 0.78);
    box-shadow: 0 0 9px 2px rgba(103, 190, 232, 0.3);
    opacity: 0;
    animation: human-particle-float var(--duration) ease-in-out var(--delay) infinite;
}
.human-model-particles i:nth-child(1) { --x: 22%; --y: 30%; --drift: 10px; --duration: 6.4s; --delay: -1.8s; }
.human-model-particles i:nth-child(2) { --x: 79%; --y: 24%; --drift: -8px; --duration: 7.2s; --delay: -4.5s; }
.human-model-particles i:nth-child(3) { --x: 18%; --y: 47%; --drift: 12px; --duration: 6.8s; --delay: -3.2s; }
.human-model-particles i:nth-child(4) { --x: 84%; --y: 43%; --drift: -11px; --duration: 7.6s; --delay: -0.8s; }
.human-model-particles i:nth-child(5) { --x: 27%; --y: 65%; --drift: 8px; --duration: 6.1s; --delay: -4.1s; }
.human-model-particles i:nth-child(6) { --x: 75%; --y: 70%; --drift: -10px; --duration: 7s; --delay: -2.5s; }
.human-model-particles i:nth-child(7) { --x: 43%; --y: 18%; --drift: 7px; --duration: 6.7s; --delay: -5.1s; }
.human-model-particles i:nth-child(8) { --x: 62%; --y: 35%; --drift: -7px; --duration: 7.4s; --delay: -1.2s; }
.human-model-particles i:nth-child(9) { --x: 31%; --y: 43%; --drift: 9px; --duration: 6.5s; --delay: -3.8s; }
.human-model-particles i:nth-child(10) { --x: 70%; --y: 55%; --drift: -9px; --duration: 7.1s; --delay: -0.4s; }
.human-model-particles i:nth-child(11) { --x: 20%; --y: 82%; --drift: 11px; --duration: 7.8s; --delay: -2.9s; }
.human-model-particles i:nth-child(12) { --x: 82%; --y: 86%; --drift: -8px; --duration: 6.9s; --delay: -5.6s; }
@keyframes human-particle-float {
    0% { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.65); }
    25% { opacity: 0.65; }
    75% { opacity: 0.35; }
    100% { opacity: 0; transform: translate3d(var(--drift), -34px, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .human-model-image, .human-model-particles i { animation: none; }
    .human-model-particles i { opacity: 0; }
}
.human-model-caption { position: absolute; top: 16px; left: 18px; color: var(--ink-soft); font-size: 12px; pointer-events: none; }
#human3d-panel { width: auto; }
#preconsult-summary-content { font-size: 13px; line-height: 1.9; }
@media (max-width: 1180px) {
    .assessment-grid, .consultation-grid { grid-template-columns: minmax(0, 1fr); }
    .assessment-aside { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
    #human3d-panel { display: none; }
}
@media (max-width: 600px) {
    .clinical-page { padding: 22px 16px 12px; }
    .page-language { margin-bottom: 22px; }
    .page-heading { font-size: 23px; }
    .guide-card, .form-section, .assessment-actions, .assessment-help { padding: 18px; }
    .guide-greeting { display: block; margin: 3px 0 0; line-height: 1.7; }
    .assessment-grid, .consultation-grid { margin-top: 20px; gap: 16px; }
    .form-section-fields { grid-template-columns: minmax(0, 1fr); }
    .form-section-fields.bp-fields { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .assessment-aside { display: flex; }

    .step-input { padding: 10px 2px; min-width: 0; }
    .consultation-chat { height: 580px; }
    #preconsult-chat { padding: 16px; }
    .consultation-composer { padding: 14px; }
    #preconsult-progress { padding: 12px; }
    #preconsult-input-row { flex-wrap: wrap; }
    #preconsult-input { width: 0; min-width: 120px; }
    #preconsult-send-btn { padding-left: 16px; padding-right: 16px; }
}
