:root {
    --navy: #17324d;
    --navy-deep: #10263b;
    --blue: #2f73d9;
    --teal: #2b9a8b;
    --gold: #c58a2a;
    --violet: #7259bd;
    --paper: #f4f7f9;
    --surface: #ffffff;
    --text: #1b2b3a;
    --muted: #687887;
    --line: #dce4ea;
    --shadow: 0 18px 50px rgba(32, 59, 83, 0.09);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: 252px;
    flex-direction: column;
    padding: 28px 20px 22px;
    color: #eef6fb;
    background: linear-gradient(165deg, var(--navy-deep), var(--navy));
    box-shadow: 12px 0 35px rgba(15, 38, 58, 0.12);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 13px;
    background: rgba(255,255,255,.1);
    font: 700 22px/1 serif;
}
.brand strong { display: block; font-size: 16px; letter-spacing: .04em; }
.brand span { display: block; margin-top: 1px; color: #9eb3c3; font-size: 11px; letter-spacing: .12em; }

.nav-list { display: grid; gap: 7px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 11px;
    color: #bdcbd6;
    transition: .18s ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.08); transform: translateX(2px); }
.nav-item.active { color: white; background: rgba(82, 151, 221, .24); box-shadow: inset 3px 0 0 #68a7e7; }
.nav-icon { width: 20px; color: #8cbbe8; font-size: 18px; text-align: center; }

.sidebar-note { margin-top: auto; padding: 14px 10px 0; color: #9eb3c3; font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #63c8aa; box-shadow: 0 0 0 4px rgba(99,200,170,.12); }

.main-content { min-height: 100vh; margin-left: 252px; padding: 42px clamp(28px, 4vw, 68px); }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.hero-header { padding: 16px 0 6px; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .16em; }
h1 { margin: 6px 0 6px; color: var(--navy-deep); font-family: "Microsoft YaHei", sans-serif; font-size: clamp(28px, 3.3vw, 44px); line-height: 1.2; letter-spacing: -.02em; }
.page-header p { max-width: 760px; margin: 0; color: var(--muted); }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 20px; border: 0; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.button.primary { color: white; background: var(--blue); box-shadow: 0 10px 24px rgba(47,115,217,.22); }
.button.secondary { color: var(--blue); background: #edf4fd; }
.button.ghost { color: var(--navy); border: 1px solid var(--line); background: white; }
.button.danger { color: white; background: #c84747; box-shadow: 0 8px 20px rgba(200,71,71,.18); }
.header-actions, .form-actions { display: flex; align-items: center; gap: 10px; }
.compact-header h1 { font-size: clamp(27px, 3vw, 38px); }
.surface-card { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.search-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.search-bar input { min-width: min(480px, 70vw); }
.search-bar .button { min-width: 72px; white-space: nowrap; }
.text-link, .actions a { color: var(--blue); font-weight: 700; }
.actions { display: flex; gap: 14px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { padding: 12px 14px; color: var(--muted); background: #f7f9fb; font-size: 12px; text-align: left; letter-spacing: .04em; white-space: nowrap; }
.data-table td { padding: 15px 14px; border-top: 1px solid #e7edf1; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfdff; }
.code-label { color: var(--navy); font-family: Consolas, monospace; font-size: 12px; }
.inline-empty { display: grid; min-height: 170px; place-content: center; gap: 4px; color: var(--muted); text-align: center; }
.inline-empty strong { color: var(--navy); }

input, select, textarea {
    width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cdd8e0; border-radius: 9px;
    outline: none; color: var(--text); background: white; font: inherit; transition: border .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #6b9fe7; box-shadow: 0 0 0 3px rgba(47,115,217,.11); }
.form-layout { display: grid; gap: 18px; }
.form-section { padding: 28px 30px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 23px; }
.section-heading > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--blue); background: #edf4fd; font-size: 12px; font-weight: 800; }
.section-heading h2, .card-title, .panel-heading h2 { margin: 0; color: var(--navy); font-size: 19px; }
.section-heading p, .panel-heading p { margin: 1px 0 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; gap: 20px; }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { min-width: 0; }
.field.full-width { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; color: #425364; font-size: 13px; font-weight: 700; }
.field-error { display: block; margin-top: 5px; color: #c84242; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 48px; }
.input-suffix span { position: absolute; top: 10px; right: 12px; color: var(--muted); font-size: 13px; }
.bmi-field output { display: flex; min-height: 44px; align-items: center; padding: 10px 12px; border-radius: 9px; color: var(--blue); background: #edf4fd; font-weight: 800; }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.choice-chip { position: relative; cursor: pointer; }
.choice-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-chip span { display: flex; min-height: 44px; align-items: center; padding: 10px 12px; border: 1px solid #d5dee5; border-radius: 9px; color: #526271; background: #fbfcfd; font-size: 13px; transition: .15s; }
.choice-chip input:checked + span { border-color: #6b9fe7; color: var(--blue); background: #edf4fd; box-shadow: inset 0 0 0 1px #6b9fe7; }
.top-gap { margin-top: 20px; }
.form-actions { justify-content: flex-end; padding: 8px 0 22px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 12px; padding: 22px 24px; border: 1px solid #efc8c8; border-radius: 16px; background: #fff8f8; }
.danger-zone h2 { margin: 0 0 5px; color: #9d3434; font-size: 17px; }
.danger-zone p { margin: 0; color: #875d5d; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.profile-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; }
.profile-title { display: flex; align-items: center; gap: 16px; }
.profile-title h2 { margin: 0; color: var(--navy); }
.profile-title span { color: var(--muted); font-size: 13px; }
.avatar { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 16px; color: white; background: linear-gradient(145deg, var(--blue), #55a6ca); font-size: 24px; font-weight: 800; }
.detail-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 28px 0 0; }
.detail-list div { padding: 13px; border-radius: 10px; background: #f6f9fb; }
.detail-list dt { color: var(--muted); font-size: 11px; }
.detail-list dd { margin: 3px 0 0; color: var(--navy); font-weight: 700; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { padding: 5px 10px; border-radius: 20px; color: #217c70; background: #e9f7f4; font-size: 12px; }
.divider-title { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line); }
.history-item { display: grid; margin: 12px 0 0; }
.history-item span, .muted { color: var(--muted); font-size: 13px; }
.history-panel { margin-top: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.feature-card {
    position: relative;
    min-height: 205px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid rgba(198, 211, 220, .8);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(32, 59, 83, .14); }
.feature-card::after { content: ""; position: absolute; top: -44px; right: -42px; width: 130px; height: 130px; border-radius: 50%; background: currentColor; opacity: .07; }
.feature-index { color: currentColor; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.feature-card h2 { margin: 22px 0 7px; color: var(--navy-deep); font-size: 21px; }
.feature-card p { max-width: 480px; margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.card-link { color: currentColor; font-size: 13px; font-weight: 700; }
.accent-blue { color: var(--blue); }
.accent-green { color: var(--teal); }
.accent-gold { color: var(--gold); }
.accent-violet { color: var(--violet); }

.info-panel { display: grid; grid-template-columns: .8fr 1.5fr; gap: 34px; margin-top: 22px; padding: 26px 30px; border-radius: 18px; color: white; background: linear-gradient(120deg, #17324d, #214d6c); }
.panel-label { color: #8fc8ea; font-size: 12px; letter-spacing: .14em; }
.info-panel h2 { margin: 5px 0 0; font-size: 20px; }
.flow-list { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 0; list-style: none; color: #c9d8e3; font-size: 12px; }
.flow-list li { display: grid; min-width: 84px; gap: 7px; text-align: center; }
.flow-list span { display: grid; width: 30px; height: 30px; margin: auto; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: white; }

.empty-state { min-height: 420px; display: grid; place-content: center; justify-items: center; padding: 50px; border: 1px dashed #b9c8d3; border-radius: 18px; background: white; text-align: center; }
.empty-icon { display: grid; width: 66px; height: 66px; place-items: center; border-radius: 18px; color: var(--blue); background: #eaf2fc; font-size: 32px; }
.empty-state h2 { margin: 18px 0 4px; }
.empty-state p { margin: 0; color: var(--muted); }

/* 知识问答页尽量利用剩余视口高度，便于护士直接在系统内完成咨询。 */
.qna-page { display: flex; min-height: calc(100vh - 84px); flex-direction: column; }
.qna-header { align-items: center; margin-bottom: 18px; }
.qna-header h1 { font-size: clamp(27px, 3vw, 38px); }
.qna-embed-shell { min-height: 620px; flex: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.qna-embed-frame { display: block; width: 100%; height: 100%; min-height: 620px; border: 0; background: white; }
.qna-fallback-note { margin: 10px 4px 0; color: var(--muted); font-size: 12px; text-align: center; }
.error-summary { display: grid; gap: 2px; margin-bottom: 18px; padding: 14px 18px; border-left: 4px solid #d75858; border-radius: 8px; color: #8c3434; background: #fff0f0; }
.error-summary span { font-size: 13px; }
.assessment-form { display: grid; gap: 18px; }
.assessment-progress { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); list-style: none; }
.assessment-progress li { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 6px; color: #8a98a4; font-size: 12px; cursor: pointer; }
.assessment-progress li span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #edf1f4; font-size: 11px; font-weight: 800; }
.assessment-progress li.active { color: var(--blue); font-weight: 700; }
.assessment-progress li.active span { color: white; background: var(--blue); }
.assessment-step { padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.step-mode .assessment-step { display: none; }
.step-mode .assessment-step.active { display: block; }
.assessment-actions { position: sticky; bottom: 14px; z-index: 10; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: 0 14px 40px rgba(30,55,76,.16); backdrop-filter: blur(12px); }
.assessment-actions [data-step-label] { color: var(--muted); font-size: 12px; text-align: center; }
.question-block { padding: 20px; border: 1px solid #e2e9ee; border-radius: 13px; background: #fbfcfd; }
.question-block + .question-block { margin-top: 13px; }
.question-block h3, .confirm-card h3 { margin: 0 0 13px; color: var(--navy); font-size: 15px; }
.option-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.option-card { position: relative; cursor: pointer; }
.option-card input, .binary-choice input, .muscle-scale input, .treatment-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.option-card span { display: flex; min-height: 47px; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid #d5dfe6; border-radius: 9px; background: white; font-size: 13px; }
.option-card b { display: grid; flex: 0 0 22px; height: 22px; place-items: center; border-radius: 50%; color: #728291; background: #edf1f4; font-size: 10px; }
.option-card input:checked + span { border-color: #6b9fe7; color: var(--blue); background: #eff5fd; box-shadow: inset 0 0 0 1px #6b9fe7; }
.option-card input:checked + span b { color: white; background: var(--blue); }
.binary-choice { display: flex; gap: 10px; }
.binary-choice label { position: relative; flex: 1; cursor: pointer; }
.binary-choice span { display: grid; min-height: 52px; place-items: center; border: 1px solid #d5dfe6; border-radius: 10px; background: white; font-size: 13px; font-weight: 700; }
.binary-choice input:checked + span { border-color: var(--blue); color: var(--blue); background: #edf4fd; box-shadow: inset 0 0 0 1px var(--blue); }
.conditional-panel { margin-top: 18px; }
.conditional-panel[hidden], [data-supplement-panel][hidden], [data-psych-panel][hidden] { display: none; }
.logic-note, .supplement-title { display: flex; gap: 12px; margin-bottom: 14px; padding: 13px 15px; border-radius: 10px; color: #37657c; background: #eaf5f8; font-size: 12px; }
.logic-note strong, .supplement-title span { white-space: nowrap; }
.supplement-title { display: block; margin-top: 18px; color: #765b24; background: #fff6df; }
.supplement-title p { margin: 2px 0 0; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.symptom-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.score-panel { padding: 22px; border-radius: 14px; color: white; background: linear-gradient(125deg, #17324d, #2f73d9); }
.score-panel > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.score-panel label { font-weight: 700; }
.score-panel output { font-size: 36px; font-weight: 800; }
.score-panel input[type="range"] { width: 100%; padding: 0; border: 0; accent-color: #80d6c7; box-shadow: none; }
.score-scale { display: flex; justify-content: space-between; color: #cfe0f1; font-size: 10px; }
.muscle-scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.muscle-scale label { position: relative; cursor: pointer; }
.muscle-scale span { display: grid; min-height: 90px; place-content: center; gap: 4px; padding: 9px; border: 1px solid #d5dfe6; border-radius: 10px; background: white; text-align: center; }
.muscle-scale small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.muscle-scale input:checked + span { border-color: var(--blue); color: var(--blue); background: #edf4fd; box-shadow: inset 0 0 0 1px var(--blue); }
.scale-section { margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.scale-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; color: white; background: var(--navy); }
.scale-heading h3 { margin: 0; font-size: 15px; }
.scale-heading span { color: #bfd0dc; font-size: 11px; }
.scale-row { display: grid; grid-template-columns: 1fr 115px; align-items: center; gap: 18px; padding: 12px 16px; border-top: 1px solid #e8edf1; font-size: 13px; }
.scale-row > span { display: flex; align-items: flex-start; gap: 10px; }
.scale-row b { display: grid; flex: 0 0 22px; height: 22px; place-items: center; border-radius: 50%; color: var(--blue); background: #edf4fd; font-size: 10px; }
.scale-row select { min-height: 38px; }
.scale-error { padding: 0 16px 8px; }
.confirm-card { display: flex; align-items: center; gap: 15px; padding: 20px; border-radius: 13px; color: #245f57; background: #eaf7f4; }
.confirm-card h3 { margin-bottom: 2px; color: #245f57; }
.confirm-card p { margin: 0; font-size: 13px; }
.confirm-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: 20px; }
.field-help { display: inline-block; margin-top: 7px; color: var(--blue); font-size: 12px; font-weight: 700; }

.result-summary { display: grid; grid-template-columns: 1.2fr 1fr .75fr 1.25fr; gap: 12px; margin-bottom: 20px; }
.result-summary article { display: grid; align-content: center; min-height: 135px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.result-summary span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.result-summary strong { margin: 6px 0 2px; color: var(--navy); font-size: 19px; }
.result-summary small { color: var(--muted); }
.result-section { margin-top: 18px; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.result-section-heading { display: flex; gap: 13px; margin-bottom: 18px; }
.result-section-heading > span { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.result-section-heading h2 { margin: 0; color: var(--navy); font-size: 20px; }
.result-section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.knowledge-card { overflow: hidden; border: 1px solid #dfe7ec; border-radius: 13px; }
.knowledge-card + .knowledge-card { margin-top: 12px; }
.knowledge-card > h3 { margin: 0; padding: 14px 18px; color: white; background: var(--navy); font-size: 15px; }
.content-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.content-grid > div { padding: 16px 18px; border-right: 1px solid #e7edf1; border-bottom: 1px solid #e7edf1; }
.content-grid .wide { grid-column: 1 / -1; }
.content-grid h4, .treatment-detail h4 { margin: 0 0 5px; color: var(--blue); font-size: 12px; }
.content-grid p, .treatment-detail p { margin: 0; color: #4d5d6b; font-size: 13px; white-space: pre-line; }
.medication-warning { margin: -6px 0 15px; padding: 11px 14px; border-radius: 8px; color: #805b20; background: #fff4da; font-size: 12px; font-weight: 700; }
.treatment-list { display: grid; gap: 10px; }
.treatment-card { display: grid; grid-template-columns: 34px 1fr; padding: 17px; border: 1px solid #dfe7ec; border-radius: 12px; }
.treatment-card.informational { border-style: dashed; background: #fbfcfd; }
.treatment-check { position: relative; cursor: pointer; }
.treatment-check span { display: block; width: 22px; height: 22px; border: 2px solid #bdc9d2; border-radius: 6px; }
.treatment-check input:checked + span { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 4px white; }
.treatment-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.treatment-title h3 { margin: 0; color: var(--navy); font-size: 16px; }
.treatment-title > div { display: flex; gap: 6px; }
.level-tag, .status-tag { padding: 3px 7px; border-radius: 10px; color: #277d71; background: #e8f6f3; font-size: 10px; white-space: nowrap; }
.status-tag { color: var(--blue); background: #edf4fd; }
.population { margin: 8px 0; color: #667684; font-size: 12px; }
details summary { color: var(--blue); font-size: 12px; font-weight: 700; cursor: pointer; }
.treatment-detail { display: grid; gap: 13px; margin-top: 12px; padding: 14px; border-radius: 9px; background: #f7f9fb; }
.treatment-detail small { color: #8a98a4; }
.compact-empty { min-height: 100px; }
.sticky-save { position: sticky; bottom: 14px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px 18px; border-radius: 14px; color: white; background: rgba(20,48,72,.96); box-shadow: 0 18px 45px rgba(20,48,72,.26); }
.knowledge-layout { display: grid; grid-template-columns: 255px minmax(0, 1fr); align-items: start; gap: 20px; }
.knowledge-toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.toc-title { display: grid; margin-bottom: 13px; }
.toc-title span { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.toc-title strong { color: var(--navy); }
.knowledge-toc nav { display: grid; }
.knowledge-toc a { padding: 8px 7px; border-left: 2px solid #e2e8ed; color: #5f6f7c; font-size: 12px; line-height: 1.45; }
.knowledge-toc a:hover { border-left-color: var(--blue); color: var(--blue); background: #f4f8fd; }
.knowledge-toc a.level-3 { padding-left: 18px; color: #82909b; font-size: 11px; }
.knowledge-document { min-width: 0; padding: clamp(24px, 4vw, 54px); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.knowledge-document h1 { margin: 0 0 34px; padding-bottom: 20px; border-bottom: 1px solid var(--line); font-size: clamp(25px, 3vw, 37px); }
.knowledge-document h2 { scroll-margin-top: 24px; margin: 42px 0 15px; overflow-wrap: anywhere; color: var(--navy); font-size: 22px; }
.knowledge-document h3 { scroll-margin-top: 24px; margin: 25px 0 9px; overflow-wrap: anywhere; color: #28516f; font-size: 16px; }
.knowledge-document p { margin: 0 0 12px; color: #435563; font-family: SimSun, "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.9; white-space: pre-line; }
.knowledge-table-wrap { max-width: 100%; margin: 22px 0; overflow-x: auto; }
.knowledge-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.knowledge-table th, .knowledge-table td { min-width: 120px; padding: 10px 12px; border: 1px solid #d9e2e8; text-align: left; vertical-align: top; white-space: pre-line; }
.knowledge-table th { color: var(--navy); background: #edf4f8; }
.report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 980px; margin: 0 auto 18px; }
.report-toolbar > div { display: flex; gap: 9px; }
.report-paper { max-width: 980px; margin: 0 auto; padding: clamp(34px, 5vw, 66px); border: 1px solid #d8e0e6; background: white; box-shadow: 0 22px 60px rgba(28,52,72,.12); }
.report-title { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 15px; padding-bottom: 25px; border-bottom: 3px solid var(--navy); }
.report-brand { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 13px; color: white; background: var(--navy); font: 700 25px/1 serif; }
.report-title span { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.report-title h1 { margin: 3px 0 0; font-size: 30px; }
.report-title dl { display: grid; gap: 5px; margin: 0; font-size: 10px; }
.report-title dl div { display: grid; grid-template-columns: 54px auto; gap: 8px; }
.report-title dt { color: var(--muted); }
.report-title dd { margin: 0; color: var(--navy); font-family: Consolas, monospace; }
.report-section { margin-top: 32px; }
.report-section > h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 15px; padding-bottom: 9px; border-bottom: 1px solid #cfd9e0; color: var(--navy); font-size: 18px; }
.report-section > h2 span { color: var(--blue); font-size: 10px; letter-spacing: .1em; }
.report-info-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid #dbe3e8; border-left: 1px solid #dbe3e8; }
.report-info-grid div { padding: 10px 12px; border-right: 1px solid #dbe3e8; border-bottom: 1px solid #dbe3e8; }
.report-info-grid dt, .report-measure-list dt { color: var(--muted); font-size: 10px; }
.report-info-grid dd, .report-measure-list dd { margin: 3px 0 0; color: var(--navy); font-size: 13px; font-weight: 700; }
.report-conclusion-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.report-conclusion-grid > div { min-height: 112px; padding: 13px; border-radius: 8px; background: #f2f6f9; }
.report-conclusion-grid small { color: var(--blue); font-size: 10px; font-weight: 800; }
.report-conclusion-grid strong { display: block; margin: 5px 0 2px; color: var(--navy); font-size: 15px; }
.report-conclusion-grid p { margin: 0; color: var(--muted); font-size: 10px; }
.report-measure-list { display: grid; grid-template-columns: repeat(2, 1fr); margin: 10px 0 0; border: 1px solid #dbe3e8; }
.report-measure-list div { padding: 9px 12px; }
.report-measure-list div + div { border-left: 1px solid #dbe3e8; }
.report-syndrome { break-inside: avoid; border: 1px solid #dbe3e8; }
.report-syndrome + .report-syndrome { margin-top: 12px; }
.report-syndrome > h3 { margin: 0; padding: 10px 13px; color: white; background: var(--navy); font-size: 14px; }
.report-syndrome dl { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; }
.report-syndrome dl div { padding: 11px 13px; border-right: 1px solid #e2e8ec; border-bottom: 1px solid #e2e8ec; }
.report-syndrome dt { color: var(--blue); font-size: 10px; font-weight: 800; }
.report-syndrome dd { margin: 4px 0 0; color: #435563; font-size: 11px; line-height: 1.75; white-space: pre-line; }
.report-treatment-group { margin-top: 16px; }
.report-treatment-group > h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; padding: 7px 10px; color: var(--navy); background: #eaf1f6; font-size: 13px; }
.report-treatment-group > h3 small { color: #8a601c; }
.report-treatment-item { break-inside: avoid; padding: 12px 14px; border: 1px solid #dbe3e8; }
.report-treatment-item + .report-treatment-item { border-top: 0; }
.report-treatment-name { display: flex; align-items: center; gap: 8px; }
.report-treatment-name > span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-size: 9px; }
.report-treatment-name strong { color: var(--navy); font-size: 13px; }
.report-treatment-name small { margin-left: auto; padding: 2px 6px; border-radius: 9px; color: #277d71; background: #e8f6f3; font-size: 9px; }
.report-treatment-item p { margin: 7px 0 0; color: #4b5d6b; font-size: 11px; line-height: 1.7; white-space: pre-line; }
.report-treatment-item b { color: var(--navy); }
.report-empty { padding: 28px; border: 1px dashed #b8c6d0; border-radius: 9px; color: var(--muted); text-align: center; }
.report-empty p { margin: 2px 0 14px; font-size: 12px; }
.report-note { min-height: 70px; padding: 12px 14px; border: 1px solid #dbe3e8; }
.report-note strong { color: var(--navy); font-size: 11px; }
.report-note p { margin: 5px 0 0; color: #4b5d6b; font-size: 11px; white-space: pre-line; }
.signature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 42px; color: var(--navy); font-size: 11px; }
.signature-grid div { display: flex; align-items: flex-end; white-space: nowrap; }
.signature-grid span { width: 100%; height: 22px; border-bottom: 1px solid #8d9aa4; }
.report-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 10px; border-top: 1px solid #dbe3e8; color: #7b8994; font-size: 9px; }
.report-footer p { margin: 0; }
.report-footer span { font-family: Consolas, monospace; }
.mobile-menu { display: none; }

@media (max-width: 820px) {
    .mobile-menu { position: fixed; top: 16px; left: 16px; z-index: 40; display: block; width: 42px; height: 42px; border: 0; border-radius: 10px; color: white; background: var(--navy); font-size: 20px; }
    .sidebar { transform: translateX(-105%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 74px 18px 30px; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .danger-zone { align-items: stretch; flex-direction: column; }
    .danger-zone .button { width: 100%; }
    .qna-page { min-height: calc(100vh - 104px); }
    .qna-header .button { width: 100%; }
    .qna-embed-shell, .qna-embed-frame { min-height: 560px; }
    .feature-grid { grid-template-columns: 1fr; }
    .info-panel { grid-template-columns: 1fr; }
    .three-columns, .profile-grid { grid-template-columns: 1fr; }
    .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-list { grid-template-columns: repeat(2, 1fr); }
    .search-bar { align-items: stretch; flex-wrap: wrap; }
    .search-bar input { min-width: 100%; }
    .form-section { padding: 22px 18px; }
    .assessment-progress { grid-template-columns: repeat(5, 1fr); overflow-x: auto; }
    .assessment-progress li { min-width: 65px; flex-direction: column; text-align: center; }
    .assessment-step, .result-section { padding: 21px 17px; }
    .two-columns, .option-cards, .result-summary, .content-grid { grid-template-columns: 1fr; }
    .symptom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .muscle-scale { grid-template-columns: repeat(3, 1fr); }
    .scale-row { grid-template-columns: 1fr 90px; }
    .content-grid .wide { grid-column: auto; }
    .assessment-actions { grid-template-columns: auto 1fr auto; }
    .assessment-actions [data-submit-step] { grid-column: 3; }
    .knowledge-layout { grid-template-columns: 1fr; }
    .knowledge-toc { position: static; max-height: 260px; }
    .knowledge-document { padding: 23px 18px; }
    .report-toolbar { align-items: stretch; flex-direction: column; }
    .report-toolbar > div { flex-wrap: wrap; }
    .report-paper { padding: 25px 18px; }
    .report-title { grid-template-columns: 44px 1fr; }
    .report-title dl { grid-column: 1 / -1; }
    .report-info-grid, .report-conclusion-grid { grid-template-columns: repeat(2, 1fr); }
    .report-syndrome dl { grid-template-columns: 1fr; }
    .signature-grid { grid-template-columns: 1fr; gap: 20px; }
    .flow-list { align-items: stretch; flex-direction: column; }
    .flow-list li { grid-template-columns: 34px 1fr; align-items: center; text-align: left; }
    .flow-list span { margin: 0; }
}

@media print {
    @page { size: A4; margin: 12mm; }
    body { background: white; }
    .sidebar, .mobile-menu, .no-print, .flash-stack { display: none !important; }
    .main-content { margin: 0; padding: 0; }
    .report-paper { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
    .report-section > h2 { break-after: avoid; }
    .report-treatment-item, .report-syndrome, .report-conclusion-grid { break-inside: avoid; }
}
