/* Settings and palette height must never stretch the image viewport. */
.app {
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  align-items: start;
}
.stage {
  --preview-height: clamp(260px, 60vh, 510px);
  min-width: 0;
  min-height: 0;
  align-self: start;
}
.preview-layout,
body.editing-animation .preview-layout {
  flex: none;
  min-height: 0;
  align-items: start;
}
.drop,
.drop.has-image,
body.editing-animation .drop {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  height: var(--preview-height);
  overflow: hidden;
}
.drop #canvas,
body.editing-animation .drop #canvas {
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}
/* At explicit zoom levels the entire canvas stays reachable by scrolling. */
.drop.preview-zoomed {
  display: block;
  overflow: auto;
}
.drop.preview-zoomed #canvas { max-width: none; max-height: none; }
.preview-palettes,
body.editing-animation .preview-palettes {
  align-self: start;
  max-height: var(--preview-height);
  overflow: auto;
  scrollbar-gutter: stable;
}
body.editing-animation .preview-palettes { max-height: 260px; }
.note:empty { display: none; }
.status { overflow-wrap: anywhere; }
.empty { max-width: 100%; padding: 16px; }
.empty strong { font-size: 18px; }
@media (max-width: 900px) {
  .preview-palettes { max-height: 260px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
}
