.emt-aed-lab {
  display: grid;
  gap: 15px;
  min-width: 0;
  padding: clamp(14px, 2.3vw, 24px);
  border: 1px solid #43697b;
  border-radius: 22px;
  background: linear-gradient(150deg, #102b39, #112635 64%, #192836);
  color: #f2f8fb;
}
.emt-aed-lab * { box-sizing: border-box; }
.emt-aed-lab [hidden] { display: none !important; }
.emt-aed-lab :is(button, a):focus-visible { outline: 3px solid #f9d084; outline-offset: 3px; }
.emt-aed-lab :is(h3, h4, p) { margin: 0; }
.emt-aed-lab button { cursor: pointer; }
.emt-aed-lab button:disabled { cursor: not-allowed; opacity: 0.52; }
.emt-aed-head { display: grid; gap: 8px; }
.emt-aed-head h3 { font-size: clamp(1.25rem, 2.35vw, 1.82rem); line-height: 1.18; }
.emt-aed-head p { max-width: 79ch; color: #c5dce5; line-height: 1.5; }
.emt-aed-lab h4 { margin-bottom: 10px; color: #e0f7ef; font-size: 1.02rem; }
.emt-aed-photo-study {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: clamp(12px, 1.7vw, 19px);
  border: 1px solid #668b98;
  border-radius: 17px;
  background: linear-gradient(145deg, #173d4a, #17313e);
}
.emt-aed-photo-heading { display: grid; gap: 5px; }
.emt-aed-photo-kicker { color: #9be9cf; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.1em; }
.emt-aed-photo-heading h4 { margin: 0; font-size: clamp(1.07rem, 1.8vw, 1.35rem); }
.emt-aed-photo-heading p { color: #c4dce1; font-size: 0.86rem; line-height: 1.45; }
.emt-aed-photo-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 14px; align-items: start; min-width: 0; }
.emt-aed-photo-figure { display: grid; gap: 8px; min-width: 0; margin: 0; }
.emt-aed-photo-frame { position: relative; width: 100%; aspect-ratio: 7 / 5; overflow: hidden; border: 1px solid #96b8bb; border-radius: 12px; background: #d7d9d3; }
.emt-aed-photo-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; transform: scale(1.75); transform-origin: center bottom; }
.emt-aed-photo-frame::after { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px #091f255e; content: ""; pointer-events: none; }
.emt-aed-photo-markers { position: absolute; inset: 0; pointer-events: none; }
.emt-aed-photo-marker { position: absolute; display: grid; place-items: center; width: 31px; height: 31px; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 50%; background: #0a4854e8; color: white; font: 900 0.86rem/1 system-ui, sans-serif; box-shadow: 0 1px 9px #071c22; }
.emt-aed-photo-marker-first { left: 15%; top: 14%; }
.emt-aed-photo-marker-second { left: 37%; top: 49%; }
.emt-aed-photo-marker-trainer { left: 81%; top: 65%; }
.emt-aed-photo-crop-label { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 38%; height: 14%; min-height: 30px; border-bottom-left-radius: 8px; background: #173d4a; color: #d6f7ec; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.07em; }
.emt-aed-photo-frame[data-focus] .emt-aed-photo-marker { opacity: 0.52; }
.emt-aed-photo-frame[data-focus="first"] .emt-aed-photo-marker-first,
.emt-aed-photo-frame[data-focus="second"] .emt-aed-photo-marker-second,
.emt-aed-photo-frame[data-focus="trainer"] .emt-aed-photo-marker-trainer { opacity: 1; outline: 4px solid #f7d580; outline-offset: 3px; }
.emt-aed-photo-caption { color: #bcd4d9; font-size: 0.72rem; line-height: 1.45; }
.emt-aed-photo-caption a { color: #9fead8; }
.emt-aed-photo-panel { display: grid; gap: 10px; min-width: 0; }
.emt-aed-photo-prompt { color: #d9f5e9; font-size: 0.82rem; font-weight: 800; }
.emt-aed-photo-choices { display: grid; gap: 6px; }
.emt-aed-photo-choice, .emt-aed-photo-answer-button { min-height: 42px; padding: 8px 10px; border: 1px solid #7097a1; border-radius: 9px; background: #214b58; color: #e9f7f6; font: 700 0.81rem/1.25 system-ui, sans-serif; text-align: left; }
.emt-aed-photo-choice:hover, .emt-aed-photo-answer-button:hover { background: #2b5b68; }
.emt-aed-photo-choice[aria-pressed="true"], .emt-aed-photo-answer-button[aria-pressed="true"] { border-color: #a1e7d1; background: #20675e; box-shadow: inset 0 0 0 1px #a1e7d1; }
.emt-aed-photo-detail { display: grid; gap: 4px; min-height: 88px; padding: 10px; border-left: 3px solid #91d8c6; border-radius: 7px; background: #0c303b; }
.emt-aed-photo-detail strong { color: #d6f9e8; font-size: 0.82rem; line-height: 1.3; }
.emt-aed-photo-detail p, .emt-aed-photo-boundary { color: #c5d9de; font-size: 0.78rem; line-height: 1.43; }
.emt-aed-photo-check { display: grid; gap: 7px; padding: 10px; border: 1px solid #8b875f; border-radius: 9px; background: #3a3c36; }
.emt-aed-photo-check > strong { color: #ffdfa8; font-size: 0.82rem; }
.emt-aed-photo-check > p { color: #e7e3d6; font-size: 0.78rem; line-height: 1.4; }
.emt-aed-photo-answer-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.emt-aed-photo-answer-button { background: #4c4e43; border-color: #ada37a; }
.emt-aed-photo-answer[data-correct="true"] { color: #baf5d6; }
.emt-aed-photo-answer[data-correct="false"] { color: #ffe0ae; }
.emt-aed-photo-bridge { display: grid; justify-items: start; gap: 8px; padding: 12px; border: 1px solid #7fbaa9; border-radius: 10px; background: #12443f; }
.emt-aed-photo-bridge strong { color: #d7f9e9; font-size: 0.84rem; }
.emt-aed-photo-bridge p { color: #cbe2df; font-size: 0.78rem; line-height: 1.45; }
.emt-aed-photo-bridge .emt-aed-action-button { height: auto; min-height: 43px; max-width: 100%; white-space: normal; text-align: left; }
.emt-aed-photo-bridge .emt-aed-photo-bridge-status { color: #aee9d7; }
.emt-aed-photo-boundary { padding-top: 4px; border-top: 1px solid #4d7380; }
.emt-aed-scenarios, .emt-aed-patient, .emt-aed-controls, .emt-aed-device, .emt-aed-time-panel {
  min-width: 0;
  padding: clamp(12px, 1.6vw, 18px);
  border: 1px solid #446b7c;
  border-radius: 16px;
  background: #163543;
}
.emt-aed-scenarios { display: grid; gap: 10px; }
.emt-aed-scenarios h4 { margin: 0; }
.emt-aed-scenario-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.emt-aed-scenario-button, .emt-aed-action-button, .emt-aed-pad-tab, .emt-aed-site-choice {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #648b9a;
  border-radius: 10px;
  background: #214657;
  color: #eaf8fa;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
}
.emt-aed-scenario-button[aria-pressed="true"], .emt-aed-pad-tab[aria-pressed="true"], .emt-aed-site-choice[aria-pressed="true"] {
  border-color: #8ce7cd;
  background: #21635e;
  box-shadow: inset 0 0 0 1px #8ce7cd;
}
.emt-aed-scenario-button:not(:disabled):hover, .emt-aed-action-button:not(:disabled):hover,
.emt-aed-site-choice:not(:disabled):hover { filter: brightness(1.15); }
.emt-aed-scenario-cue { color: #bfd6dc; font-size: 0.84rem; line-height: 1.43; }
.emt-aed-main { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 14px; align-items: start; }
.emt-aed-patient, .emt-aed-controls { display: grid; gap: 10px; }
.emt-aed-patient h4, .emt-aed-controls h4 { margin: 0; }
.emt-aed-patient-header { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.emt-aed-view-controls { display: flex; flex-wrap: wrap; gap: 7px; }
.emt-aed-view-button { min-height: 40px; padding: 7px 11px; border: 1px solid #83b0b4; border-radius: 8px; background: #244d58; color: #e3f5f2; font: 750 0.8rem/1.25 system-ui, sans-serif; }
.emt-aed-view-button[aria-pressed="true"] { border-color: #a6ead7; background: #176b61; box-shadow: inset 0 0 0 1px #a6ead7; }
.emt-aed-clock { border: 1px solid #e2b67e; border-radius: 8px; padding: 5px 9px; background: #574230; color: #ffe0a8; font: 800 1.05rem/1.2 ui-monospace, Consolas, monospace; }
.emt-aed-cpr-badge { border: 1px solid #85dfc3; border-radius: 8px; padding: 5px 9px; background: #1d5b52; color: #d8fff2; font-size: 0.79rem; font-weight: 800; }
.emt-aed-cpr-badge[data-active="false"] { border-color: #f1bd81; background: #6e4932; color: #ffe4bc; }
.emt-aed-stage {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  aspect-ratio: 600 / 500;
  overflow: hidden;
  border: 1px solid #5a8290;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 42%, #275966 0%, #163a48 62%, #102a36 100%);
}
.emt-aed-stage > svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.emt-aed-patient-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.emt-aed-image-cover { position: absolute; z-index: 1; top: 28%; left: 19%; width: 62%; height: 59%; border: 1px solid #b5cbd2; border-radius: 24px 24px 18px 18px; background: linear-gradient(145deg, #9fc0cd 0%, #bbd2d8 48%, #88aaba 100%); box-shadow: 0 8px 18px #1c3f4655; pointer-events: none; }
.emt-aed-image-orientation { position: absolute; z-index: 1; top: 8px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; color: #f8fffb; font: 850 clamp(0.53rem, 1.3vw, 0.7rem)/1.1 system-ui, sans-serif; letter-spacing: 0.05em; text-shadow: 0 1px 3px #11343c, 0 0 8px #11343c; pointer-events: none; }
.emt-aed-stage[data-exposed="true"] .emt-aed-image-cover,
.emt-aed-stage[data-view="guide"] :is(.emt-aed-patient-image, .emt-aed-image-cover, .emt-aed-image-orientation),
.emt-aed-stage[data-view="patient"] > svg { display: none; }
.emt-aed-body { fill: #497983; stroke: #aad1d0; stroke-width: 3; }
.emt-aed-stage[data-exposed="false"] .emt-aed-body { fill: #385969; stroke: #8ab2b9; }
.emt-aed-stage[data-exposed="false"]::after { content: "PAD AREAS COVERED"; position: absolute; right: 9px; bottom: 9px; padding: 4px 6px; border: 1px solid #dfb686; border-radius: 6px; background: #644835dd; color: #ffe1bd; font-size: 0.65rem; font-weight: 800; pointer-events: none; }
.emt-aed-anatomy { fill: none; stroke: #e1c99c; stroke-width: 2; stroke-dasharray: 6 5; opacity: 0.75; }
.emt-aed-orientation { fill: #dff2ee; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.emt-aed-hazard-layer, .emt-aed-pad-layer, .emt-aed-target-layer { position: absolute; inset: 0; pointer-events: none; }
.emt-aed-hazard { display: none; position: absolute; z-index: 2; transform: translate(-50%, -50%); padding: 5px 7px; border: 1px solid #ffd39a; border-radius: 7px; background: #8e5c36ee; color: #fff2dc; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.03em; box-shadow: 0 2px 8px #061f2b; }
.emt-aed-hazard-wet { left: 66%; top: 54%; }
.emt-aed-hazard-hair { left: 36%; top: 43%; }
.emt-aed-hazard-implant { left: 36%; top: 33%; }
.emt-aed-hazard-patch { left: 73%; top: 58%; }
.emt-aed-stage[data-scene="wetHair"][data-dried="false"] .emt-aed-hazard-wet,
.emt-aed-stage[data-scene="wetHair"][data-hair-cleared="false"] .emt-aed-hazard-hair,
.emt-aed-stage[data-scene="implant"] .emt-aed-hazard-implant,
.emt-aed-stage[data-scene="patch"][data-patch-removed="false"] .emt-aed-hazard-patch { display: block; }
.emt-aed-pad-marker {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 47px;
  height: 30px;
  transform: translate(-50%, -50%);
  border: 2px solid #bcefe1;
  border-radius: 12px;
  background: #137b77;
  color: white;
  font-size: 0.85rem;
  font-weight: 900;
  box-shadow: 0 2px 9px #08232d;
}
.emt-aed-pad-marker[data-contact="false"] { border-color: #ffe0a4; background: #966135; }
.emt-aed-map-target {
  position: absolute;
  z-index: 4;
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 2px solid #b9ebdb;
  border-radius: 50%;
  background: #0d3845de;
  color: white;
  font: 800 0.92rem/1 system-ui, sans-serif;
}
.emt-aed-map-target:hover { background: #1a737b; }
.emt-aed-map-help, .emt-aed-scene-description { color: #c5dbe3; font-size: 0.82rem; line-height: 1.42; }
.emt-aed-crew { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.emt-aed-crew-card { display: grid; gap: 3px; padding: 8px; border: 1px solid #638590; border-radius: 9px; background: #1b4651; }
.emt-aed-crew-card[data-contact="true"] { border-color: #eeb47a; background: #5e4939; }
.emt-aed-crew-card strong { color: #e4f7f7; font-size: 0.78rem; }
.emt-aed-crew-card span { color: #bed4dc; font-size: 0.72rem; line-height: 1.3; }

.emt-aed-prep-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.emt-aed-prep-buttons .emt-aed-action-button { min-height: 43px; font-size: 0.77rem; }
.emt-aed-prep-note { color: #bbd3dc; font-size: 0.77rem; line-height: 1.4; }
.emt-aed-photo-practice-status { padding: 10px 12px; border-left: 4px solid #e8bf76; border-radius: 7px; background: #34433f; color: #ffe1b1; font-size: 0.79rem; line-height: 1.45; }
.emt-aed-photo-practice-status[data-ready="true"] { border-left-color: #7ee1c3; background: #205048; color: #d9ffef; }
.emt-aed-pad-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding-top: 6px; border-top: 1px solid #4e7582; }
.emt-aed-pad-status { color: #d4e7ea; font-size: 0.83rem; line-height: 1.42; }
.emt-aed-site-choices { display: grid; gap: 6px; }
.emt-aed-site-choice { text-align: left; min-height: 41px; font-size: 0.8rem; }
.emt-aed-controls > .secondary-button { justify-self: start; min-height: 40px; padding: 7px 10px; white-space: normal; font-size: 0.81rem; }
.emt-aed-issues { display: grid; gap: 5px; margin: 0; padding: 10px 10px 10px 28px; border-left: 4px solid #d79666; border-radius: 7px; background: #3a4142; color: #ffdfc0; font-size: 0.79rem; line-height: 1.35; }
.emt-aed-issues[data-ready="true"] { border-left-color: #81d9c6; background: #1d4c4d; color: #d5fff0; }

.emt-aed-device { display: grid; gap: 10px; }
.emt-aed-device h4 { margin: 0; }
.emt-aed-device-screen { display: grid; gap: 6px; padding: 15px; min-height: 106px; border: 2px solid #72b6a9; border-radius: 13px; background: #092b35; box-shadow: inset 0 0 18px #0b5149; }
.emt-aed-device-screen strong { color: #baf8da; font: 800 1.02rem/1.3 ui-monospace, Consolas, monospace; }
.emt-aed-device-screen p { color: #c5e6dc; font-size: 0.83rem; line-height: 1.4; }
.emt-aed-device[data-phase="analysis"] .emt-aed-device-screen,
.emt-aed-device[data-phase="shock"] .emt-aed-device-screen { border-color: #f3c07c; box-shadow: inset 0 0 18px #85502f; }
.emt-aed-device[data-phase="analysis"] .emt-aed-device-screen strong,
.emt-aed-device[data-phase="shock"] .emt-aed-device-screen strong { color: #ffe1a9; }
.emt-aed-device > .emt-aed-action-button, .emt-aed-device > .secondary-button { justify-self: start; min-height: 41px; padding: 8px 12px; white-space: normal; }
.emt-aed-clear-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.emt-aed-clear-controls button { text-align: left; min-height: 42px; font-size: 0.79rem; }
.emt-aed-clear-controls button[aria-pressed="true"] { border-color: #8ce7cd; background: #21635e; }
.emt-aed-device-hint { color: #bdd4dc; font-size: 0.8rem; line-height: 1.4; }

.emt-aed-time-panel { display: grid; gap: 11px; }
.emt-aed-time-panel h4 { margin: 0; }
.emt-aed-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.emt-aed-counts > div { display: grid; gap: 4px; padding: 9px; border: 1px solid #527888; border-radius: 9px; background: #1c4050; }
.emt-aed-counts strong { color: #a5efda; font: 800 1.2rem/1.1 ui-monospace, Consolas, monospace; }
.emt-aed-counts span { color: #cbdee5; font-size: 0.72rem; line-height: 1.25; }
.emt-aed-timebar { display: flex; width: 100%; height: 25px; overflow: hidden; border: 1px solid #668995; border-radius: 8px; background: repeating-linear-gradient(90deg, #153641 0 16px, #1e4651 16px 17px); }
.emt-aed-time-segment[data-kind="cpr"] { background: #60c8ad; }
.emt-aed-time-segment[data-kind="device"] { background: #e8bf76; }
.emt-aed-time-segment[data-kind="avoidable"] { background: repeating-linear-gradient(135deg, #c87849 0 8px, #dc935f 8px 14px); }
.emt-aed-time-legend { color: #bdd4db; font-size: 0.77rem; line-height: 1.35; }
.emt-aed-time-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.emt-aed-time-actions button { min-height: 40px; padding: 7px 10px; white-space: normal; font-size: 0.78rem; }
.emt-aed-source { color: #bcd3dc; font-size: 0.78rem; line-height: 1.45; }
.emt-aed-source a { color: #9eeed9; }
.emt-aed-live { position: absolute; width: 1px; height: 1px; overflow: hidden; margin: -1px !important; padding: 0; border: 0; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 1100px) {
  .emt-aed-photo-grid { grid-template-columns: 1fr; }
  .emt-aed-main { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .emt-aed-scenario-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emt-aed-clear-controls { grid-template-columns: 1fr; }
  .emt-aed-pad-marker { width: 34px; height: 23px; font-size: 0.72rem; }
  .emt-aed-map-target { width: 19px; height: 19px; font-size: 0.77rem; }
}
@media (max-width: 380px) {
  .emt-aed-lab { padding: 10px; }
  .emt-aed-photo-study { padding: 10px; }
  .emt-aed-photo-answer-buttons { grid-template-columns: 1fr; }
  .emt-aed-photo-marker { width: 25px; height: 25px; font-size: 0.72rem; }
  .emt-aed-scenarios, .emt-aed-patient, .emt-aed-controls, .emt-aed-device, .emt-aed-time-panel { padding: 10px; }
  .emt-aed-scenario-button { font-size: 0.75rem; }
  .emt-aed-crew { grid-template-columns: 1fr; }
  .emt-aed-prep-buttons { grid-template-columns: 1fr; }
  .emt-aed-hazard { font-size: 0.48rem; padding: 3px 4px; }
  .emt-aed-counts > div { padding: 6px; }
  .emt-aed-counts strong { font-size: 1rem; }
  .emt-aed-counts span { font-size: 0.66rem; }
}
