@page proof-a4 { size: 210mm 297mm; margin: 0; }
@page proof-a6 { size: 105mm 148mm; margin: 0; }

/* Use the editor's relative placement coordinates on a sheet with physical dimensions. */
body:has(#sheet-workspace:not([hidden]) .sheet-placement) {
  page: proof-a4;
  --proof-width: 210mm;
  --proof-height: 297mm;
  margin: 0;
  padding: 0;
  background: white;
}
body:has(#sheet-workspace:not([hidden]) [data-paper-size="A6"] .sheet-placement) {
  page: proof-a6;
  --proof-width: 105mm;
  --proof-height: 148mm;
}
body:has(#sheet-workspace:not([hidden]) .sheet-placement) {
  & > :not(main),
  & main > :not(#sheet-workspace),
  & #sheet-workspace > :not(.sheet-editor),
  & .sheet-editor > :not(#sheet-paper),
  & .sheet-paper .resize-handle { display: none !important; }

  & main, & #sheet-workspace, & .sheet-editor, & #sheet-paper {
    display: block;
    box-sizing: border-box;
    width: var(--proof-width);
    height: var(--proof-height);
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    border-radius: 0;
    box-shadow: none;
    background: white;
  }
  & #sheet-paper .sheet-placement {
    z-index: auto;
    outline: 0;
    box-shadow: none;
  }
}
