.emt-debrief-lab {
  --edt-ink: #e9f3f5;
  --edt-muted: #bdd1d8;
  --edt-line: rgba(188, 220, 232, .21);
  --edt-teal: #58dac5;
  --edt-blue: #78baff;
  --edt-amber: #f0ba78;
  --edt-red: #ef8780;
  display: grid;
  gap: 19px;
  min-width: 0;
  padding: clamp(14px, 2.4vw, 24px);
  border: 1px solid rgba(88, 218, 197, .28);
  border-radius: 12px;
  color: var(--edt-ink);
  background: radial-gradient(circle at 100% 0, rgba(120, 186, 255, .1), transparent 34%),
    linear-gradient(155deg, rgba(88, 218, 197, .07), transparent 36%), #0e1b27;
}
.emt-debrief-lab * { box-sizing: border-box; }
.emt-debrief-lab :is(button, select, input):focus-visible {
  outline: 2px solid #c4f9ee;
  outline-offset: 3px;
}
.emt-debrief-lab button { min-height: 36px; }
.emt-debrief-lab button:disabled { cursor: not-allowed; opacity: .5; }
.emt-debrief-head { display: grid; gap: 7px; }
.emt-debrief-eyebrow,
.emt-debrief-kicker { color: #88e6d6; font-size: .68rem; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; }
.emt-debrief-head h3 { margin: 0; font-size: clamp(1.08rem, 2vw, 1.35rem); }
.emt-debrief-head p,
.emt-debrief-guide,
.emt-debrief-muted,
.emt-debrief-safety,
.emt-debrief-sources,
.emt-debrief-text-equivalent { margin: 0; color: var(--edt-muted); line-height: 1.48; }
.emt-debrief-head p { max-width: 88ch; font-size: .83rem; }
.emt-debrief-guide { padding: 11px 13px; border-left: 3px solid var(--edt-blue); background: rgba(120, 186, 255, .09); font-size: .78rem; }
.emt-debrief-presets,
.emt-debrief-replay-actions,
.emt-debrief-run-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.emt-debrief-presets button,
.emt-debrief-replay-actions button,
.emt-debrief-run-buttons button { font-size: .75rem; }
.emt-debrief-controls,
.emt-debrief-scene,
.emt-debrief-replay,
.emt-debrief-findings,
.emt-debrief-runs { display: grid; gap: 11px; min-width: 0; }
.emt-debrief-controls h4,
.emt-debrief-scene h4,
.emt-debrief-replay h4,
.emt-debrief-findings h4,
.emt-debrief-runs h4 { margin: 0; font-size: .95rem; }
.emt-debrief-control-grid { display: grid; grid-template-columns: 1.16fr 1fr 1fr; gap: 10px; }
.emt-debrief-control-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--edt-line);
  border-radius: 9px;
  background: rgba(4, 15, 25, .57);
}
.emt-debrief-control-card h5 { margin: 0 0 3px; color: #dff1ef; font-size: .78rem; }
.emt-debrief-role-row { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid rgba(188, 220, 232, .12); }
.emt-debrief-select-field { display: grid; gap: 5px; min-width: 0; }
.emt-debrief-select-field strong { color: #d3e4e9; font-size: .72rem; }
.emt-debrief-select-field select {
  width: 100%; min-width: 0; min-height: 36px; padding: 6px 8px;
  border: 1px solid rgba(188, 220, 232, .29); border-radius: 6px;
  color: var(--edt-ink); background: #1b2b38; font-size: .76rem;
}
.emt-debrief-check { display: flex; gap: 8px; align-items: flex-start; color: #d1e0e5; font-size: .72rem; line-height: 1.35; cursor: pointer; }
.emt-debrief-check input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--edt-teal); }
.emt-debrief-check:has(input:disabled) { opacity: .55; }
.emt-debrief-scene {
  padding: 14px;
  border: 1px solid rgba(120, 186, 255, .28);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(120, 186, 255, .09), transparent 55%), #0a1825;
}
.emt-debrief-scene-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.emt-debrief-time { padding: 4px 9px; border: 1px solid rgba(88, 218, 197, .45); border-radius: 5px; color: #9ef6e7; background: rgba(88, 218, 197, .1); font-size: .82rem; font-variant-numeric: tabular-nums; }
.emt-debrief-scene-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.emt-debrief-scene-card {
  display: grid; align-content: start; justify-items: start; gap: 8px;
  min-height: 163px; min-width: 0; padding: 11px;
  border: 1px solid var(--edt-line); border-radius: 8px; background: rgba(4, 14, 23, .67);
}
.emt-debrief-scene-card p { margin: 0; color: #d3e5e8; font-size: .74rem; line-height: 1.45; }
.emt-debrief-patient-figure { position: relative; width: 92px; height: 40px; margin: 4px 0; }
.emt-debrief-figure-head { position: absolute; left: 4px; top: 7px; width: 23px; height: 23px; border-radius: 50%; background: #5e9ab2; box-shadow: 0 0 0 3px rgba(120, 186, 255, .11); }
.emt-debrief-figure-body { position: absolute; left: 29px; top: 10px; width: 58px; height: 17px; border-radius: 10px; background: linear-gradient(90deg, #74afbd, #427a96); }
.emt-debrief-figure-chest { position: absolute; left: 43px; top: 13px; width: 12px; height: 12px; border: 2px solid #9ae9db; border-radius: 50%; }
.emt-debrief-care-icon { display: grid; place-items: center; width: 56px; height: 39px; margin: 4px 0; border: 2px solid #7ac4ee; border-radius: 7px; color: #b6e9ff; background: #234056; font-size: .72rem; font-weight: 900; letter-spacing: .05em; box-shadow: inset 0 0 0 3px rgba(9, 30, 47, .7); }
.emt-debrief-care[data-phase="analysis"] .emt-debrief-care-icon { border-color: var(--edt-amber); color: #ffe3b5; box-shadow: 0 0 0 4px rgba(240, 186, 120, .12); }
.emt-debrief-care[data-phase="collision"] .emt-debrief-care-icon,
.emt-debrief-care[data-phase="switch"] .emt-debrief-care-icon { border-color: var(--edt-red); }
.emt-debrief-crew-figures { display: flex; gap: 5px; margin: 4px 0; }
.emt-debrief-crew-figures span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(88, 218, 197, .6); border-radius: 50%; color: #aef2e8; background: #153d45; font-size: .63rem; font-weight: 850; }
.emt-debrief-crew[data-open-loop="true"] .emt-debrief-crew-figures span { border-color: rgba(240, 186, 120, .7); color: #ffe0ad; background: #3d312c; }
.emt-debrief-replay,
.emt-debrief-findings,
.emt-debrief-runs { padding: 14px; border: 1px solid var(--edt-line); border-radius: 9px; background: rgba(4, 14, 23, .48); }
.emt-debrief-muted { font-size: .74rem; }
.emt-debrief-track-grid { display: grid; gap: 11px; }
.emt-debrief-track-row { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 8px; align-items: center; }
.emt-debrief-track-row > strong { color: #d7e7ea; font-size: .71rem; }
.emt-debrief-track,
.emt-debrief-mini-track { position: relative; height: 25px; min-width: 0; overflow: hidden; border: 1px solid rgba(188, 220, 232, .26); border-radius: 5px; background: #122330; }
.emt-debrief-track-mark { position: absolute; top: 0; bottom: 0; min-width: 3px; }
.emt-debrief-track-patient { background: #a9ceee; box-shadow: 0 0 8px #a9ceee; }
.emt-debrief-track-crew { background: #c9a9ef; box-shadow: 0 0 8px #c9a9ef; }
.emt-debrief-track-assessment { background: #637788; }
.emt-debrief-track-cpr { background: #4abca9; }
.emt-debrief-track-breathing { background: #78baff; }
.emt-debrief-track-analysis { background: #e9aa66; }
.emt-debrief-track-collision,
.emt-debrief-track-switch,
.emt-debrief-track-assignment,
.emt-debrief-track-unassigned { background: #e48178; }
.emt-debrief-playhead { position: absolute; z-index: 2; top: 0; bottom: 0; width: 3px; background: white; box-shadow: 0 0 7px white; }
.emt-debrief-scale { display: flex; justify-content: space-between; margin-left: 153px; color: #aac1cc; font-size: .65rem; font-variant-numeric: tabular-nums; }
.emt-debrief-scrub { display: grid; gap: 5px; }
.emt-debrief-scrub strong { font-size: .75rem; }
.emt-debrief-scrub input { width: 100%; accent-color: var(--edt-teal); }
.emt-debrief-scrub output { color: #9cf4e2; font-size: .75rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.emt-debrief-event-jumps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.emt-debrief-event-jumps > strong { flex: 0 0 100%; color: #d7e7ea; font-size: .72rem; }
.emt-debrief-jump { min-height: 30px !important; padding: 4px 8px; border: 1px solid rgba(120, 186, 255, .32); border-radius: 5px; color: #c9e3f4; background: rgba(120, 186, 255, .07); font-size: .66rem; cursor: pointer; }
.emt-debrief-jump:hover { background: rgba(120, 186, 255, .17); }
.emt-debrief-event-list { display: grid; gap: 6px; max-height: 270px; margin: 0; padding: 0 0 0 22px; overflow: auto; }
.emt-debrief-event { padding: 7px 9px; border-left: 2px solid var(--edt-blue); color: #c9dce3; background: rgba(120, 186, 255, .06); font-size: .71rem; line-height: 1.42; }
.emt-debrief-event-care { border-color: var(--edt-teal); }
.emt-debrief-event-crew { border-color: #c9a9ef; }
.emt-debrief-event strong { display: block; color: #e4f2f4; }
.emt-debrief-event span { display: block; }
.emt-debrief-finding-list { display: grid; gap: 6px; margin: 0; padding-left: 20px; color: #ecd4b4; font-size: .75rem; line-height: 1.43; }
.emt-debrief-finding-list li::marker { color: var(--edt-amber); }
.emt-debrief-receiver { display: grid; gap: 8px; padding: 11px; border: 1px solid rgba(120, 186, 255, .26); border-radius: 7px; background: rgba(120, 186, 255, .06); }
.emt-debrief-receiver h5 { margin: 0; font-size: .78rem; }
.emt-debrief-packet { display: grid; gap: 8px; margin: 0; padding-left: 20px; }
.emt-debrief-packet li { color: #d2e3e8; font-size: .72rem; line-height: 1.4; }
.emt-debrief-packet strong { display: block; color: #9ee9dd; }
.emt-debrief-packet span { display: block; }
.emt-debrief-run-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.emt-debrief-run-card { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 11px; border: 1px solid var(--edt-line); border-radius: 7px; background: #0a1a26; }
.emt-debrief-run-card > strong { color: #97ebdb; font-size: .8rem; }
.emt-debrief-run-card p { margin: 0; color: #c8dae0; font-size: .7rem; line-height: 1.4; }
.emt-debrief-mini-track { height: 14px; margin-top: 5px; }
.emt-debrief-text-equivalent { padding: 10px 12px; border: 1px solid rgba(88, 218, 197, .22); border-radius: 6px; background: rgba(88, 218, 197, .055); font-size: .73rem; }
.emt-debrief-safety { color: #ead4b8; font-size: .76rem; }
.emt-debrief-sources { font-size: .71rem; }
.emt-debrief-sources a { color: #9cebdd; }
.emt-debrief-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 960px) {
  .emt-debrief-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emt-debrief-control-card:first-child { grid-row: span 2; }
}
@media (max-width: 670px) {
  .emt-debrief-control-grid,
  .emt-debrief-scene-grid,
  .emt-debrief-run-grid { grid-template-columns: 1fr; }
  .emt-debrief-control-card:first-child { grid-row: auto; }
  .emt-debrief-scene-card { min-height: 0; }
  .emt-debrief-track-row { grid-template-columns: 1fr; gap: 4px; }
  .emt-debrief-scale { margin-left: 0; }
}
@media (max-width: 390px) {
  .emt-debrief-lab { padding: 12px; }
  .emt-debrief-scene,
  .emt-debrief-replay,
  .emt-debrief-findings,
  .emt-debrief-runs { padding: 10px; }
  .emt-debrief-scale { font-size: .57rem; }
}
@media (prefers-reduced-motion: reduce) {
  .emt-debrief-lab *, .emt-debrief-lab *::before, .emt-debrief-lab *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
