.escape-mechanism-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 12px;
  background: rgba(15, 23, 42, .45);
}

.escape-mechanism-badge > i {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(53, 214, 255, .13);
  color: #7dd3fc;
}

.escape-mechanism-badge div {
  display: grid;
  gap: 2px;
}

.escape-mechanism-badge strong {
  color: #f8fafc;
  font-size: .9rem;
}

.escape-mechanism-badge span {
  color: #cbd5e1;
  font-size: .78rem;
  line-height: 1.4;
}

.escape-mechanism-keypad {
  display: grid;
  grid-template-columns: repeat(5, minmax(42px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.escape-mechanism-key {
  min-height: 42px;
  border: 1px solid rgba(125, 211, 252, .34);
  border-radius: 10px;
  background: rgba(14, 116, 144, .16);
  color: #e0f2fe;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.escape-mechanism-key:hover,
.escape-mechanism-key:focus-visible {
  border-color: #38bdf8;
  background: rgba(14, 116, 144, .28);
  outline: 3px solid rgba(56, 189, 248, .18);
  outline-offset: 1px;
}

.escape-mechanism-key.erase {
  color: #fbbf24;
}

.escape-mechanism-keypad-input[readonly] {
  cursor: default;
}

.escape-mechanism-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 12px 0;
}

.escape-mechanism-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 12px;
  background: rgba(15, 23, 42, .58);
  color: #e2e8f0;
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
}

.escape-mechanism-choice > span {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(148, 163, 184, .13);
  color: #94a3b8;
  font-weight: 900;
}

.escape-mechanism-choice strong {
  font-size: .9rem;
}

.escape-mechanism-choice:hover,
.escape-mechanism-choice:focus-visible {
  border-color: #38bdf8;
  outline: 3px solid rgba(56, 189, 248, .16);
  outline-offset: 1px;
}

.escape-mechanism-choice.selected {
  border-color: #22d3ee;
  background: rgba(8, 145, 178, .2);
}

.escape-mechanism-choice.selected > span {
  background: #0891b2;
  color: #fff;
}

.escape-mechanism-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.escape-mechanism-slot {
  width: 48px;
  min-height: 52px;
  border: 1px solid rgba(125, 211, 252, .42);
  border-radius: 11px;
  background: rgba(15, 23, 42, .68);
  color: #f8fafc;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.escape-mechanism-slot:focus {
  border-color: #38bdf8;
  outline: 3px solid rgba(56, 189, 248, .18);
  outline-offset: 1px;
}

.mechanism-terminal .escape-mechanism-badge > i { color: #a7f3d0; }
.mechanism-keypad .escape-mechanism-badge > i { color: #7dd3fc; }
.mechanism-choice .escape-mechanism-badge > i { color: #fde68a; }
.mechanism-slots .escape-mechanism-badge > i { color: #c4b5fd; }

@media (max-width: 680px) {
  .escape-mechanism-keypad {
    grid-template-columns: repeat(4, minmax(40px, 1fr));
  }

  .escape-mechanism-choices {
    grid-template-columns: 1fr;
  }

  .escape-mechanism-slot {
    width: 44px;
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .escape-mechanism-choice,
  .escape-mechanism-key {
    transition: none;
  }
}
