/* UX36 P51 development only: responsive, readable RPG Statistics fields.
   The original .form-grid is 12 columns, but renderStatField returns
   .rpg-stat-card (not .field) as its DIRECT grid child. The default
   therefore crammed each RPG stat into a one-twelfth-width cell.
   Keep this scoped to the Statistics module and leave other forms alone. */
.editor-panel .stats-module > .stats-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)) !important;
  grid-auto-flow: row !important;
  gap: 12px !important;
  width: 100%;
  min-width: 0;
}
.editor-panel .stats-module > .stats-grid > .rpg-stat-card {
  grid-column: auto !important;
  width: auto !important;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}
.editor-panel .stats-module > .stats-grid > .rpg-stat-card > .field {
  grid-column: auto !important;
  display: block;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
}
.editor-panel .stats-module > .stats-grid > .rpg-stat-card .field > label {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 13px !important;
  line-height: 1.4 !important;
  white-space: normal;
  overflow-wrap: break-word;
}
.editor-panel .stats-module > .stats-grid > .rpg-stat-card .field > label > span:first-child {
  flex: 1 1 130px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
}
.editor-panel .stats-module > .stats-grid > .rpg-stat-card .field > label > .field-label-tools {
  flex: 0 0 auto;
}
.editor-panel .stats-module > .stats-grid > .rpg-stat-card input,
.editor-panel .stats-module > .stats-grid > .rpg-stat-card select,
.editor-panel .stats-module > .stats-grid > .rpg-stat-card textarea {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  font-size: 14px !important;
  line-height: 1.4;
}
.editor-panel .stats-module > .stats-grid > .rpg-stat-card input,
.editor-panel .stats-module > .stats-grid > .rpg-stat-card select {min-height: 39px;}
.editor-panel .stats-module > .stats-grid > .rpg-stat-card textarea {min-height: 94px;}
/* Publisher-audit panels are explanations, not cramped multi-column form fields. */
.editor-panel .stats-module > .motw-rating-review,
.editor-panel .stats-module > .motw-loadout-review,
.editor-panel .stats-module > .motw-choice-review {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: start;
}
.editor-panel .stats-module > .motw-rating-review > *,
.editor-panel .stats-module > .motw-loadout-review > *,
.editor-panel .stats-module > .motw-choice-review > * {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 640px) {
  .editor-panel .stats-module > .stats-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
