.annot-overlay{position:fixed;inset:0;z-index:100070;display:grid;place-items:center;padding:12px;background:#15283fc9;backdrop-filter:blur(7px)}.annot-overlay[hidden]{display:none!important}body.annot-open{overflow:hidden}.annot-shell{width:min(1180px,100%);max-height:calc(100dvh - 24px);background:#fff;color:#1d2f46;border-radius:23px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 28px 75px #091a2f77}.annot-head{padding:17px 22px;background:linear-gradient(110deg,#f4f9ff,#effaff);display:flex;gap:16px;justify-content:space-between;border-bottom:1px solid #dde7f4}.annot-head h2{font:850 26px/1.15 system-ui,sans-serif;letter-spacing:-.05em;margin:4px 0}.annot-head p{font:12px/1.5 system-ui,sans-serif;color:#667485;margin:0}.annot-exit{border:1px solid #d8e5f5;border-radius:11px;background:#fff;padding:10px 13px;align-self:flex-start;cursor:pointer}.annot-actions{display:flex;gap:8px;flex-wrap:wrap;padding:12px 18px;background:#fff;border-bottom:1px solid #e6eff9}.annot-actions button,.annot-file,.annot-actions label{display:flex;align-items:center;gap:5px;border:1px solid #d4e1f1;border-radius:10px;background:#f7fbff;padding:9px 12px;font:750 12px system-ui,sans-serif;color:#3e628f;cursor:pointer}.annot-actions button.active{background:#4d91e5;color:white}.annot-actions input[type=file]{max-width:190px;font-size:11px}.annot-actions input[type=color]{width:28px;height:27px;padding:0;border:0;background:transparent}.annot-actions select{border:0;background:transparent;color:#3b5b82}.annot-stage{min-height:0;flex:1;overflow:auto;background:#e7ebf0;padding:20px;display:grid;justify-items:center;align-items:start}.annot-paper{position:relative;max-width:100%;box-shadow:0 13px 40px #27394e32;background:white}.annot-paper canvas{max-width:100%;height:auto;display:block}.annot-paper #annot-draw-canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair}.annot-footer{display:flex;flex-wrap:wrap;align-items:center;gap:11px;border-top:1px solid #dde8f5;padding:13px 20px}.annot-footer span{flex:1;min-width:180px;color:#637386;font:11px/1.5 system-ui,sans-serif}.annot-footer button{border:0;border-radius:11px;background:linear-gradient(100deg,#438ae1,#5c92d5);color:white;padding:11px 13px;font:850 12px system-ui,sans-serif;cursor:pointer}.annot-footer button:disabled{opacity:.5}.annot-limit{margin:0;padding:0 20px 12px;color:#707c8a;font:11px/1.5 system-ui,sans-serif}
@media(max-width:700px){.annot-overlay{padding:5px}.annot-shell{max-height:calc(100dvh - 10px);border-radius:14px}.annot-head{padding:12px}.annot-head h2{font-size:20px}.annot-actions{padding:9px;flex-wrap:nowrap;overflow-x:auto}.annot-actions button,.annot-actions label{flex:none;white-space:nowrap;padding:8px}.annot-stage{padding:9px}.annot-footer{padding:8px 10px;gap:6px}.annot-footer button{padding:9px;font-size:11px}.annot-limit{padding:0 10px 8px;font-size:9px}}
/* v32: export a full PDF, selected page or PDF page images */
.annot-export-choice{display:flex;align-items:center;gap:7px;font:800 11px system-ui;color:#465e7b}.annot-export-choice select{background:white;border:1px solid #c8daef;padding:10px 12px;border-radius:11px;color:#2e4f78;font-weight:750;max-width:235px}
.annot-flatten{display:flex;gap:7px;align-items:center;max-width:255px;font:11px/1.35 system-ui;color:#57697f;cursor:pointer}
.annot-flatten input{accent-color:#5094e8;width:17px;height:17px;flex:none}
@media(max-width:700px){.annot-export-choice{width:100%;justify-content:space-between}.annot-export-choice select{max-width:210px}.annot-flatten{max-width:100%;width:100%}}
/* v37 — original-size text replacement controls, accessible and mobile-first */
.annot-type-panel{flex:none;background:#fff;border-block:1px solid #cfe1ed;padding:12px 18px;max-height:min(38dvh,275px);overflow-y:auto;color:#17354c}
.annot-type-panel[hidden]{display:none!important}
.annot-type-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:10px}
.annot-type-intro strong{font:800 15px/1.3 system-ui;display:block;color:#163957}
.annot-type-intro small{display:block;margin-top:3px;font:12px/1.4 system-ui;color:#58738a}
.annot-type-intro button{background:#f3f9ff;border:1px solid #c9deee;padding:5px 10px;border-radius:9px;color:#295477;cursor:pointer}
.annot-type-grid{display:grid;grid-template-columns:minmax(0,2fr) repeat(4,minmax(0,1fr)) auto;gap:9px;align-items:end}
.annot-type-grid label{display:flex;flex-direction:column;gap:4px;min-width:0;font:700 11px/1.35 system-ui;color:#415c73}
.annot-type-grid input:not([type=checkbox]),.annot-type-grid select{background:white;border:1px solid #bfd7e9;border-radius:9px;padding:9px 7px;min-height:37px;font:13px system-ui;color:#172f44;width:100%;min-width:0}
.annot-type-grid input[type=color]{padding:3px;width:44px;max-width:52px}
.annot-type-grid .annot-fit{display:flex;align-items:center;flex-direction:row;gap:7px;align-self:center}
.annot-type-grid .annot-fit input{accent-color:#087fba;width:18px;height:18px}
.annot-fit-note{margin:7px 0;font:12px/1.4 system-ui;color:#1f607e}
.annot-type-buttons{display:flex;justify-content:flex-end;gap:8px}
.annot-type-buttons button{border:1px solid #abcddd;padding:9px 15px;border-radius:10px;background:#f4fbff;color:#205775;font:800 12px system-ui;cursor:pointer}
.annot-type-buttons #annot-replace-apply{background:#087cc1;border-color:#087cc1;color:white}
.annot-type-buttons button:hover{filter:brightness(.96)}
@media(max-width:1000px){.annot-type-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.annot-type-grid .annot-wide{grid-column:span 3}}
@media(max-width:600px){.annot-type-panel{max-height:42dvh;padding:10px}.annot-type-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.annot-type-grid .annot-wide{grid-column:span 2}.annot-type-intro small{font-size:10px}.annot-type-buttons button{flex:1}.annot-fit-note{font-size:11px}}
body.dark .annot-type-panel{background:#122d40;color:#eaf6ff;border-color:#345c72}
body.dark .annot-type-intro strong{color:#f1fbff}body.dark .annot-type-intro small,body.dark .annot-type-grid label{color:#bed8e8}
body.dark .annot-type-grid input:not([type=checkbox]),body.dark .annot-type-grid select{background:#1c4257;color:#fff;border-color:#477189}
body.dark .annot-type-panel .annot-fit-note{color:#a9e5eb}body.dark .annot-type-intro button,body.dark .annot-type-buttons button{background:#1a4458;color:#e8faff;border-color:#4b7690}
body.dark .annot-type-buttons #annot-replace-apply{background:#1283bc;color:white}

.annot-type-buttons{position:sticky;bottom:-12px;z-index:3;padding:9px 0;background:#fff;border-top:1px solid #e7f0f5}
.annot-type-panel.preview-only .annot-type-grid,.annot-type-panel.preview-only .annot-fit-note{display:none!important}
.annot-type-panel.preview-only{max-height:145px;overflow:hidden}
body.dark .annot-type-buttons{background:#122d40;border-top-color:#345c72}
@media(max-width:600px){.annot-type-buttons{bottom:-10px;flex-wrap:wrap}.annot-type-buttons button{flex:1 1 30%;min-width:88px;padding:8px 4px}}
