.real-patient-hero { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(250px,.65fr); gap:24px; align-items:stretch; }
.real-patient-hero h1 { margin-bottom:8px; }
.real-patient-banner { color:#365047; background:#edf5ef; border:1px solid #d5e7d9; border-radius:10px; padding:12px 14px; line-height:1.5; }
.real-patient-avatar { min-height:260px; display:grid; place-items:center; text-align:center; overflow:hidden; background:linear-gradient(145deg,#dfece7,#f6f2ea); }
.real-patient-avatar svg { width:190px; height:210px; filter:drop-shadow(0 12px 12px #36504722); }
.real-patient-avatar .rp-mouth { transform:scaleY(var(--rp-mouth,.25)); transform-origin:100px 122px; }
.real-patient-avatar[data-emotion="anxious"] .rp-eyes { transform:translateY(-2px); }
.real-patient-avatar[data-emotion="calm"] .rp-mouth { fill:#a95858; }
.real-patient-avatar[data-emotion="confused"] .rp-eyes { transform:rotate(4deg); transform-origin:100px 90px; }
.real-patient-state { display:flex; justify-content:center; gap:7px; flex-wrap:wrap; margin-top:10px; }
.real-patient-consent { margin-top:18px; padding:18px; border:1px solid var(--line,#d9e2df); border-radius:10px; background:#fbfdfb; }
.real-patient-consent .check-field { margin:10px 0; }
.real-patient-controls { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:18px; }
.real-patient-status { margin:12px 0 0; font-size:13px; color:var(--muted,#697572); }
.real-patient-status[data-state="active"] { color:#176247; font-weight:600; }
.real-patient-status[data-state="error"] { color:#a63c36; font-weight:600; }
.real-patient-camera { width:160px; border-radius:10px; background:#192b25; margin-top:14px; }
.real-patient-camera[hidden] { display:none; }
.real-patient-timeline li { display:grid; grid-template-columns:96px 1fr; gap:12px; padding:12px 0; border-bottom:1px solid var(--line,#d9e2df); }
.real-patient-timeline code { font-size:11px; color:var(--muted,#697572); word-break:break-all; }
.real-patient-proposals { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px; }
.real-patient-proposal { border:1px solid var(--line,#d9e2df); border-radius:10px; padding:14px; background:#fff; }
.real-patient-proposal h3 { margin:0 0 8px; font-size:15px; }
.real-patient-proposal p { margin:7px 0; font-size:13px; line-height:1.5; }
.real-patient-proposal .badge { display:inline-block; }
.real-patient-review textarea { min-height:88px; }
.real-patient-review .criteria-row { padding:14px 0; border-top:1px solid var(--line,#d9e2df); }
.rp-source-details { margin-top:10px; font-size:12px; color:#596a63; }
.rp-source-details summary { cursor:pointer; }
.rp-source-details pre { max-height:220px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; }
.real-patient-timeline .rp-technical { display:block; }
.real-patient-timeline { max-height:560px; overflow:auto; padding-right:8px; }
.real-patient-timeline li:focus { outline:2px solid #3c7b65; outline-offset:-2px; }
.real-patient-avatar[data-emotion="concerned"] svg { transform:rotate(-2deg); }
.real-patient-avatar[data-emotion="confused"] svg { transform:rotate(3deg); }
.rp-profile-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.rp-profile-heading h2 { margin:2px 0 6px; }
.rp-profile-heading p { margin:0; }
.rp-profile-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:16px; }
.rp-profile-grid section, .rp-history { border-top:1px solid var(--line,#d9e2df); padding-top:12px; }
.rp-profile-grid h3, .rp-history summary { margin:0 0 8px; font-size:14px; font-weight:700; }
.rp-profile-list { list-style:none; padding:0; margin:0; }
.rp-profile-list > li { padding:9px 0; border-bottom:1px solid var(--line,#d9e2df); line-height:1.45; }
.rp-profile-list > li:last-child { border-bottom:0; }
.rp-history { margin-top:16px; }
.rp-history summary { cursor:pointer; }
.rp-encounter { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.rp-encounter > div { min-width:0; }
.rp-encounter > button { flex-shrink:0; }
.rp-encounter p { margin:5px 0 0; font-size:13px; }
#rp-report section { border-top:1px solid var(--line,#d9e2df); padding:12px 0 0; margin-top:12px; }
#rp-report h3 { font-size:14px; margin:0 0 5px; }
.rp-followups { display:grid; gap:14px; }
.rp-followup { border:1px solid var(--line,#d9e2df); border-radius:10px; padding:14px; background:#fff; }
.rp-followup.is-overdue { border-color:#b7554c; background:#fff8f6; }
.rp-followup-heading { display:flex; gap:8px; flex-wrap:wrap; }
.rp-overdue { color:#8f3029; background:#fde7e3; }
.rp-followup blockquote { margin:12px 0; padding:9px 12px; border-left:3px solid #3c7b65; background:#f6faf8; }
.rp-followup-form { display:grid; gap:10px; margin-top:14px; padding-top:14px; border-top:1px solid var(--line,#d9e2df); }
.rp-followup-form textarea { min-height:64px; }
.rp-followup-evidence { border:1px solid var(--line,#d9e2df); border-radius:8px; padding:10px; }
.rp-followup-evidence .check-field { display:flex; gap:8px; margin:8px 0; align-items:flex-start; }
.rp-followup-receipts { margin-top:10px; padding:10px; border-radius:8px; background:#f6faf8; font-size:13px; }
.rp-followup-receipts ul { margin:7px 0 0; padding-left:18px; }
.rp-followup-history { margin-top:14px; font-size:13px; }
.rp-followup-history summary { cursor:pointer; }
.rp-followup-history ul { padding-left:18px; }
#rp-review .criteria-row { border-top:1px solid #d9e2df; padding:14px 0; }
#rp-review textarea { min-height:80px; }
@media (max-width:860px) { .real-patient-hero, .rp-profile-grid { grid-template-columns:1fr; } .real-patient-avatar { min-height:190px; } }
#rp-coaching > h2 { margin-bottom:6px; }
.rp-coaching-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:14px; margin-top:14px; }
.rp-coaching-card, .rp-coaching-comparison { border:1px solid var(--line,#d9e2df); border-radius:10px; padding:15px; background:#fff; }
.rp-coaching-card h3, .rp-coaching-card h4, .rp-coaching-comparison h4 { margin:0 0 7px; }
.rp-coaching-card section { border-top:1px solid var(--line,#d9e2df); margin-top:11px; padding-top:10px; }
.rp-coaching-card section h4 { font-size:13px; }
.rp-coaching-card p { line-height:1.5; }
.rp-coaching-evidence blockquote, .rp-coaching-side blockquote { margin:8px 0 0; padding:9px 12px; border-left:3px solid #3c7b65; background:#f6faf8; white-space:pre-wrap; }
.rp-coaching-unassessed, .rp-coaching-comparisons { margin-top:18px; border-top:1px solid var(--line,#d9e2df); padding-top:14px; }
.rp-coaching-comparison { margin-top:12px; }
.rp-coaching-sides { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.rp-coaching-side { padding:12px; background:#f8fbfa; border-radius:8px; }
.rp-coaching-side h4 { font-size:14px; }
.rp-review-amend { margin-top:18px; border-top:1px solid var(--line,#d9e2df); padding-top:14px; }
.rp-review-amend summary, .rp-review-versions summary { cursor:pointer; font-weight:700; }
.rp-review-amend form { display:grid; gap:12px; margin-top:12px; }
.rp-coaching-override { border:1px solid var(--line,#d9e2df); border-radius:8px; margin:10px 0; padding:10px; }
.rp-coaching-override textarea { min-height:58px; }
.rp-review-versions { margin-top:18px; border-top:1px solid var(--line,#d9e2df); padding-top:14px; }
.rp-report-version-view { margin-top:10px; padding:12px; border-radius:8px; background:#f6faf8; }
@media (max-width:620px) { .rp-coaching-sides { grid-template-columns:1fr; } }
.rp-memory-search,.rp-memory-correction { display:grid; gap:10px; margin:14px 0; padding-top:14px; border-top:1px solid var(--line,#d9e2df); }
.rp-memory-list { padding-left:18px; }
.rp-memory-list li { margin:10px 0; line-height:1.45; }
#rp-memory details { margin-top:12px; }
#rp-memory summary { cursor:pointer; font-weight:700; }

.rp-memory-list .text-link { background:transparent; border:0; padding:0; color:var(--accent,#176b63); font:inherit; text-align:left; text-decoration:underline; cursor:pointer; white-space:pre-wrap; }
.rp-memory-list small { color:var(--muted,#516b70); }
.rp-case-catalog { margin-bottom:18px; }
.rp-case-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr)); gap:12px; }
.rp-case-card { border:1px solid var(--line,#d9e2df); border-radius:10px; padding:14px; background:#fff; }
.rp-case-card.is-selected { border-color:#3c7b65; box-shadow:0 0 0 2px #3c7b6522; }
.rp-case-card h3 { margin:0 0 6px; }
.rp-case-card p { font-size:13px; line-height:1.45; }
.rp-case-meta { margin-top:12px; }
.rp-case-card > button { display:flex; margin-top:12px; max-width:100%; }
.rp-case-title { margin:0 0 6px; font-weight:600; color:var(--muted,#697572); }
#rp-shadow { min-width: 0; overflow-wrap: anywhere; }
#rp-shadow section { margin-top: 24px; }
#rp-shadow .rp-shadow-switches { min-inline-size: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 12px 24px; }
#rp-shadow .rp-shadow-switches legend { padding: 0 6px; font-weight: 600; }
#rp-shadow .rp-shadow-switches .check-field { margin: 4px 0; }
#rp-shadow ol { padding-left: 24px; }
#rp-shadow li { margin: 10px 0; }
#rp-shadow details { min-width: 0; margin: 8px 0; }
#rp-shadow summary { cursor: pointer; color: var(--brand); }
#rp-shadow .rp-shadow-detail { max-height: 320px; max-width: 100%; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper, #f7faf8); font-size: 12px; line-height: 1.6; }
