.sca-engine{position:fixed;width:1px;height:1px;left:-100px;top:0;opacity:0;pointer-events:none;border:0}
#nurse-status{position:absolute;left:30px;bottom:124px;max-width:min(440px,calc(100vw - 60px));padding:15px 20px;background:#102f34e8;border:1px solid #84c4b38c;box-shadow:0 7px 30px #0a262340;text-align:left;font-size:12px;line-height:1.6;backdrop-filter:blur(14px);color:#d4f4e9}
#record-tabs{display:flex;flex-wrap:nowrap;overflow:auto;justify-content:flex-start;scrollbar-width:thin}#record-tabs button{flex:0 0 auto;white-space:nowrap}
.em-intro{border-bottom:1px solid #c4d9d4;margin:0 0 22px;padding:18px 0 8px}.em-badge{font-size:10px;letter-spacing:1.4px;color:#2a766b;font-weight:700}.em-intro p{font-size:12px;color:#4a6f69}.em-actions,.em-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 24px}.em-actions button,.em-grid>button,.em-card button,.em-ecg-callout button,#em-diagnosis button,#em-finish,#em-download{font-size:12px;line-height:1.5;color:#174c45;border:1px solid #9dbfb5;background:#e3f0e9;text-align:left;padding:12px 14px}.em-actions button:hover,.em-card button:hover,.em-grid>button:hover{background:#cce8dc}.em-card{padding:18px;border:1px solid #c3d7d0;border-radius:12px;background:#f6faf7;margin:14px 0}.em-card summary{cursor:pointer;font-weight:600;font-size:13px}.em-card h4{margin:0 0 15px;font-size:14px;line-height:1.5;display:flex;gap:8px;justify-content:space-between}.em-card h4 span{font-size:10px;border:1px solid #afcec0;border-radius:6px;padding:2px 6px;height:fit-content;color:#468774}.em-controls{display:flex;gap:12px;align-items:end;margin:15px 0;flex-wrap:wrap}.em-controls label{flex:1;min-width:110px}.em-controls label,.em-drug label,#em-diagnosis label{display:block;font-size:11px;color:#476e66}.em-controls input,.em-controls select,.em-drug select,#em-ecg-history>select,#em-dx{display:block;width:100%;padding:12px;margin-top:7px;background:white;color:#234d47;border:1px solid #b1ccc1;border-radius:7px;font:inherit;font-size:13px}.em-drug{display:flex;flex-direction:column;margin:0;gap:12px}.em-drug button{margin-top:auto}.em-drug select{max-width:100%;white-space:normal}.em-check{display:flex;align-items:flex-start;gap:9px;margin:14px 0;font-size:12px;line-height:1.5}.em-check input{margin-top:3px;accent-color:#32836b}.em-orders{list-style:none;margin:15px 0;padding:0}.em-orders li{padding:14px 0;border-bottom:1px solid #cdddd6;display:flex;flex-wrap:wrap;gap:5px 12px;font-size:12px}.em-orders li strong{width:100%;font-weight:600}.em-orders li span{color:#52766b}.em-orders li button{font-size:10px;padding:3px 9px;color:#376858}.em-ecg-callout{background:#d9ece4;border:1px solid #abd1c1;padding:5px 20px 20px;border-radius:13px;margin-bottom:18px}.em-ecg-callout p,#record-content .em-note{font-size:12px;line-height:1.65;color:#4b7065}.em-results article{padding:15px 0;border-bottom:1px solid #ccddd5}.em-results h4{font-size:14px}.em-results h4 small{float:right;font-size:11px;font-weight:400;color:#5f8074}.em-results p{font-size:13px;line-height:1.7}.em-results small{font-size:11px;color:#5f8074}.em-vitals{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.em-vitals div{background:#143e42;color:#bcf1d7;padding:16px 12px;border-radius:10px}.em-vitals dt{font-size:10px;opacity:.7}.em-vitals dd{margin:7px 0 0;font-size:22px;font-weight:650}.em-vitals small{font-size:10px}.em-score{display:flex;flex-direction:column;gap:8px;color:#266953;background:#e0f1e6;padding:25px;border-radius:14px;margin:25px 0}.em-score b{font-size:48px}.em-score small{font-size:22px;font-weight:400}.em-score span{font-size:12px}.em-rubric{list-style:none;padding:0;margin:24px 0}.em-rubric li{display:flex;gap:15px;border-bottom:1px solid #cadcd2;padding:13px 0;font-size:12px;line-height:1.5}.em-rubric b{min-width:30px;color:#2e755a}#em-dx{font-size:14px;line-height:1.7;resize:vertical;margin-bottom:14px}#em-ecg-history{margin-bottom:26px}
@media(max-width:700px){#nurse-status{left:16px;bottom:88px;max-width:calc(100vw - 32px);padding:11px 14px;font-size:10px}.em-grid,.em-actions{grid-template-columns:1fr}.em-vitals{grid-template-columns:1fr 1fr}.em-card{padding:14px}.em-controls{gap:8px}.em-controls label{min-width:120px}#record-tabs button{padding:10px 12px}}

#record-tabs{flex-wrap:wrap;overflow:visible;gap:4px}#record-tabs button{flex:1 0 auto;padding:9px 10px;font-size:11px}.em-med-group>h3{border-bottom:1px solid #c3d7d0;padding-bottom:10px}.em-med-group>h3 small{font-size:11px;color:#5a7c71;margin-left:8px}#em-med-clear{color:#225c4d;border:1px solid #afcfc0;padding:10px 16px;background:#edf7f0}#em-med-count{font-size:12px;color:#366d5d}@media(max-width:700px){#record-tabs{display:grid;grid-template-columns:repeat(3,1fr)}#record-tabs button{font-size:10px;padding:8px 4px;min-width:0}}
@media(max-width:760px),(max-height:550px){
 #record-tabs{display:flex;flex-wrap:nowrap;gap:4px;overflow:auto hidden;min-width:0;scrollbar-width:thin;overscroll-behavior-x:contain}
 #record-tabs button{flex:0 0 auto;white-space:nowrap;min-width:0;padding:8px 10px}
 #record-dialog .record-shell{min-height:0;min-width:0}#record-content .em-controls label{min-width:min(120px,100%)}
}
@media(max-height:470px){
 #record-dialog .record-identity{padding-block:4px}#record-dialog .record-head{padding-block:6px}
 #record-dialog .record-footer{padding-block:4px;gap:3px}
 #clinical-launchers{top:65px;left:auto;right:12px;max-width:54vw;flex-wrap:wrap}
 .case-label{top:62px;left:13px}.case-label h1{font-size:22px}
}

.dx-panel{max-width:48rem}.dx-heading{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.4rem 1rem}.dx-heading strong{color:#225b54}.dx-panel fieldset{border:0;margin:0;padding:0;min-width:0}.dx-panel legend{font-weight:650;line-height:1.45;margin:12px 0}.dx-option{display:flex;align-items:center;gap:10px;border:1px solid #b7cbc3;background:#f8fbf8;border-radius:8px;margin:6px 0;padding:9px 12px;cursor:pointer;line-height:1.4;overflow-wrap:anywhere}.dx-option input{flex:0 0 auto;margin:0;accent-color:#22665d}.dx-option:has(:checked){border-color:#427d70;background:#e1eee7}.dx-option:has(:disabled){cursor:default}.dx-findings{font-size:.85rem;margin:8px 0;color:#36594e}.dx-findings summary{cursor:pointer}.dx-feedback{margin-top:12px}.dx-feedback p{margin:.4em 0}

.em-crisis-alert,.em-critical-note,#nurse-status.em-danger{background:#521e26;color:#ffedef;border:1px solid #d58189}
.em-crisis-alert{display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:.5rem .85rem;font-size:.8rem}
.em-crisis-alert[hidden]{display:none}
.em-crisis-alert button{flex-shrink:0;background:#fff3ef;color:#6e1b26}
.em-critical-note{padding:.8rem 1rem;border-radius:.55rem}
.em-monitor-note{font-weight:700;color:#804c00;background:#fff1ce;padding:.5rem .8rem;border-radius:.4rem}
.em-monitor-note[data-priority=high]{background:#7e2330;color:#fff}
.em-nurse-dialog{box-sizing:border-box;width:min(27rem,calc(100vw - 2rem));max-height:85dvh;overflow:auto;padding:1.3rem;background:#f4faf8;color:#193b3d;border:1px solid #94b4ac;border-radius:.85rem}
.em-nurse-dialog header{display:flex;justify-content:space-between;align-items:center;gap:1rem}
.em-nurse-dialog h2{margin:0}.em-nurse-dialog button{min-height:44px}.em-nurse-dialog::backdrop{background:#071c229c}
.em-study-thumb{display:grid;justify-items:start;gap:.4rem;background:#14282c;color:#eef9f4;margin:.6rem 0;padding:.55rem;border-radius:.5rem;text-align:left}
.em-study-thumb img{width:min(13rem,100%);height:7rem;object-fit:contain;background:#071013;border-radius:.2rem}
.em-study-viewer{width:min(50rem,calc(100vw - 1.5rem));max-height:90dvh;box-sizing:border-box;overflow:auto;border:1px solid #426069;border-radius:.8rem;background:#102127;color:#e3f0eb;padding:1rem}
.em-study-viewer header{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.em-study-viewer h2{margin:.25rem 0}.em-study-viewer button{min-width:44px;min-height:44px}
.em-study-viewer figure{margin:.65rem 0}.em-study-viewer img{display:block;width:100%;height:min(54dvh,32rem);object-fit:contain;background:black}.em-study-viewer figcaption{font-size:.82rem;margin:.45rem 0}.em-study-viewer::backdrop{background:#071318d9}

.em-trace-pair{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:16px}
.em-trace-pair>section{min-width:0}
.em-trace-pair .ecg-result-head{flex-wrap:wrap}
#em-ecg-history>select,#em-plan select{max-width:100%}

.ward-clock{display:grid;justify-items:start;gap:5px;margin-top:8px;font-size:10px;color:#deedf1;letter-spacing:.06em}
.ward-clock[hidden]{display:none}
.ward-clock>span,.ward-clock button{background:#112b35ed;border:1px solid #658793;border-radius:6px;padding:5px 8px}
.ward-clock time,[data-ward-clock]{font-variant-numeric:tabular-nums}
.ward-clock button{pointer-events:auto;max-width:min(320px,76vw);text-align:left;font-size:11px}
@media(max-width:700px){.case-label:has(.ward-clock:not([hidden])) .ward-clock{display:flex;align-items:center;gap:3px}.ward-clock>span{white-space:nowrap}.ward-clock button{max-width:50vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

.case-results{margin:16px 0;padding:16px;border:1px solid #bdd4d5;border-radius:12px;background:#f5faf9;color:#193c43}
.case-results h3,.case-results legend{font-weight:750;color:#183e49}.case-results ol{padding:0;list-style:none}
.case-results li{display:flex;justify-content:space-between;gap:8px;padding:5px 0;border-bottom:1px solid #d2e2e0}.case-results li span{overflow-wrap:anywhere}.case-results li strong{white-space:nowrap}
.case-results form>label,.case-results textarea{display:block;width:100%;box-sizing:border-box}.case-results textarea{margin:5px 0 9px;padding:8px;border:1px solid #9cbaba;border-radius:6px;background:#fff;color:#14383f;resize:vertical}
.case-results fieldset{border:0;margin:16px 0 8px;padding:0}.brain-scale{display:flex;flex-wrap:wrap;gap:4px}
.brain-scale label{position:relative;cursor:pointer}.brain-scale input{position:absolute;opacity:0}.brain-scale span{display:grid;place-items:center;min-width:38px;height:40px;border:1px solid #afc4c4;border-radius:8px;filter:grayscale(1);font-size:19px}
.brain-scale .lit span,.brain-scale .selected span{filter:none;background:#d6f3ed}.brain-scale input:focus-visible+span,.brain-scale .selected span{outline:2px solid #087579;outline-offset:-2px}

#imaging-progress[open]{position:fixed;inset:0;margin:0;padding:clamp(16px,4vw,52px);width:100%;height:100dvh;max-width:none;max-height:none;box-sizing:border-box;display:grid;overflow:auto;border:0;border-radius:0;background:radial-gradient(ellipse at 14% 25%,#173a49,transparent 65%),#0b1926;color:#e5f2f4}
#imaging-progress::backdrop{background:#0b1926}
.imaging-card{width:min(100%,570px);box-sizing:border-box;margin:auto;text-align:center;padding:clamp(18px,4vw,44px);border:1px solid #35566a;border-top:3px solid #71d9d7;border-radius:16px;background:#112a3b}
.imaging-card header{display:flex;align-items:center;gap:12px;text-align:left;color:#9fc5d0;font-size:11px;letter-spacing:.12em}.imaging-card header b{font-size:14px;letter-spacing:0;color:#e2edef}.imaging-card header img{width:52px;filter:brightness(0) invert(1)}
.imaging-symbol svg{width:clamp(65px,12vh,104px);color:#8adfd7;margin:15px 0 5px}.imaging-kicker{color:#9cd8df;font-size:11px;letter-spacing:.2em}
.imaging-card h2{margin:8px 0;font-size:clamp(24px,4vw,38px);color:#fff}.imaging-card p:not(.imaging-kicker){color:#c3dce2;line-height:1.5}.imaging-card progress{display:block;width:100%;height:7px;accent-color:#67dcce;margin:20px 0}.imaging-card button{min-height:42px;color:#dff6f7;border-color:#61899a}

#ward-manual-ecg{overflow:auto;max-height:65dvh}
#ward-manual-ecg .manual-leads{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0}
#ward-manual-ecg .manual-leads button{min-width:36px;padding:7px 8px}
#ward-manual-ecg [aria-pressed=true]{background:#b4e8d7;color:#173d38}
#ward-manual-ecg [data-record],#ward-manual-ecg [data-remove]{margin:4px 4px 0 0}
@media(max-width:700px){#ward-manual-ecg{max-height:32dvh}}
#exit-simulation{max-width:min(92vw,420px);border:1px solid #527287;border-radius:16px;padding:22px;background:#122438;color:#f1f6fb}#exit-simulation::backdrop{background:#07101bc2}#exit-simulation form{display:flex;gap:8px;flex-wrap:wrap}#exit-simulation h2{color:inherit}

#higiene-en-curso{position:fixed;inset:auto auto max(14px,env(safe-area-inset-bottom)) 50%;transform:translateX(-50%);margin:0;width:min(92vw,460px);border:1px solid #638293;border-radius:12px;background:#0d2334ee;color:#f4fcff;padding:12px 16px;font:15px/1.3 system-ui;box-sizing:border-box}
#higiene-en-curso::backdrop{background:transparent}#higiene-en-curso p{margin:.3em 0}#higiene-en-curso progress{width:68%;accent-color:#5de1cf;margin-right:4%}
.higienizando #app>:not(#viewport):not(#higiene-en-curso){visibility:hidden}
.rescue-pane{border:1px solid #abc4ca;border-radius:14px;overflow:hidden;padding:16px;background:#f4f9fa;color:#173d46}.rescue-pane header{background:#173b4c;color:#f3fafc;margin:-16px -16px 16px;padding:17px}.rescue-pane.critical header{background:#764419}.rescue-pane.arrest header{background:#843440}.rescue-pane header h3,.rescue-pane header small{color:inherit}.rescue-pane header p{margin:4px 0 0}.rescue-pane #rescue-cpr{background:#a92a41;color:white;font-weight:750;padding:12px 20px}.rescue-history{list-style:none;padding:0}.rescue-history li{padding:8px 0;border-top:1px solid #cfdddf}.rescue-history time{font-variant-numeric:tabular-nums;font-weight:700;margin-right:7px}

.ecg-series{display:grid;gap:.4rem;list-style:none;margin:.6rem 0 1rem;padding:.15rem;max-height:17rem;overflow:auto}
.ecg-series button{display:grid;gap:.15rem;width:100%;text-align:left;white-space:normal;padding:.55rem .75rem;border:1px solid #adc9c7;border-radius:.45rem;background:white;color:#193d43}
.ecg-series button[aria-pressed="true"]{background:#e0f5f1;border-color:#26776d;box-shadow:inset .2rem 0 #26776d}
.ecg-series small{color:#466367}

body.examining-patient #app>:not(#viewport):not(#bedside-exam){visibility:hidden}
#bedside-exam [data-exam-controls]{position:absolute;inset:auto 0 max(.6rem,env(safe-area-inset-bottom));width:min(620px,calc(100% - 20px));max-height:39dvh;overflow:auto;box-sizing:border-box;margin:0 auto;padding:12px 16px;border:1px solid #4b7482;border-radius:14px;background:#102935f5;color:#eaf6f9}
#bedside-exam::backdrop{background:transparent}
#bedside-exam header{display:flex;align-items:center;justify-content:space-between;gap:12px}
#bedside-exam h2{margin:0;font-size:1.04rem}
#bedside-exam nav,#bedside-exam [data-choices]{display:flex;gap:5px;flex-wrap:wrap;margin:5px 0}
#bedside-exam button{min-height:36px;padding:5px 10px}
#bedside-exam [aria-pressed=true]{background:#a0e6da;color:#12313a}
#bedside-exam [role=status]{margin:6px 0 0;font-size:.86rem}

#bedside-exam[open]{display:block;position:fixed;inset:0;margin:0;padding:0;border:none;border-radius:0;width:100%;max-width:none;height:100%;max-height:none;background:transparent;box-shadow:none;color:inherit;overflow:hidden}
#bedside-exam [data-patient-surface]{position:absolute;inset:0;touch-action:manipulation}
#bedside-exam[data-palpable="true"] [data-patient-surface]{cursor:crosshair}
#patient-exam-menu{position:fixed;inset:auto;margin:0;box-sizing:border-box;width:min(282px,calc(100% - 16px));max-height:80dvh;overflow:auto;padding:12px 14px;color:#edf8f8;background:#112e3b;border:1px solid #53858a;border-radius:12px;box-shadow:0 10px 32px #09233355}
#patient-exam-menu::backdrop{background:transparent}
#patient-exam-menu header{display:flex;gap:14px;justify-content:space-between;align-items:center}
#patient-exam-menu h2{font-size:1.08rem;margin:.15rem 0 .3rem}
#patient-exam-menu small{font-size:.68rem;letter-spacing:.1em;color:#a7e6d9}
#patient-exam-menu [data-actions]{display:grid;gap:5px;margin-top:6px}
#patient-exam-menu [data-actions] button{text-align:left;white-space:normal;min-height:36px}
.exam-quadrants{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:5px;list-style:none;padding:0}
.exam-quadrants li{padding:6px 8px;border-radius:5px;background:#edf2f2;color:#43595e;font-size:.82rem}
.exam-quadrants [data-done="true"]{color:#15534b;background:#dff3ec}
@media(max-width:600px){
 #bedside-exam[data-palpable="true"] [data-choices]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
 #bedside-exam[data-palpable="true"] [data-choices] button{min-width:0;white-space:normal;text-align:left;font-size:.84rem;line-height:1.15}
}

/* Numbered landmarks are visual guides; pointer contacts resolve against the patient mesh. */
#chest-sites .chest-site{pointer-events:none}
#bedside-exam[data-thoracic="true"] [data-patient-surface]{cursor:crosshair}
.exam-sounds{list-style:none;padding:0;display:grid;gap:4px}
.exam-sounds li{padding:6px 10px;border-inline-start:3px solid #b3c2c3;background:#eff4f4}
.exam-sounds [data-done="true"]{border-color:#347968;background:#e6f4ed}
.exam-sounds small{display:block;font-size:.87rem;color:#304e51}
@media(max-width:600px){
 #bedside-exam[data-thoracic="true"] [data-choices]{display:grid;grid-template-columns:1fr 1fr;gap:4px}
 #bedside-exam[data-thoracic="true"] [data-choices] button{min-width:0;white-space:normal;text-align:left;font-size:.84rem;line-height:1.15}
}
#bedside-exam [data-choices] select{max-width:100%;min-height:36px;border:1px solid #57818b;border-radius:8px;background:#193744;color:#e7f6f3;padding:4px 8px;font:inherit}
#bedside-exam [data-choices] label:has(input[type=range]){display:grid;gap:.15rem;flex:1 1 125px;color:#dbefed;font-size:.86rem}
#bedside-exam [data-choices] input[type=range]{accent-color:#73d6c7;width:100%;min-height:26px;margin:0}

#bedside-exam[data-central="true"] nav{display:none}

#bedside-exam[data-cvc-gesture="scan"] [data-patient-surface],
#bedside-exam[data-cvc-gesture="survey"] [data-patient-surface]{touch-action:none;cursor:grab}
#bedside-exam[data-cvc-gesture="scan"] [data-patient-surface]:active,
#bedside-exam[data-cvc-gesture="survey"] [data-patient-surface]:active{cursor:grabbing}
#bedside-exam [data-patient-surface]:focus{outline:none}
.cvc-order h3{margin-top:0}
.cvc-order p{margin:.45em 0}

#bedside-exam[data-central="true"] [data-patient-surface]{touch-action:none}
#bedside-exam [data-cvc-echo]{position:absolute;right:12px;top:max(12px,env(safe-area-inset-top));width:clamp(122px,22vw,245px);height:auto;border:4px solid #233c48;border-radius:6px;pointer-events:none}
#bedside-exam[data-cvc-looking="true"] [data-patient-surface]{cursor:grab}
#bedside-exam [data-cvc-look]{margin-left:auto;flex-shrink:0}

.cvc-drag-guide{position:absolute;pointer-events:none;height:2px;background:#ccece4ad;transform-origin:left center;filter:drop-shadow(0 1px 2px #143e37);border-radius:2px}
.cvc-drag-guide::before{content:"";position:absolute;width:12px;height:12px;border:1.5px solid #e1fff5;border-radius:50%;top:50%;left:0;transform:translate(-50%,-50%);background:#285f6138}
.cvc-drag-guide::after{content:"";position:absolute;right:0;top:-3px;width:7px;height:7px;border-top:2px solid #defbf2;border-right:2px solid #defbf2;transform:rotate(45deg)}
.cvc-drag-guide.held{opacity:.58}

#bedside-exam .cvc-control-report{display:grid;gap:.26rem;padding:.65rem .9rem;border-left:3px solid #58b5ac;background:#152e39;color:#ecf4f3;text-align:left;max-width:36rem}
#bedside-exam [data-choices] button[aria-pressed=true]{background:#126d70;color:white}
#bedside-exam [data-choices] a{color:inherit;align-self:center;font-size:.8rem}

.cvc-line-dialog{width:min(26rem,92vw);border:1px solid #52747a;border-radius:1rem;padding:0;color:#e6f4f1;background:#102d39}
.cvc-line-dialog::backdrop{background:#05151bd9}.cvc-line-dialog form{padding:1rem;display:grid;gap:.8rem}.cvc-line-dialog header{display:flex;align-items:center;justify-content:space-between}.cvc-line-dialog h2,.cvc-line-dialog p{margin:0}.cvc-line-dialog fieldset{display:grid;gap:.35rem;border:0;padding:0}.cvc-line-dialog label{display:flex;align-items:center;gap:.55rem;background:#203f48;padding:.65rem;border-radius:.5rem}.cvc-line-dialog label:has(:disabled){opacity:.62}
