#ped-tool { min-width:0 }
.ped-controls { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:12px 0 }
.ped-controls label { display:flex; flex-direction:column; gap:4px; max-width:100% }
#ped-tool input[type=number] { width:90px; max-width:100% }
#ped-tool input[type=file], #ped-text { max-width:100%; width:100%; min-width:0 }
#ped-settings { min-width:0; margin:14px 0; border:1px solid #ddd; border-radius:8px }
#ped-modes [aria-pressed=true], #ped-color-panel [aria-pressed=true] { background:#267052; color:#fff; outline:2px solid #174b38; outline-offset:1px }
.ped-pages { overflow:auto; height:65vh; max-height:700px; min-height:300px; background:#e7e9e8; padding:12px 8px; touch-action:pan-y; overscroll-behavior:contain; position:relative }
.ped-sheet { margin:0 auto 20px; max-width:100% }
.ped-page-label { font-size:.9rem; margin:4px 0; color:#34493d }
.ped-preview { position:relative; background:#fff; box-shadow:0 0 0 1px #bbb; overflow:hidden; touch-action:pan-y }
.ped-pdf { display:block; width:100%; height:100% }
.ped-overlay { position:absolute; inset:0; touch-action:pan-y }
.ped-object { position:absolute; outline:1px dashed #777; padding:0; border:0; background:transparent; cursor:move; touch-action:none; box-sizing:border-box }
.ped-object[aria-pressed=true] { outline:2px solid #267052 }
.ped-ink { width:100%; height:100%; display:block; pointer-events:none; box-sizing:border-box }
.ped-handle { position:absolute; right:0; bottom:0; transform:translate(40%,40%); width:20px; height:20px; min-width:0; min-height:0; padding:0; border:0; background:transparent; cursor:nwse-resize; touch-action:none }
.ped-handle::after { content:''; position:absolute; inset:5px; background:#267052; border:1px solid white; border-radius:2px }
@media (pointer:coarse) { .ped-handle { width:32px; height:32px } .ped-handle::after { inset:10px } }
@media (max-width:480px) { .ped-pages { padding:8px 0; height:60vh } .ped-controls { gap:8px } }
