@media screen {
  html.app-help-open body.compact-app #guide, body.compact-app #guide:target { display: block; }
  /* Preliminary projects can style their cutting warning independently of the wizard. */
  html body[data-wizard-current]:not([data-wizard-current="1"]) main [data-wizard-step="1"],
  html body[data-wizard-current]:not([data-wizard-current="2"]) main [data-wizard-step="2"],
  html body[data-wizard-current]:not([data-wizard-current="3"]) main [data-wizard-step="3"],
  html body[data-wizard-current]:not([data-wizard-current="4"]) main [data-wizard-step="4"],
  html body[data-wizard-current]:not([data-wizard-current="5"]) main [data-wizard-step="5"],
  html body[data-wizard-current]:not([data-wizard-current="5"]) main #wizard-cutting[data-wizard-step="5"] { display: none !important; }
}
@media screen and (max-width: 900px), screen and (pointer: coarse) {
  body.compact-app #config #simulation-module > #graph { order: -12; margin: 0; }
  body.compact-app #config #simulation-module > #relative-response:not([hidden]) { display: contents; }
  #config #simulation-module #relative-response > svg { order: -12; min-height: 0; }
  #config #simulation-module #relative-response > svg:empty { display: none; }
  #config #simulation-module #relative-response > h3 { order: -13; font-size: 1rem; margin: 0; }
  #config #simulation-module #relative-response > [role=status] { order: -9; margin: .25rem 0; }
  body.compact-app #config #simulation-module > div.chart-tuning {
    order: -10;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0;
    padding: 8px;
  }
  #config #simulation-module .chart-tuning-grid {
    order: -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    align-items: end;
  }
  #config .chart-tuning-grid > :has(#quick-fb) { grid-area: 1 / 1; }
  #config .chart-tuning-grid > :has(#quick-vb) { grid-area: 1 / 2; }
  #config .chart-tuning-grid > :has(#quick-power) { grid-area: 2 / 1; }
  #config .chart-tuning-grid > :has(#quick-hp) { grid-area: 2 / 2; }
  #config .chart-tuning-grid > :has(#quick-type) { grid-area: 3 / 1 / 4 / -1; }
  #config .chart-tuning-grid label { gap: 3px; margin: 0; line-height: 1.2; }
  #config .chart-tuning-grid input, #config .chart-tuning-grid select { margin: 0; box-sizing: border-box; }
  #config .chart-tuning-grid input[type=range] { height: 36px; min-height: 36px; padding: 0; }
  #config #simulation-module div.chart-tuning > :is(h3,p) { margin: 0; }
}
