/* PDF tools use the Binder material; no selectors affect Keys or annotation controls. */
html[data-gn-glow="1"] .gn-pdf-crop-dialog{box-sizing:border-box;width:min(1060px,calc(100vw - 24px));height:min(900px,calc(100dvh - 24px));max-width:none;max-height:none;padding:0;border:1px solid rgba(255,255,255,.95);border-radius:22px;background-image:var(--gn-popup-surface);background-size:cover;color:#3A2820;font:14px/1.4 var(--gn-sans);box-shadow:var(--gn-sheet-shadow);overflow:hidden}
html[data-gn-glow="1"] .gn-pdf-crop-dialog[open]{display:flex;flex-direction:column}
html[data-gn-glow="1"] .gn-pdf-crop-dialog::backdrop{background:rgba(58,40,32,.3);backdrop-filter:blur(3px)}
html[data-gn-glow="1"] .gn-pdf-crop-dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 22px;border-bottom:1px solid var(--gn-popup-line)}
html[data-gn-glow="1"] .gn-pdf-crop-navigation{display:flex;justify-content:space-between;gap:12px;padding:8px 22px 0;flex:none}
html[data-gn-glow="1"] .gn-pdf-crop-dialog header>div{min-width:0}
html[data-gn-glow="1"] #gnPdfCropPageTitle{overflow-wrap:anywhere}
html[data-gn-glow="1"] .gn-pdf-crop-dialog h2{margin:0;font:500 25px/1.2 var(--gn-serif)}
html[data-gn-glow="1"] .gn-pdf-crop-dialog p{margin:4px 0;color:#5F5444;font-size:13px}
html[data-gn-glow="1"] .gn-pdf-crop-dialog .gn-pdf-tools-status{padding:6px 22px;flex:none;min-height:18px}
html[data-gn-glow="1"] .gn-pdf-crop-body{display:grid;grid-template-columns:minmax(0,1fr) 235px;grid-template-rows:minmax(0,1fr);gap:22px;min-height:0;flex:1;padding:12px 22px 20px;overflow:auto}
html[data-gn-glow="1"] .gn-pdf-crop-viewport{box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:100%;min-height:0;min-width:0;overflow:hidden;padding:22px;background:rgba(95,84,68,.08);border-radius:14px}
html[data-gn-glow="1"] .gn-pdf-crop-sheet{position:relative;flex:none;width:min(100%,calc((100dvh - 240px)*var(--pdf-page-ratio,.77)));max-width:100%;background:white;box-shadow:0 2px 10px rgba(58,40,32,.2);line-height:0}
html[data-gn-glow="1"] .gn-pdf-crop-sheet>canvas{display:block;width:100%;height:auto}
html[data-gn-glow="1"] .gn-pdf-crop-shade{position:absolute;inset:var(--crop-top,0) var(--crop-right,0) var(--crop-bottom,0) var(--crop-left,0);box-shadow:0 0 0 2000px rgba(58,40,32,.25);pointer-events:none;clip-path:inset(-2000px)}
html[data-gn-glow="1"] .gn-pdf-crop-guide{position:absolute!important;z-index:2;box-sizing:border-box;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;touch-action:none;overflow:visible;min-height:0!important;min-width:0!important}
html[data-gn-glow="1"] .gn-pdf-crop-guide:is([data-crop-edge="left"],[data-crop-edge="right"]){top:0;width:28px;height:100%;transform:translateX(-50%);cursor:ew-resize}
html[data-gn-glow="1"] .gn-pdf-crop-guide:is([data-crop-edge="top"],[data-crop-edge="bottom"]){left:0;width:100%;height:28px;transform:translateY(-50%);cursor:ns-resize}
html[data-gn-glow="1"] .gn-pdf-crop-guide::before{content:"";position:absolute;background:#70583C;box-shadow:0 0 0 1px rgba(255,255,255,.75)}
html[data-gn-glow="1"] .gn-pdf-crop-guide:is([data-crop-edge="left"],[data-crop-edge="right"])::before{top:0;bottom:0;left:13px;width:2px}
html[data-gn-glow="1"] .gn-pdf-crop-guide:is([data-crop-edge="top"],[data-crop-edge="bottom"])::before{left:0;right:0;top:13px;height:2px}
html[data-gn-glow="1"] .gn-pdf-crop-guide span{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:6px 8px;border-radius:8px;background:#5F5444;color:white;font:600 11px/1.2 var(--gn-sans);text-transform:capitalize}
html[data-gn-glow="1"] .gn-pdf-crop-settings{display:flex;flex-direction:column;gap:12px;min-width:0}
html[data-gn-glow="1"] .gn-pdf-crop-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
html[data-gn-glow="1"] .gn-pdf-crop-fields label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600}
html[data-gn-glow="1"] .gn-pdf-crop-fields input{box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:8px;border:1px solid var(--gn-popup-line);border-radius:10px;background:rgba(255,255,255,.85);font:14px var(--gn-sans);color:#3A2820}
html[data-gn-glow="1"] .gn-pdf-crop-snap{display:flex;align-items:center;gap:8px;font-size:13px;min-height:44px}
html[data-gn-glow="1"] .gn-pdf-crop-snap input{width:22px;height:22px;accent-color:#5F5444}
html[data-gn-glow="1"] .gn-pdf-crop-dialog footer{display:flex;justify-content:flex-end;gap:8px;padding:14px 22px;border-top:1px solid var(--gn-popup-line)}
html[data-gn-glow="1"] .gn-pdf-crop-dialog footer>button:first-child{margin-right:auto}
html[data-gn-glow="1"] .gn-pdf-crop-dialog button{min-width:44px;min-height:44px;padding:8px 12px;border:1px solid var(--gn-popup-line);border-radius:11px;background:rgba(255,253,248,.9);color:#5F5444;font:600 13px/1.3 var(--gn-sans);cursor:pointer}
html[data-gn-glow="1"] #pageOrderPanel[data-gn-pdf-order] button{min-width:44px;min-height:44px;padding:8px 12px;cursor:pointer}
html[data-gn-glow="1"] .gn-pdf-crop-dialog .gn-pdf-tools-primary{background:#5F5444;color:white}
html[data-gn-glow="1"] .gn-pdf-crop-dialog button:disabled{opacity:.45;cursor:default}
html[data-gn-glow="1"] #pageOrderPanel[data-gn-pdf-order] button:disabled{cursor:default}
html[data-gn-glow="1"] .gn-pdf-crop-dialog :is(button,input):focus-visible{outline:2px solid #70583C;outline-offset:3px}
html[data-gn-glow="1"] body.reader-focus #pageOrderPanel[data-gn-pdf-order]{position:fixed!important;top:max(78px,env(safe-area-inset-top))!important;bottom:max(100px,calc(env(safe-area-inset-bottom) + 94px))!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(820px,calc(100vw - 24px))!important;max-width:none!important;max-height:none!important;box-sizing:border-box;overflow:hidden!important;display:flex;flex-direction:column;padding:18px;gap:12px;z-index:420}
html[data-gn-glow="1"] body.reader-focus #pageOrderPanel[data-gn-pdf-order][hidden]{display:none!important}
html[data-gn-glow="1"] #pageOrderPanel[data-gn-pdf-order] .page-order-summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;padding:0 0 12px;flex:none}
html[data-gn-glow="1"] #pageOrderPanel[data-gn-pdf-order] .page-order-summary span{flex:1}
html[data-gn-glow="1"] #pageOrderPanel[data-gn-pdf-order] .page-order-actions{display:flex;flex-wrap:wrap;gap:8px;flex:none}
html[data-gn-glow="1"] #pageOrderPanel[data-gn-pdf-order] .page-order-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));grid-auto-rows:max-content;gap:12px;align-content:start;overflow:auto;min-height:0;flex:1;padding:4px;overscroll-behavior:contain}
html[data-gn-glow="1"] #pageOrderPanel[data-gn-pdf-order] .page-order-list>button{display:flex;flex-direction:column;gap:6px;align-items:center;min-width:0;max-width:100%;height:auto;padding:8px}
html[data-gn-glow="1"] .gn-pdf-order-thumb{display:block;flex:none;width:100%;height:170px;object-fit:contain;background:white;border-radius:4px}
html[data-gn-glow="1"] .gn-pdf-order-loading{display:grid;place-items:center;min-height:170px}
@media(max-width:650px){html[data-gn-glow="1"] .gn-pdf-crop-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(250px,45dvh) auto;gap:12px;padding:10px 14px;overflow:auto}html[data-gn-glow="1"] .gn-pdf-crop-fields{grid-template-columns:repeat(4,minmax(0,1fr))}html[data-gn-glow="1"] .gn-pdf-crop-dialog footer{padding:10px 14px;flex-wrap:wrap}html[data-gn-glow="1"] #pageOrderPanel[data-gn-pdf-order] .page-order-list{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}}
