:root {
  --ink: #12121a;
  --muted: #5c5f73;
  --accent: #ff6a3d;
  --accent-2: #1f7ae0;
  --panel: #ffffffcc;
  --bg-1: #d4d8e0;
  --bg-2: #c6ccd6;
  --shadow: 0 20px 60px rgba(18, 18, 26, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #e2e5ec 0%, #d3d8e1 45%, #c6ccd6 100%);
  min-height: 100vh;
}

.app {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 18px 20px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  min-height: 100vh;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.header-main {
  flex: 1 1 auto;
  min-width: 0;
}

.header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.usyd-logo {
  width: 96px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

h1 {
  margin: 0 0 4px;
  font-size: clamp(15px, 2vw, 30px);
  white-space: nowrap;
}

.subhead {
  margin: 0;
  color: var(--muted);
  max-width: 560px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  gap: 6px;
  background: var(--panel);
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
}

.stat-value {
  font-size: 16px;
  font-weight: 600;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid #d7d8e3;
  padding: 10px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  min-height: 0;
}

#controlsPanel {
  grid-column: 1;
  grid-row: 1 / 3;
  position: sticky;
  top: 8px;
  align-self: start;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  max-height: calc(100vh - 8px);
}

#previewPanel {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 8px;
  align-self: stretch;
  position: static;
  top: auto;
  max-height: none;
  overflow: visible;
}

#reportPanel {
  grid-column: 2;
  grid-row: 2;
  /* Priority 0.6 regression guard:
     Keep Report anchored below Network Preview in normal flow on all screens.
     Do not viewport-cap this panel; users must always be able to scroll to
     Report View + Status below the map regardless of screen height. */
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: stretch;
  overflow: visible;
  max-height: none;
}

/* Priority 0.6 regression guard:
   Network Preview and Report are top-level collapsible panels.
   Keep explicit +/- affordances so collapse behavior remains discoverable. */
.panelDetails > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.08rem;
  font-weight: 700;
  color: #2f395f;
}

.panelDetails > summary::-webkit-details-marker {
  display: none;
}

.panelDetails > summary::after {
  content: "+";
  font-size: 18px;
  line-height: 1;
  color: #65709b;
}

.panelDetails[open] > summary::after {
  content: "-";
}

.panelDetailsBody {
  margin-top: 8px;
}

#previewPanel h2,
#reportPanel h2 {
  margin: 0;
  font-size: 1.08rem;
}

#reportPanel h3 {
  margin: 0;
  font-size: 0.96rem;
}

.reportSubsection {
  border: 1px solid #dfe3f4;
  border-radius: 10px;
  background: #ffffff;
}

.reportSubsection > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-weight: 700;
  color: #2f395f;
}

.reportSubsection > summary::-webkit-details-marker {
  display: none;
}

.reportSubsection > summary::after {
  content: "+";
  font-size: 16px;
  line-height: 1;
  color: #65709b;
}

.reportSubsection[open] > summary::after {
  content: "-";
}

.reportSubsection[open] > summary {
  border-bottom: 1px solid #e8ecf8;
}

.reportSubsectionBody {
  padding: 8px;
  display: grid;
  gap: 8px;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.modeBar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid #d8dced;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8f9ff;
}

.modeBar label {
  font-size: 12px;
  font-weight: 600;
  color: #39405f;
}

.controls * {
  min-width: 0;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.engineParamPanel {
  display: none;
  gap: 8px;
}

.engineParamPanel.active {
  display: grid;
}

.compositionPanel {
  display: none;
  gap: 8px;
  border: 1px dashed #d9dced;
  border-radius: 10px;
  background: #ffffffd9;
  padding: 8px;
}

.compositionPanel.active {
  display: grid;
}

.optionNote {
  margin-top: 0;
}

.compositionCatalog {
  border: 1px solid #e2e5f2;
  border-radius: 8px;
  padding: 6px;
  background: #fcfdff;
  display: grid;
  gap: 6px;
}

.catalogBlock {
  border: 1px solid #e8ebf6;
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
}

.catalogHeading {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: #3f4562;
}

.catalogList {
  display: grid;
  gap: 4px;
}

.catalogItem {
  border: 1px solid #dce2f6;
  border-radius: 6px;
  padding: 4px 6px;
  background: #f8faff;
}

.catalogItem.planned {
  border-color: #e5e8ef;
  background: #f4f5f8;
  opacity: 0.72;
}

.catalogItemHead {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.catalogName {
  font-size: 11px;
  font-weight: 600;
  color: #2f3450;
}

.catalogItem.planned .catalogName {
  color: #62697f;
}

.catalogBadge {
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  padding: 1px 6px;
  border: 1px solid #c2d4ff;
  background: #e9f0ff;
  color: #2f58b4;
}

.catalogItem.planned .catalogBadge {
  border-color: #d6dae5;
  background: #edf0f6;
  color: #6d7388;
}

.catalogNote {
  margin: 3px 0 0;
  font-size: 11px;
  color: #5b6180;
}

.hiddenByMode {
  display: none !important;
}

.controlSection[hidden] {
  display: none !important;
}

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

.buttonRow {
  display: flex;
  gap: 8px;
}

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

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #4b526f;
}

.checkInline {
  flex-direction: row;
  align-items: flex-start;
  border: 1px solid #d7d8e3;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f9faff;
}

.check input {
  width: auto;
  margin: 0;
  min-width: 18px;
  min-height: 18px;
}

.controlSection {
  border: 1px solid #dde0ec;
  border-left-width: 5px;
  border-radius: 12px;
  padding: 8px;
  display: block;
  min-width: 0;
}

.controlSection > summary {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  color: #2f3450;
  list-style: none;
}

.controlSection > summary::-webkit-details-marker {
  display: none;
}

.controlSection > summary::after {
  content: "+";
  float: right;
  color: #5b6282;
  font-weight: 700;
}

.controlSection[open] > summary::after {
  content: "-";
}

.controlBody {
  margin-top: 6px;
  display: grid;
  gap: 6px;
}

.sectionNetwork {
  border-left-color: #2f6bff;
  background: #f7faff;
}

.sectionParams {
  border-left-color: #d17a00;
  background: #fffaf2;
}

.sectionExport {
  border-left-color: #0b8f66;
  background: #f4fff9;
}

.sectionAssign {
  border-left-color: #1366d6;
  background: #f4f9ff;
}

.sectionEdit {
  border-left-color: #8b5cf6;
  background: #f7f5ff;
}

.sectionAnalyze {
  border-left-color: #0f766e;
  background: #f3fffc;
}

.sectionAssembly {
  border-left-color: #6b7280;
  background: #f8f9fc;
}

label {
  font-size: 12px;
  color: var(--muted);
}

.rangeHint {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #7b8098;
}

.rangeWarning {
  margin: 2px 0 6px;
  padding: 6px 8px;
  border: 1px solid #f4cf92;
  border-radius: 8px;
  background: #fff7e9;
  color: #7c4a00;
}

.editSelection {
  margin: 0;
  font-size: 12px;
  color: #4b526f;
  background: #ffffffd9;
  border: 1px solid #d9dcea;
  border-radius: 8px;
  padding: 6px 8px;
}

.inlineHelp {
  margin: 0;
  font-size: 12px;
  color: #5c5f73;
}

.subheading {
  margin: 4px 0 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #3f4562;
}

.architectureFrame {
  border: 1px solid #d9dced;
  border-radius: 10px;
  padding: 8px;
  background: #ffffffd9;
  display: grid;
  gap: 8px;
}

.architectureFrame[hidden] {
  display: none !important;
}

.architectureFrame > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #3f4562;
  list-style: none;
}

.architectureFrame > summary::-webkit-details-marker {
  display: none;
}

.architectureFrame > summary::after {
  content: "+";
  float: right;
  color: #5b6282;
  font-weight: 700;
}

.architectureFrame[open] > summary::after {
  content: "-";
}

.architectureFrame[open] > summary {
  margin-bottom: 2px;
}

.modelSubsection {
  border: 1px solid #d9dced;
  border-radius: 10px;
  padding: 8px;
  background: #ffffffd9;
  display: grid;
  gap: 8px;
}

.modelSubsection[hidden] {
  display: none !important;
}

.modelSubsection > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #3f4562;
  list-style: none;
}

.modelSubsection > summary::-webkit-details-marker {
  display: none;
}

.modelSubsection > summary::after {
  content: "+";
  float: right;
  color: #5b6282;
  font-weight: 700;
}

.modelSubsection[open] > summary::after {
  content: "-";
}

.modelSubsection[open] > summary {
  margin-bottom: 2px;
}

.editNotice {
  margin: 0;
  font-size: 12px;
  color: #4b526f;
}

.editSubsection {
  border: 1px solid #d9dced;
  border-radius: 10px;
  padding: 8px;
  background: #ffffffd9;
  display: grid;
  gap: 8px;
}

.editSubsection[hidden] {
  display: none !important;
}

.editSubsection > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #3f4562;
  list-style: none;
}

.editSubsection > summary::-webkit-details-marker {
  display: none;
}

.editSubsection > summary::after {
  content: "+";
  float: right;
  color: #5b6282;
  font-weight: 700;
}

.editSubsection[open] > summary::after {
  content: "-";
}

.editSubsection[open] > summary {
  margin-bottom: 2px;
}

.saveGrid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
}

.compactCheck {
  justify-content: center;
  align-items: center;
  min-height: 42px;
}

input,
select {
  width: 100%;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid #d7d8e3;
  font-family: inherit;
  font-size: 13px;
}

input[type="file"] {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

input[type="file"]::file-selector-button {
  margin-right: 8px;
}

input:disabled,
select:disabled {
  background: #f1f2f7;
  color: #8a8da3;
  cursor: not-allowed;
}

/* Safari sometimes shows contact/credential autofill buttons inside number inputs. */
input[type="number"]::-webkit-contacts-auto-fill-button,
input[type="number"]::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.run {
  margin-top: 8px;
  width: 100%;
  background: linear-gradient(120deg, #2f6bff, #1f7ae0);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(255, 106, 61, 0.25);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.run:hover {
  transform: translateY(-2px);
}

.run:active {
  transform: translateY(1px);
  filter: brightness(0.95);
}

.run:disabled {
  cursor: not-allowed;
  filter: saturate(0.65) brightness(0.95);
}

.secondary {
  width: 100%;
  background: #f4f6ff;
  color: #1f2a5a;
  border: 1px solid #d7defe;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease;
}

.secondary:hover {
  background: #e9eeff;
}

.secondary:active {
  transform: translateY(1px);
  filter: brightness(0.96);
}

.secondary:disabled {
  cursor: not-allowed;
  filter: saturate(0.6) brightness(0.97);
}

button.button-busy {
  transform: translateY(1px);
  filter: brightness(0.95);
}

.hint {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}

.hint code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.error {
  font-size: 12px;
  color: #b42318;
  background: #ffe7e7;
  border: 1px solid #f4b4b4;
  padding: 8px 10px;
  border-radius: 10px;
  display: block;
}

.panelSelect {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.panelToggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 0;
  white-space: nowrap;
  min-width: 84px;
  justify-self: start;
  align-self: end;
}

.panelToggle input[type="checkbox"] {
  width: auto;
  max-width: none;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  flex: 0 0 auto;
}

.panelToggle span {
  white-space: nowrap;
}

.previewLayerControls {
  display: grid;
  grid-template-columns: minmax(170px, 1.5fr) minmax(140px, 1fr) minmax(190px, 1.2fr) minmax(84px, 0.45fr) minmax(220px, 1.25fr);
  gap: 10px;
  align-items: end;
}

.mapScaleUserRangeControl[hidden] {
  /* Keep grid slot reserved so neighboring controls do not jump when
     absolute(user) mode is toggled off. */
  display: grid !important;
  visibility: hidden;
  pointer-events: none;
}

.mapScaleUserRangeInputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

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

.paramRow[hidden] {
  display: none !important;
}

.advancedParams {
  margin-top: 2px;
  border: 1px dashed #d7d8e3;
  border-radius: 10px;
  padding: 6px 8px;
  background: #ffffffd9;
}

.advancedParams summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #4b526f;
}

.advancedParams[open] {
  padding-bottom: 8px;
}

.advancedParams .control {
  margin-top: 8px;
}

.meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.submeta {
  margin-top: -4px;
}

.exportGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.exportGrid .secondary {
  padding: 6px 8px;
  font-size: 12px;
}

.canvas-wrap {
  position: relative;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 12px;
  min-height: 0;
  height: 100%;
}

.mapTopTools {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.mapLegendPanel {
  min-width: 240px;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d7defe;
  border-radius: 10px;
  padding: 6px 8px;
  box-shadow: 0 6px 16px rgba(18, 18, 26, 0.14);
}

.mapLegendHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mapLegendHead strong {
  font-size: 12px;
  color: #1f253f;
}

.mapLegendToggle {
  min-width: 28px;
  padding: 2px 6px;
  line-height: 1;
}

.mapLegendBody {
  margin-top: 4px;
  display: grid;
  gap: 2px;
}

.mapLegendBody[hidden] {
  display: none !important;
}

.mapLegendRamp {
  height: 12px;
  border-radius: 6px;
  border: 1px solid rgba(85, 92, 120, 0.45);
}

.mapLegendMinMax {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #3f4562;
}

.mapScaleIndicator {
  margin-left: auto;
  display: grid;
  gap: 3px;
  justify-items: center;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #3f486b;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d7defe;
  border-radius: 10px;
  padding: 4px 8px;
  box-shadow: 0 6px 16px rgba(18, 18, 26, 0.14);
}

.mapScaleIndicatorLabel {
  white-space: nowrap;
}

.mapScaleIndicatorBar {
  display: block;
  position: relative;
  width: var(--map-scale-bar-px, 56px);
  min-width: 24px;
  max-width: 220px;
  height: 10px;
  border-bottom: 2px solid #1f253f;
}

.mapScaleIndicatorBar::before,
.mapScaleIndicatorBar::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 7px;
  bottom: -2px;
  background: #1f253f;
}

.mapScaleIndicatorBar::before {
  left: 0;
}

.mapScaleIndicatorBar::after {
  right: 0;
}

.mapStepTools {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d7defe;
  border-radius: 10px;
  padding: 4px 6px;
  box-shadow: 0 6px 16px rgba(18, 18, 26, 0.14);
}

.mapStepTools .secondary {
  width: auto;
  min-width: 30px;
  padding: 4px 8px;
}

#mapStepLabel {
  font-size: 11px;
  color: #3f486b;
  min-width: 120px;
  text-align: center;
}

canvas {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(135deg, #fdfcfb, #f2f6ff);
}

.drop-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed #d7d8e3;
  display: none;
}

.canvas-wrap.dragover .drop-hint {
  display: block;
}

#reportView {
  margin: 0;
  white-space: pre-wrap;
  overflow: auto;
  min-height: 0;
  background: #fff;
  border: 1px solid #d7d8e3;
  border-radius: 10px;
  padding: 8px;
  font-size: 12px;
}

.iterationExplorer {
  border: 1px solid #d7d8e3;
  border-radius: 10px;
  background: #ffffff;
  padding: 6px;
  display: grid;
  gap: 6px;
}

.iterationExplorer details {
  border: 1px solid #dfe3f4;
  border-radius: 8px;
  background: #f9faff;
  padding: 6px;
}

.iterationExplorer summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #33406e;
}

#iterationOverview {
  margin-top: 8px;
}

.iterationTrend {
  margin-top: 6px;
  min-height: 34px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 4px;
  border: 1px dashed #d5dbf5;
  border-radius: 8px;
  background: #fff;
}

.iterationTrend.empty {
  display: none;
}

.trendBar {
  flex: 1 1 0;
  min-width: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #f08a63 0%, #2f6bff 100%);
}

.iterationTools {
  margin-top: 6px;
  display: flex;
  gap: 6px;
}

.iterationTools .secondary {
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
}

.iterationSteps {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.iterationCard {
  border: 1px solid #dfe3f4;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px;
}

.iterationCard summary {
  color: #23315b;
}

.iterationCard[open] summary {
  margin-bottom: 6px;
}

.iterationCard pre {
  margin: 0;
  white-space: pre-wrap;
  background: #fbfcff;
  border: 1px solid #edf0fb;
  border-radius: 6px;
  padding: 6px;
  font-size: 11px;
}

#status {
  margin: 0;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid #d7d8e3;
  border-radius: 10px;
  padding: 8px;
  font-size: 12px;
}

.progressRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

#progress {
  width: 190px;
}

#progressText {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .header {
    flex-direction: column;
  }
  .header-right {
    align-items: flex-start;
  }
  .usyd-logo {
    width: 96px;
  }
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .paramRow {
    grid-template-columns: 1fr;
  }

  .previewLayerControls {
    grid-template-columns: 1fr;
  }

  .mapTopTools {
    flex-direction: column;
    align-items: stretch;
  }

  .mapLegendPanel {
    max-width: none;
    width: 100%;
  }

  .compactGrid {
    grid-template-columns: 1fr;
  }

  .saveGrid {
    grid-template-columns: 1fr;
  }

  .buttonGrid {
    grid-template-columns: 1fr;
  }

  .exportGrid {
    grid-template-columns: 1fr;
  }

  #controlsPanel,
  #previewPanel,
  #reportPanel {
    grid-column: 1;
    grid-row: auto;
  }

  #controlsPanel {
    position: static;
    top: auto;
    align-self: stretch;
    max-height: none;
    overflow: visible;
  }

  #previewPanel {
    position: static;
    max-height: none;
  }

  #reportPanel {
    max-height: none;
    overflow: visible;
  }

  canvas {
    height: auto;
  }
}

@media (max-height: 920px) {
  #previewPanel {
    grid-template-rows: auto auto auto auto auto;
  }
}
