/* editor — Claude 2026-11-22 */
.ed header.top{position:static}
.tb{position:sticky;top:0;z-index:30;background:var(--card);border-bottom:1px solid var(--line);box-shadow:var(--sh)}
.tb-in{display:flex;align-items:center;gap:4px;overflow-x:auto;padding:6px 10px;scrollbar-width:thin;max-width:1400px;margin:0 auto}
.tbtn{display:flex;flex-direction:column;align-items:center;gap:1px;border:0;background:none;border-radius:9px;padding:5px 8px;cursor:pointer;min-width:58px;font-size:11.5px;color:var(--mut);white-space:nowrap}
.tbtn i{font-style:normal;font-size:19px;line-height:1.2;color:var(--ink)}
.tbtn.on{background:color-mix(in srgb,var(--pri) 13%,transparent);color:var(--pri)}
.tbtn:hover{background:var(--line)}
.tsep{width:1px;align-self:stretch;background:var(--line);margin:0 4px;flex:0 0 1px}
.tprop{display:flex;flex-direction:column;font-size:11px;color:var(--mut);align-items:center;gap:1px}
.tprop input[type=color]{width:38px;height:28px;border:1px solid var(--line);border-radius:6px;padding:1px;background:none}
.tprop input[type=number]{width:54px;height:28px;border:1px solid var(--line);border-radius:6px;background:var(--card);text-align:center}
#bSave{flex:0 0 auto;margin-inline-start:auto}
.edwrap{display:flex;max-width:1400px;margin:0 auto}
.side{width:300px;flex:0 0 300px;padding:14px;border-inline-end:1px solid var(--line);max-height:calc(100vh - 140px);overflow:auto;position:sticky;top:64px}
.side label{display:block;font-size:13px;color:var(--mut);margin:10px 0 3px}
.side input,.side select{width:100%;border:1px solid var(--line);border-radius:8px;padding:8px;background:var(--card);min-height:40px}
.side input[type=checkbox]{width:22px;min-height:22px}
.pages{flex:1;min-width:0;padding:16px 8px 80px;display:flex;flex-direction:column;align-items:center;gap:18px}
.pg{position:relative;box-shadow:0 2px 14px rgba(0,0,0,.18);background:#fff;direction:ltr}
.pg canvas{display:block}
.pg .lbl{position:absolute;bottom:-18px;left:0;right:0;text-align:center;font-size:12px;color:var(--mut)}
.ov{position:absolute;inset:0;overflow:hidden}
.ov.draw{touch-action:none;cursor:crosshair}
.ob{position:absolute;box-sizing:border-box;cursor:move;touch-action:none}
.ob.sel{outline:2px dashed var(--acc);outline-offset:2px}
.ob .rz{position:absolute;right:-9px;bottom:-9px;width:18px;height:18px;border-radius:50%;background:var(--acc);border:2px solid #fff;cursor:nwse-resize;display:none}
.ob.sel .rz{display:block}
.ob.t{white-space:pre;line-height:1.2;font-family:Helvetica,Arial,sans-serif;min-width:20px;outline-color:var(--acc);padding:0}
.ob.t[contenteditable=true]{cursor:text;background:rgba(47,107,255,.06)}
.ob img{width:100%;height:100%;display:block;pointer-events:none;user-select:none}
.ob svg{width:100%;height:100%;display:block;overflow:visible;pointer-events:none}
.hint{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:12px;z-index:50;font-size:14px;max-width:92vw;text-align:center}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:60;display:grid;place-items:center;padding:12px}
.mbox{background:var(--card);border-radius:16px;padding:16px;width:min(640px,100%);max-height:95vh;overflow:auto}
.mtabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
#sigC{width:100%;height:auto;aspect-ratio:600/220;background:#fff;border:1px dashed var(--line);border-radius:10px;touch-action:none;cursor:crosshair}
.sigt{width:100%;border:1px solid var(--line);border-radius:10px;padding:12px;font-size:18px;background:var(--card)}
.sigprev{font:46px/1.4 "Segoe Script","Brush Script MT","Snell Roundhand",cursive;color:#0b2a8a;min-height:80px;padding:8px;direction:ltr;text-align:center;background:#fff;border-radius:10px;margin-top:8px}
@media (max-width:800px){.side{position:fixed;inset:auto 0 0 0;width:auto;max-height:50vh;background:var(--card);z-index:40;border-top:1px solid var(--line);flex:none}.tbtn{min-width:50px;padding:4px 5px}}

/* ===== 2026-11-22j: editor layout — clean top toolbar, centered pages, big green Save at bottom (Claude) ===== */
.tb{background:#fff;border-bottom:0;box-shadow:0 4px 18px rgba(3,20,45,.25);color:var(--ink)}
.tb-in{justify-content:safe center;gap:2px;padding:8px 12px}
.tbtn{flex-direction:row;gap:7px;font-size:15.5px;color:#22324a;padding:10px 12px;min-width:0;border-radius:10px;font-weight:600}
html[lang=ur] .tbtn{font-size:16px}
.tbtn i{font-size:20px}
.tbtn:hover{background:#eaf3ff}
.tbtn.on{background:#e3f7ec;color:#0d8442;box-shadow:inset 0 -3px 0 #12a150}
.tsep{background:#d3e1ec;margin:0 6px}
.tprop{font-size:13px;color:#3b4a5e;flex-direction:row;gap:6px}
.tprop input[type=color]{width:40px;height:34px}
.tprop input[type=number]{width:60px;height:34px;font-size:16px}
#bSave{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:45;font-size:20px;padding:16px 40px;border-radius:999px;min-height:56px;box-shadow:0 8px 28px rgba(0,0,0,.35);margin:0}
.ed .hint{bottom:96px}
.pages{padding:28px 10px 130px;gap:34px}
.pg{box-shadow:0 6px 30px rgba(0,0,0,.35);border-radius:3px}
.pg .lbl{bottom:-26px;font-size:14px;color:#e6f6ff;font-weight:600}
.side{background:#fff;color:var(--ink);border-radius:0 0 16px 0}
.side h3{font-size:19px}
.ed .drop{max-width:640px}
@media (max-width:800px){.tbtn{flex-direction:column;gap:2px;font-size:12.5px;padding:6px 8px}html[lang=ur] .tbtn{font-size:13px}.tb-in{justify-content:flex-start}#bSave{bottom:14px;font-size:18px;padding:14px 28px;width:max-content;max-width:90vw}}
.tbtn,.tprop,.tsep{flex:0 0 auto}
@media (min-width:801px){.tb-in{flex-wrap:wrap;justify-content:center;row-gap:4px}}
.hint{color:#fff!important;background:#0b1b33!important;font-size:16px}

/* ===== 2026-11-22k: blank doc link, per-page bar, floating object bar (Sejda-style small options) — Claude ===== */
.ed .drop .blank{display:inline-block;margin-top:10px;color:#0d8442;font-weight:700;font-size:17px;text-decoration:none}
.ed .drop .blank:hover{text-decoration:underline}
.pgw{display:flex;flex-direction:column;align-items:center;gap:8px}
.pbar,.pgend{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:center;direction:ltr}
.pbar .pn{color:#e6f6ff;font-size:26px;font-weight:300;min-width:26px;text-align:center}
.pgrp{display:inline-flex;background:#fff;border:1px solid #7fb2ff;border-radius:8px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.pb{border:0;border-inline-end:1px solid #cfe0ff;background:#fff;color:#1b6fe0;min-width:44px;height:40px;font-size:16px;cursor:pointer;padding:0 8px}
.pb:last-child{border-inline-end:0}.pb:hover{background:#eaf3ff}.pb.dl:hover{background:#ffecec;color:#c62828}
.pins{border:1px solid #7fb2ff;background:#fff;color:#1b6fe0;border-radius:8px;height:40px;padding:0 14px;font-size:15px;font-weight:600;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.pins:hover{background:#eaf3ff}
.pgend{margin-top:-10px}
.fbar{position:fixed;z-index:48;display:flex;align-items:stretch;background:#fff;border:1px solid #2f86f6;border-radius:8px;box-shadow:0 4px 16px rgba(0,0,0,.22);overflow:hidden;direction:ltr;height:42px}
.fbar.hidden{display:none}
.fbar>button,.fbar>label{border:0;border-right:1px solid #cfe0ff;background:#fff;color:#1b6fe0;min-width:42px;height:42px;font-size:17px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:2px;padding:0 6px;position:relative;margin:0}
.fbar>:last-child{border-right:0}
.fbar>button:hover,.fbar>label:hover{background:#eaf3ff}
.fbar>button.on{background:#dbeafe}
.fbar>button.dl:hover{background:#ffecec;color:#c62828}
.fbar>button.mv{cursor:move;touch-action:none}
.fbar select{appearance:none;-webkit-appearance:none;border:0;background:transparent;color:#1b6fe0;font-size:14px;font-weight:600;cursor:pointer;padding:0 2px;max-width:46px}
.fbar .ffam select{max-width:22px;opacity:.01;position:absolute;inset:0;width:100%;max-width:none}
.fbar input[type=color]{position:absolute;inset:0;opacity:.01;width:100%;height:100%;cursor:pointer;border:0;padding:0}
.fbar:not(.istext) .tx{display:none}
.fbar.nocol .fcol,.fbar.nosize .fsz{display:none}
@media (max-width:520px){.fbar>button,.fbar>label{min-width:36px;padding:0 4px;font-size:16px}.pb{min-width:38px}.pins{padding:0 10px;font-size:14px}}
/* zoomed pages scroll inside the page area, never the whole screen (no horizontal page scroll on phones) */
.edwrap{max-width:100%;overflow-x:hidden}
.pages{overflow-x:auto;align-items:safe center}

/* 2026-11-22l: page drag handle + link */
.pdrag{border:1px solid #7fb2ff;background:#fff;color:#1b6fe0;border-radius:8px;min-width:40px;height:40px;font-size:20px;line-height:1;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.pdrag:hover,.pdrag:focus-visible{background:#eaf3ff;outline:2px solid #2f86f6;outline-offset:1px}
.pdrag:active{cursor:grabbing}
.pgw.dragging{opacity:.45}
.pdrop{position:fixed;z-index:60;height:4px;border-radius:2px;background:#2f86f6;box-shadow:0 0 0 3px rgba(47,134,246,.25);pointer-events:none}
.pdrop.hidden{display:none}
.pghost{position:fixed;z-index:61;pointer-events:none;background:#1b6fe0;color:#fff;font-weight:700;font-size:15px;padding:8px 12px;border-radius:8px;box-shadow:0 6px 18px rgba(0,0,0,.3);white-space:nowrap}
.ob.t.lnk{text-decoration:underline;text-underline-offset:.12em}
.ob.lnk:not(.t){outline:1px dashed #1b6fe0;outline-offset:1px}
.fbar:not(.istext):not(.isimg) .lk{display:none}
@media (max-width:520px){.pdrag{min-width:36px}}
