:root {
	color-scheme: light dark;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
	margin: 0;
	background: #f6f7fb;
	color: #1f2937;
}

.site-bar {
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	margin: -24px -16px 16px;
	padding: 10px 16px;
}

.site-bar-inner {
	max-width: 960px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 13px;
}

.site-bar-brand {
	color: #2563eb;
	text-decoration: none;
	font-weight: 600;
}

.site-bar-brand:hover {
	text-decoration: underline;
}

.site-bar-session {
	color: #4b5563;
}

.site-bar-session a {
	color: #2563eb;
}

.trust-strip {
	margin: 0 0 14px;
	padding: 10px 12px;
	font-size: 12px;
	line-height: 1.45;
	color: #92400e;
	background: #fef3c7;
	border: 1px solid #fcd34d;
	border-radius: 8px;
}

.trust-strip strong {
	color: #78350f;
}

.container {
	max-width: 960px;
	margin: 24px auto;
	padding: 0 16px 40px;
}

h1 {
	margin: 0 0 8px;
	font-size: 28px;
}

.sub {
	margin: 0 0 20px;
	color: #4b5563;
}

.panel {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 16px;
	margin-bottom: 14px;
}

.panel h2 {
	font-size: 18px;
	margin: 0 0 12px;
}

.grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.grid-1 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 14px;
}

select,
input,
textarea {
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
	background: #fff;
	color: #111827;
}

textarea {
	resize: vertical;
	min-height: 90px;
}

.fields-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px;
}

.progress-line {
	display: grid;
	gap: 8px;
	margin-bottom: 12px;
}

#progressText {
	font-size: 13px;
	color: #4b5563;
}

.progress-bar {
	height: 10px;
	background: #e5e7eb;
	border-radius: 999px;
	overflow: hidden;
}

#progressFill {
	display: block;
	height: 100%;
	width: 0%;
	background: #2563eb;
	transition: width 0.2s ease;
}

.step-card {
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 12px;
}

.chat-thread {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f8fafc;
	padding: 12px;
	min-height: 180px;
	max-height: 360px;
	overflow: auto;
	display: grid;
	gap: 10px;
	margin-bottom: 10px;
}

.bubble {
	max-width: 86%;
	padding: 10px 12px;
	border-radius: 12px;
	line-height: 1.5;
	font-size: 14px;
}

.bubble.assistant {
	background: #e0edff;
	color: #1e3a8a;
	justify-self: start;
	border: 1px solid #bfdbfe;
}

.bubble.user {
	background: #d1fae5;
	color: #065f46;
	justify-self: end;
	border: 1px solid #86efac;
}

.bubble-desc {
	color: #475569;
	font-size: 12px;
}

.chat-composer {
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	padding: 10px;
	background: #fff;
	margin-bottom: 10px;
}

.chat-free-input {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px;
	background: #f8fafc;
	margin-bottom: 10px;
}

.file-dropzone {
	border: 1px dashed #94a3b8;
	border-radius: 10px;
	padding: 10px;
	background: #fff;
	margin-bottom: 10px;
}

.file-dropzone.dragover {
	border-color: #2563eb;
	background: #eff6ff;
}

.file-drop-title {
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
}

.file-drop-sub {
	font-size: 12px;
	color: #64748b;
	margin-top: 4px;
	margin-bottom: 8px;
}

.pending-files {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.file-card {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 999px;
	background: #e2e8f0;
	color: #0f172a;
	font-size: 12px;
	border: 1px solid #cbd5e1;
}

.file-card button {
	background: #475569;
	padding: 3px 8px;
	font-size: 11px;
	border-radius: 999px;
}

.upload-review {
	border: 1px solid #93c5fd;
	border-radius: 10px;
	padding: 10px;
	background: #eff6ff;
	margin-bottom: 10px;
}

.upload-review-title {
	font-size: 13px;
	font-weight: 600;
	color: #1e3a8a;
	margin-bottom: 8px;
}

.upload-review-list {
	display: grid;
	gap: 6px;
	margin-bottom: 10px;
}

.upload-review-item {
	font-size: 12px;
	color: #0f172a;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 6px 8px;
}

.option-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.option-btn {
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	padding: 8px 12px;
	font-size: 13px;
	background: #f1f5f9;
	color: #0f172a;
	cursor: pointer;
}

.option-btn.selected {
	background: #dbeafe;
	border-color: #60a5fa;
	color: #1d4ed8;
}

.confirm-btn {
	margin-top: 10px;
}

.composer-tip {
	font-size: 13px;
	color: #64748b;
}

.step-title {
	font-weight: 600;
	margin-bottom: 8px;
}

.step-desc {
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 10px;
}

.hint {
	margin: 0 0 10px;
	font-size: 13px;
	color: #6b7280;
}

.hidden {
	display: none;
}

.button-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.feedback-actions {
	margin-top: 10px;
}

.feedback-actions:empty {
	display: none;
}

button {
	border: none;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 14px;
	background: #2563eb;
	color: #fff;
	cursor: pointer;
}

button.ghost {
	background: #6b7280;
}

button.subtle {
	background: #334155;
}

.feedback {
	padding: 12px;
	border-radius: 8px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	line-height: 1.6;
}

.feedback.error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.feedback.success {
	background: #f0fdf4;
	border-color: #bbf7d0;
	color: #166534;
}

pre {
	margin: 0;
	background: #111827;
	color: #e5e7eb;
	padding: 12px;
	border-radius: 8px;
	overflow: auto;
	font-size: 12px;
}

/* ---------- 相似病友推荐（演示） ---------- */

.peer-chat-link-row {
	margin: 6px 0;
	line-height: 1.45;
}

.peer-chat-link-row a {
	font-weight: 600;
}

.peer-recommend-list {
	display: grid;
	gap: 10px;
	margin-top: 12px;
}

.peer-card-wrap {
	display: grid;
	gap: 8px;
}

.peer-timeline-page-link {
	font-size: 13px;
	font-weight: 600;
	color: #1d4ed8;
	text-decoration: underline;
	padding-left: 2px;
}

.peer-timeline-page-link:hover {
	color: #1e40af;
}

a.forum-ext-link {
	display: block;
	width: 100%;
	text-align: left;
	text-decoration: none;
	color: inherit;
	padding: 6px 8px;
	border-radius: 8px;
	border: 1px solid transparent;
	cursor: pointer;
	font: inherit;
}

a.forum-ext-link:hover {
	border-color: #fde68a;
	background: #fffbeb;
}

.peer-card {
	text-align: left;
	width: 100%;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid #e5e7eb;
	background: #fff;
	cursor: pointer;
	display: grid;
	gap: 4px;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.peer-card:hover {
	border-color: #93c5fd;
	box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
}

.peer-card-name {
	font-weight: 700;
	font-size: 15px;
	color: #0f172a;
}

.peer-card-sim {
	font-size: 12px;
	color: #2563eb;
	font-weight: 600;
}

.peer-card-bio {
	font-size: 13px;
	color: #64748b;
	line-height: 1.45;
}

.peer-detail h3 {
	margin: 0 0 10px;
	font-size: 17px;
}

.peer-detail .peer-tagline {
	font-size: 13px;
	color: #64748b;
	margin-bottom: 14px;
}

.profile-facts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 8px;
	margin-bottom: 18px;
}

.profile-fact {
	font-size: 12px;
	padding: 8px 10px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}

.profile-fact b {
	display: block;
	color: #475569;
	font-size: 11px;
	margin-bottom: 2px;
}

.timeline-block {
	margin-bottom: 18px;
}

.timeline-block h4 {
	margin: 0 0 10px;
	font-size: 14px;
	color: #1e293b;
}

.timeline {
	margin: 0;
	padding: 0;
	list-style: none;
	border-left: 3px solid #e2e8f0;
	padding-left: 14px;
}

.timeline li {
	position: relative;
	padding-bottom: 14px;
	font-size: 13px;
	color: #334155;
	line-height: 1.45;
}

.timeline li::before {
	content: '';
	position: absolute;
	left: -18px;
	top: 4px;
	width: 9px;
	height: 9px;
	border-radius: 999px;
	background: #2563eb;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px #cbd5e1;
}

.timeline time {
	display: block;
	font-size: 11px;
	color: #64748b;
	font-weight: 600;
	margin-bottom: 2px;
}

.timeline-clinical .timeline-title {
	font-weight: 600;
	color: #0f172a;
}

.timeline-forum button {
	display: block;
	width: 100%;
	text-align: left;
	margin: 0;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px dashed #94a3b8;
	background: #fffbeb;
	color: #92400e;
	font-size: 13px;
	cursor: pointer;
	line-height: 1.4;
}

.timeline-forum button:hover {
	border-color: #f59e0b;
	background: #fff7ed;
}

.timeline-forum .forum-kind {
	font-size: 11px;
	color: #b45309;
	font-weight: 600;
	margin-bottom: 4px;
}

.post-detail-thread {
	display: grid;
	gap: 12px;
}

.post-detail-thread > header .board {
	font-size: 12px;
	color: #64748b;
	margin-bottom: 4px;
}

.post-detail-thread > header h3 {
	margin: 0;
	font-size: 16px;
}

.post-detail-thread .external-topic {
	font-size: 13px;
	margin-top: 8px;
}

.post-card {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 10px 12px;
	background: #fafafa;
	font-size: 13px;
	line-height: 1.5;
}

.post-card-meta {
	font-size: 11px;
	color: #64748b;
	margin-bottom: 6px;
}

.modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(15, 23, 42, 0.45);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 12px;
	overflow-y: auto;
}

.modal-backdrop.hidden {
	display: none;
}

.modal-sheet {
	width: 100%;
	max-width: 560px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
	max-height: calc(100vh - 48px);
	display: flex;
	flex-direction: column;
	margin-bottom: 24px;
}

.modal-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.modal-toolbar .modal-back {
	flex: 0 0 auto;
}

.modal-toolbar .modal-close {
	margin-left: auto;
}

.modal-body {
	padding: 14px 16px 18px;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
}
