/* Simulath Nursing Lab — clinical dark shell (teal accent, not purple) */
:root {
  --bg: #070b12;
  --bg-panel: #0c131e;
  --bg-elevated: #121b29;
  --border: #1e2c3f;
  --text: #e7eef7;
  --text-dim: #8fa2b8;
  --text-faint: #546b82;
  --accent: #f07167;
  --accent-2: #e85d4c;
  --warn: #f5a623;
  --crit: #ff4d5e;
  --good: #34d399;
  --news-0: #1a3a2a;
  --news-1: #3a3a1a;
  --news-2: #3a2a12;
  --news-3: #3a1218;
  --header-h: 44px;
  --disclaimer-h: 28px;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: system-ui, "Segoe UI", sans-serif;
  --touch: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow: hidden;
  max-width: 100vw;
}

button, input, select, textarea { font-family: inherit; color: inherit; font-size: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

.app {
  height: 100%;
  display: grid;
  grid-template-rows: var(--disclaimer-h) var(--header-h) auto 1fr;
  min-width: 0;
  min-height: 0;
}

/* Accesibilidad — objetivos táctiles ≥ 44×44 */
.a11y-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
  background: #0a1018;
  flex-shrink: 0;
}
.a11y-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0 8px;
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
}
.a11y-toggle input {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
body.high-contrast {
  --text: #ffffff;
  --bg: #000;
  --bg-panel: #000;
  --border: #fff;
}
body.large-text { font-size: 17px; }
body.dyslexia { font-family: "Comic Sans MS", "Segoe UI", sans-serif; letter-spacing: 0.04em; }
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation: none !important;
  transition: none !important;
}

/* Disclaimer */
.disclaimer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 11px;
  color: var(--warn);
  background: #12100a;
  border-bottom: 1px solid #3a3218;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.disclaimer .role-note {
  color: var(--text-dim);
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}

/* Site header */
.sitebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  background: #0b121c;
  border-bottom: 1px solid var(--border);
  min-width: 0;
  position: relative;
  z-index: 50;
}
.sb-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  flex-shrink: 0;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 4px;
}
.sb-logo img {
  display: block;
  width: 22px;
  height: 22px;
}
.sb-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.sb-all {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.sb-sp { flex: 1; min-width: 4px; }
.sb-lang {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
}
.sb-lang select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  height: var(--touch);
  min-height: var(--touch);
  min-width: 113px;
  padding: 0 8px;
  border-radius: 4px;
}
.aula-slot { display: flex; gap: 6px; flex-shrink: 0; }

.btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 600;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn:hover { border-color: var(--accent-2); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, #3d1f1a, #2a1412);
  border-color: #8b3a32;
  color: var(--accent);
}
.btn.danger { background: #2a1216; border-color: #6b2430; color: var(--crit); }
.btn.ghost { background: transparent; }
.btn.active { border-color: var(--accent); color: var(--accent); }
.btn.lock::after { content: " 🔒"; font-size: 10px; opacity: 0.85; }

/* Main station */
.station {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.95fr) minmax(240px, 0.75fr);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.panel {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel:last-child { border-right: 0; }

.ph {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  flex-shrink: 0;
  gap: 6px;
}
.ph .row { display: flex; gap: 4px; align-items: center; }
.pb {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}

/* Scene */
.ward-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.patient-chip {
  flex: 1 1 70px;
  min-height: var(--touch);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  text-align: left;
  font-size: 11px;
}
.patient-chip.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.25);
}
.patient-chip .pid {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  display: block;
}
.patient-chip .plabel {
  color: var(--text-dim);
  font-size: 10px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bed-scene {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(45, 212, 191, 0.06), transparent 55%),
    linear-gradient(180deg, #0a121c 0%, #070b12 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.bed-visual {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 90px;
}
.patient-figure {
  height: 72px;
  border-radius: 8px;
  background: #0e1624;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.patient-figure .scene-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.compress-zone.pressing {
  outline: 2px solid var(--accent);
  transform: scale(0.98);
}
.patient-meta {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.35;
}
.patient-meta strong { color: var(--text); font-weight: 600; }

.instrument-dock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.instr-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.instr-tabs .btn {
  min-height: var(--touch);
  min-width: var(--touch);
  font-size: 10px;
  padding: 0 12px;
}

.canvas-wrap {
  position: relative;
  background: #05080e;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  min-height: 140px;
  flex: 1;
}
.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 220px;
}
.gauge-readout {
  position: absolute;
  right: 8px;
  top: 8px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(45, 212, 191, 0.35);
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
  min-width: 0;
}
.field.full { grid-column: 1 / -1; }
.field label { letter-spacing: 0.04em; }
.field input[type="text"],
.field input[type="number"],
.field select,
.field textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 8px;
  min-height: 36px;
  width: 100%;
}
.field textarea { min-height: 52px; resize: vertical; }
.field input[type="range"] {
  width: 100%;
  min-height: 36px;
  accent-color: var(--accent);
}
.field .hint { font-size: 10px; color: var(--text-faint); }
.checkrow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--touch);
  font-size: 12px;
}
.checkrow input { width: 18px; height: 18px; accent-color: var(--accent); }

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.action-row .btn { min-height: var(--touch); flex: 1 1 auto; }

.feedback {
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.4;
  display: none;
}
.feedback.show { display: block; }
.feedback.pass { border-color: var(--good); background: rgba(52, 211, 153, 0.08); color: var(--good); }
.feedback.fail { border-color: var(--crit); background: rgba(255, 77, 94, 0.08); color: #ffb0b8; }
.feedback.crit { border-color: var(--warn); color: var(--warn); }

/* Practice panel */
.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tabs .btn {
  flex: 1;
  min-height: var(--touch);
  min-width: var(--touch);
  border-radius: 4px 4px 0 0;
  font-size: 10px;
}
.ex-select-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
  flex-shrink: 0;
}
.ex-select {
  width: 100%;
  min-height: var(--touch);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 8px;
  color: var(--text);
}
.ex-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  max-height: 160px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.ex-select-label { display: none; }
.ex-list li.ex-item {
  list-style: none;
}
.ex-list li button,
.ex-list .ex-pick {
  width: 100%;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  min-height: var(--touch);
  font-size: 11px;
  color: var(--text);
}
.ex-list li.active button,
.ex-list li button.active { border-color: var(--accent); color: var(--accent); }
.ex-list li button.lock::after,
.ex-list li.locked button::after { content: " PRO"; color: var(--warn); font-size: 10px; }
.ex-brief {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 8px;
}
.score-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-dim);
  margin-bottom: 6px;
}
.score-bar strong { color: var(--accent); }

/* Monitor / chart */
.monitor-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.vital-tile {
  background: #05080e;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  min-height: 52px;
}
.vital-tile .k {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.vital-tile .v {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--good);
  line-height: 1.2;
}
.vital-tile .u { font-size: 10px; color: var(--text-dim); margin-left: 2px; }
.vital-tile.warn .v { color: var(--warn); }
.vital-tile.crit .v { color: var(--crit); }

.news2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 6px;
}
.news2-table th, .news2-table td {
  border: 1px solid var(--border);
  padding: 4px 6px;
  text-align: center;
}
.news2-table th { background: var(--bg-elevated); color: var(--text-dim); font-weight: 600; }
.news2-s0 { background: var(--news-0); }
.news2-s1 { background: var(--news-1); }
.news2-s2 { background: var(--news-2); }
.news2-s3 { background: var(--news-3); color: #ffc9cf; }

.chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  margin-top: 6px;
}
.chart-table th, .chart-table td {
  border: 1px solid var(--border);
  padding: 3px 4px;
  text-align: right;
}
.chart-table th { text-align: left; background: var(--bg-elevated); }

.contam-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.contam-zone {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  font-size: 11px;
  min-height: 56px;
  background: var(--bg-elevated);
}
.contam-zone.hot {
  border-color: var(--crit);
  background: rgba(255, 77, 94, 0.15);
  color: #ffb0b8;
}

.ppe-seq {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
}
.ppe-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 11px;
  min-height: 36px;
}
.ppe-chip.ok { border-color: var(--good); color: var(--good); }
.ppe-chip.bad { border-color: var(--crit); color: var(--crit); }

.pro-cta {
  display: none;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid var(--warn);
  border-radius: 6px;
  background: rgba(245, 166, 35, 0.08);
  font-size: 12px;
  color: var(--warn);
}
.pro-cta.show { display: block; }

.prof-panel {
  display: none;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 8px;
}
.prof-panel.show { display: block; }
.prof-panel.hidden-sol .solution-box { display: none; }

.live-alarms {
  min-height: 20px;
  font-size: 11px;
  color: var(--crit);
  margin-bottom: 4px;
}

.collapse-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  min-width: var(--touch);
  min-height: var(--touch);
  width: var(--touch);
  height: var(--touch);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.collapse-btn:hover { border-color: var(--border); }

.tutor-box {
  margin: 6px 0;
  min-height: 0;
}
.tutor-reply {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
  white-space: pre-wrap;
}
.feedback.ok { border-color: var(--good); background: rgba(52, 211, 153, 0.08); color: var(--good); }

body.projector {
  font-size: 15px;
}
body.projector .vital-tile .v { font-size: 26px; }
body.projector .sb-title { font-size: 16px; }
body.projector .btn { min-height: 40px; font-size: 13px; }

body.panel-side-collapsed .panel-practice { display: none; }
body.panel-mon-collapsed .panel-monitor { display: none; }
body.panel-side-collapsed .station,
body.panel-mon-collapsed .station {
  grid-template-columns: 1fr;
}

/* Chromebook heights — no vertical scroll on main scene */
@media (max-height: 600px) {
  :root { --header-h: 40px; --disclaimer-h: 22px; }
  .disclaimer { font-size: 10px; }
  .a11y-bar { padding: 2px 6px; }
  .a11y-toggle { font-size: 10px; }
  .bed-visual { min-height: 60px; }
  .patient-figure { height: 48px; }
  .canvas-wrap { min-height: 100px; }
  .canvas-wrap canvas { max-height: 140px; }
  .ex-list { display: none; }
  .ex-select-label { display: flex; }
  .vital-tile { min-height: 42px; padding: 4px 6px; }
  .vital-tile .v { font-size: 15px; }
  .pb { padding: 6px; }
  .panel-practice {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .panel-practice .pb {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
  }
  .ex-brief { flex-shrink: 0; }
}

@media (max-height: 530px) {
  :root { --header-h: 36px; --disclaimer-h: 18px; }
  .disclaimer { font-size: 9px; padding: 0 6px; }
  .disclaimer .role-note { display: none; }
  .a11y-bar { display: none; }
  .app { grid-template-rows: var(--disclaimer-h) var(--header-h) 1fr; }
  .monitor-strip { grid-template-columns: repeat(6, 1fr); }
  .vital-tile .k { display: none; }
  .ex-list { display: none; }
  .ex-select-label { display: flex; }
  .patient-figure { height: 36px; }
  .canvas-wrap { min-height: 80px; }
  .canvas-wrap canvas { max-height: 110px; }
}

/* Barra de suscripción del sitio: en móvil tapa la cabecera → dock inferior. */
@media (max-width: 760px) {
  body.simulath-has-upgrade-bar #simulath-upgrade-bar {
    top: auto !important;
    bottom: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
    border-bottom: 0 !important;
    border-top: 1px solid rgba(240, 113, 103, 0.45) !important;
    max-height: 36vh !important;
    z-index: 55;
  }
  body.simulath-has-upgrade-bar {
    padding-top: 0 !important;
  }
}

/* Mobile — scene always visible (top); practice/monitor swap below */
@media (max-width: 720px) {
  .app {
    padding-bottom: 52px; /* room for mobile dock */
  }
  .station {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 48vh) minmax(0, 1fr);
  }
  body.mob-focus-scene .station {
    grid-template-rows: 1fr;
  }
  .panel-monitor {
    display: none;
  }
  body.show-monitor .panel-monitor { display: flex; }
  body.show-monitor .panel-practice { display: none; }
  .panel { border-right: 0; border-bottom: 1px solid var(--border); }
  .sb-all { display: none; }
  .sb-title { font-size: 11px; max-width: 110px; }
  .ex-list { display: none; }
  .ex-select-label { display: flex; }
  .btn,
  .patient-chip,
  .ex-list li button,
  .ex-list .ex-pick,
  .action-row .btn,
  .instr-tabs .btn,
  .tabs .btn,
  .collapse-btn,
  .sb-logo,
  .sb-lang,
  .sb-lang select,
  #lang,
  .aula-slot .btn,
  .a11y-toggle,
  .ex-select {
    min-height: var(--touch) !important;
    min-width: var(--touch);
  }
  /* a11y compacta a 360: UNA fila (no 1/3 pantalla), checkbox 18px, label ≥44 alto */
  .a11y-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 0 4px;
    max-height: 44px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
  }
  .a11y-toggle {
    min-height: 44px !important;
    min-width: 44px !important;
    height: 44px;
    padding: 0 4px;
    font-size: 9px;
    gap: 4px;
    flex: 1 1 0;
    max-width: none;
    box-sizing: border-box;
  }
  .a11y-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 3.8em;
  }
  /* 4 checkboxes a11y: cada input ≥ 44×44 (objetivo táctil medible) */
  .a11y-toggle input {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin: 0;
    flex-shrink: 0;
  }
  .a11y-toggle {
    padding: 0 2px;
    gap: 2px;
  }
  .a11y-toggle span {
    max-width: 2.6em;
    font-size: 8px;
  }
  .mobile-dock {
    display: flex !important;
  }
  /* Compact scene so instruments stay in view */
  .panel-scene .pb {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .bed-visual { min-height: 0; flex: 0 0 auto; }
  /* Escena visible a 360 px (compacta); no ocultar la víctima */
  .patient-figure {
    display: block;
    height: 56px;
    flex-shrink: 0;
  }
  .bed-visual {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 0;
  }
  .patient-meta { font-size: 10px; padding: 2px 0; }
  .canvas-wrap { min-height: 100px; flex: 1; }
  .canvas-wrap canvas { max-height: 140px; width: 100%; }
  .instrument-dock {
    flex: 1 1 auto;
    min-height: 140px;
    overflow: hidden;
  }
  .instr-workspace { overflow: auto; -webkit-overflow-scrolling: touch; min-height: 120px; }
  .triage-board {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .triage-card {
    padding: 6px;
    min-height: 0;
  }
  .triage-card .btn {
    min-height: 44px;
    font-size: 10px;
  }
  .triage-airway {
    width: 100%;
  }
}

@media (max-width: 420px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  .app {
    grid-template-rows: auto auto auto 1fr;
  }
  .sitebar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 4px 6px;
    align-items: center;
    height: auto;
    min-height: var(--touch);
    padding: 4px 6px;
    overflow: visible;
    z-index: 60;
  }
  .sb-logo { grid-column: 1; grid-row: 1; }
  .sb-logo span { display: none; }
  .sb-title {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
    font-size: 11px;
  }
  .sb-lang {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    z-index: 70;
  }
  .sb-lang {
    min-width: var(--touch);
    min-height: var(--touch);
  }
  .sb-lang select,
  #lang {
    min-width: max(72px, var(--touch));
    max-width: 104px;
    width: auto;
    min-height: var(--touch);
    height: var(--touch);
  }
  .sb-logo,
  #sbHome {
    min-width: var(--touch) !important;
    min-height: var(--touch) !important;
  }
  .aula-slot {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: stretch;
  }
  .aula-slot .btn {
    flex: 1;
    padding: 0 6px;
    font-size: 10px;
    min-height: var(--touch);
  }
  .sb-all, .sb-sp { display: none; }
  .controls-grid { grid-template-columns: 1fr; }
  .monitor-strip { grid-template-columns: repeat(2, 1fr); }
  .station {
    grid-template-rows: minmax(220px, 42vh) minmax(0, 1fr);
  }
  .instr-tabs .btn { flex: 1 1 45%; min-height: var(--touch); }
  .instrument-dock { min-height: 150px; }
}

.mobile-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: #0b121c;
  border-top: 1px solid var(--border);
  padding: 4px;
  gap: 4px;
}
.mobile-dock .btn { flex: 1; min-height: var(--touch); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.timer-badge {
  font-family: var(--mono);
  color: var(--warn);
  font-size: 12px;
}
.timer-badge.crit { color: var(--crit); }

/* Emergency-specific */
.compress-zone{min-height:var(--touch);border:2px dashed var(--border);border-radius:8px;display:flex;align-items:center;justify-content:center;background:var(--bg-elevated);user-select:none;touch-action:manipulation;font-weight:700;letter-spacing:.08em;}
.compress-zone:active,.compress-zone.hot{border-color:var(--accent);background:rgba(240,113,103,.12);}
.depth-slider{width:100%;min-height:44px;}
.triage-board{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;}
.triage-card{border:1px solid var(--border);border-radius:6px;padding:8px;font-size:11px;min-height:64px;background:var(--bg-elevated);}
.triage-card.green{border-color:#34d399;}
.triage-card.yellow{border-color:#f5a623;}
.triage-card.red{border-color:#ff4d5e;}
.triage-card.black{border-color:#8fa2b8;}
.aed-panel{border:1px solid var(--border);border-radius:8px;padding:8px;background:#05080e;}
.ecg-wrap canvas,.depth-wrap canvas{width:100%;height:90px;display:block;}
.action-row{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0;}
.action-row .btn{min-height:var(--touch);}
.controls-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;}
.metric-bar{height:10px;background:#1a2433;border-radius:4px;overflow:hidden;margin-top:4px;}
.metric-bar>span{display:block;height:100%;background:var(--accent);}
.phone-112{font-family:var(--mono);font-size:18px;color:var(--good);letter-spacing:.12em;}

