/* The paper keeps its intrinsic aspect ratio and document coordinates. */
#workspace{touch-action:none;overflow-anchor:none;overscroll-behavior:contain;scrollbar-gutter:stable}
#workspace .paper{width:var(--pf-paper-width,min(100%,850px));max-width:none;flex:none}
#workspace .paper canvas{touch-action:none}
#pfZoom{display:inline-flex;align-items:center;gap:2px;flex:none;border:1px solid var(--line);border-radius:9px;padding:2px;background:var(--surface);margin-left:4px}
#pfZoom button{height:30px;min-width:32px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;font-size:12px;font-weight:650;font-variant-numeric:tabular-nums}
#pfZoom button:hover{background:var(--hover)}#pfZoomValue{min-width:52px!important}#pfZoom .pf-icon{width:16px;height:16px}
@media(max-width:650px){#pfZoom{margin-left:0}#pfZoom button{min-width:28px;height:28px}#pfZoomValue{min-width:44px!important}}
@media print{#pfZoom{display:none!important}#workspace .paper{width:100%!important;max-width:100%!important}}

#workspace .paper{margin:0 auto;min-width:0}#workspace .paper canvas{touch-action:none!important}#workspace .paper #inkCanvas{pointer-events:none;position:absolute;inset:0}

/* End-of-page controls are ordinary DOM, never part of the drawing layers. */
#pfPageEnd{display:flex;flex-direction:column;align-items:center;gap:9px;width:min(100%,360px);margin:22px auto 0;padding:6px 0 14px;position:relative;user-select:none;-webkit-user-select:none}
.pf-page-end-label{font-size:12px;color:var(--muted);font-weight:600;font-variant-numeric:tabular-nums}
.pf-page-end-actions{display:flex;align-items:center;gap:8px;width:100%;justify-content:center}
#pfPageEnd .btn{min-height:46px;touch-action:manipulation;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center}
#pfEndPrev,#pfEndNext{min-width:46px;font-size:22px;background:var(--surface)}
#pfEndAdd{flex:1;max-width:220px;font-size:14px}
@media print{#pfPageEnd{display:none!important}}
