.sheet img {
  position: absolute;
  inset: 50% auto auto 50%;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
  transform: translate(-50%, -50%) rotate(var(--rotation, 0deg));
}
.sheet[data-sideways] img {
  width: calc(100% / var(--aspect));
  height: calc(100% * var(--aspect));
}

.source-switch { margin-bottom: 9px; }
.source-switch button { flex: 1; height: 31px; }
.new-abstract { justify-content: space-between; width: 100%; min-height: 52px; padding-inline: 12px; }
.upload {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 57px;
  padding: 7px;
  border: 1px dashed var(--field-border-hover);
  border-radius: 10px;
  background: var(--field-background);
  cursor: pointer;
  transition: background-color 140ms, border-color 140ms;
}
.upload:hover, .upload.dragging, .panel:has(#file-input:focus-visible) .upload {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload img { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 6px; object-fit: cover; }
.upload-text { min-width: 0; flex: 1; display: grid; gap: 2px; }
.upload-text strong { font-size: 12px; font-weight: 650; }
#file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.upload-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-right: 2px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-soft-foreground);
}
.colors #palette { width: 100%; }
.palette-colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.palette-colors label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.palette-colors input {
  width: 100%;
  height: 30px;
  padding: 2px 4px;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: var(--field-background);
  cursor: pointer;
}
.palette-reset {
  margin-top: 7px;
  padding-block: 3px;
  color: var(--accent-soft-foreground);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.palette-reset:hover { color: var(--foreground); }
