.python-dialog { width: min(1060px, 100%); min-width: 0; }
.python-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 16px;
}
.python-workbench section { display: grid; align-content: start; gap: 8px; min-width: 0; }
.python-workbench label { color: #344363; font-weight: 650; font-size: .86rem; }
.python-workbench textarea, #pythonTitle, #pythonOutput {
  width: 100%; border: 1px solid #dce3f1; border-radius: 10px;
  padding: 10px 12px; background: #f7faff; color: #182544;
}
.python-workbench textarea, #pythonOutput {
  font: 14px/1.6 ui-monospace, Consolas, monospace; tab-size: 4;
}
#pythonCode { min-height: 320px; resize: vertical; }
#pythonInput { min-height: 96px; resize: vertical; }
#pythonOutput { margin: 0; height: 205px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.python-workbench small, #pythonStatus { color: #52627b; font-size: .78rem; margin: 0; }
.python-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (max-width: 680px) {
  .python-dialog { max-height: calc(100dvh - 44px); }
  .python-workbench { grid-template-columns: 1fr; }
  #pythonCode { min-height: 155px; }
  #pythonInput { min-height: 58px; }
  #pythonOutput { height: 115px; }
}
