.pl-reference { width:min(680px, calc(100vw - 24px)); max-height: min(91dvh, 880px); overflow:auto; padding:0; border:0; border-radius:12px; color:var(--pl-ink,#252824); }
.pl-reference .pl-dialog-head { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:1rem; background:white; border-bottom:1px solid var(--pl-line,#dededb); }
.pl-reference .pl-dialog-head h2 { margin:0; font-size:1.5rem; }
.pl-reference-body { padding:15px 22px 20px; }
.pl-reference-body > small { display:block; color:var(--pl-muted,#565956); line-height:1.45; margin:5px 0 12px; }
.pl-reference-body .pl-field { margin:10px 0; max-width:100%; }
.pl-reference-body input[type=file] { width:100%; max-width:100%; min-height:44px; height:auto; padding:7px; }
.pl-reference-body input[type=file]::file-selector-button { padding:6px 8px; margin-right:8px; }
.pl-reference-body input[type=range] { height:35px; width:100%; padding:0; accent-color:#b32b32; }
.pl-reference-body [data-ref=pages] input, .pl-reference-body [data-ref=scale] input { max-width:14rem; }
.pl-reference [data-ref=preview] { display:block; width:auto; height:auto; max-width:100%; max-height:36dvh; max-height:min(350px,36dvh); margin:4px auto 12px; cursor:crosshair; background:white; outline:1px solid #b6bab5; object-fit:contain; touch-action:manipulation; }
.pl-reference [data-ref=preview]:focus-visible { outline:3px solid #ad2332; outline-offset:2px; }
.pl-reference-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.pl-reference-position summary { cursor:pointer; display:list-item; min-height:40px; padding:10px 0; font-weight:600; }
.pl-reference-fit { display:flex; align-items:center; gap:8px; min-height:44px; }
.pl-reference-actions { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; }
.pl-reference-actions button { min-height:44px; }
.pl-reference [data-ref=status] { min-height:1.3em; color:var(--pl-muted,#565956); font-size:.9rem; margin:8px 0 13px; }
.pl-reference [hidden] { display:none!important; }
@media (max-width:760px) {
  .pl-reference-body { padding:12px 14px 18px; }
  .pl-reference .pl-dialog-head { padding:12px 14px; }
  .pl-reference-actions .pl-primary { flex:1 1 140px; }
}
