.modal-card {
  width: min(680px, calc(100vw - 30px));
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-card > header {
  position: static;
  flex: 0 0 auto;
}

.modal-card #modalBody {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.modal-actions {
  position: static;
  flex: 0 0 auto;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

.option-group {
  border: 1px solid #dbe2ee;
  border-radius: 10px;
  padding: 12px;
  margin: 0;
}

.option-group legend {
  padding: 0 5px;
  font-size: 13px;
  font-weight: 700;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.option-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #e3e8f1;
  border-radius: 8px;
  background: #fafbfd;
  font-weight: 500;
  cursor: pointer;
}

.option-check:has(input:checked) {
  border-color: #8ca5ef;
  background: #edf2ff;
  color: #244dbf;
}

.option-check input {
  min-width: auto;
  margin: 0;
  padding: 0;
}

.option-check span {
  font-size: 12px;
}

label small,
legend small {
  color: #8290a7;
  font-weight: 400;
}

@media (max-width: 560px) {
  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
