.nxscan{max-width:1320px!important;margin:24px auto!important;font-family:Inter,Arial,sans-serif!important;color:#172033!important}.nxscan *{box-sizing:border-box}.nx-top{display:flex!important;justify-content:space-between;align-items:center;padding:16px 20px;background:#111827;color:#fff;border-radius:16px 16px 0 0}.nx-top strong{font-size:24px}.nx-top small{display:block;opacity:.7}.nx-badge{background:#16a34a;padding:7px 12px;border-radius:99px;font-weight:800}.nx-hero{text-align:center;padding:26px 15px;background:linear-gradient(135deg,#172554,#2563eb);color:#fff}.nx-hero h2{margin:0 0 8px;font-size:32px}.nx-actions,.nx-bar,.nx-pager{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.nxscan button,.nxscan label{border:0;border-radius:9px;padding:10px 13px;background:#eef2ff;color:#172554;font-weight:700;cursor:pointer}.nxscan label input{display:none}.nx-primary{background:#fff!important}.nx-bar{padding:12px;background:#fff;box-shadow:0 3px 12px #0001;position:sticky;top:32px;z-index:20}.nx-bar button{background:#172554;color:#fff}.nx-bar .nx-main{background:#2563eb}.nx-steps{padding:10px 16px;text-align:center;background:#eff6ff;color:#1e3a8a;border-bottom:1px solid #dbeafe}.nx-main-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 300px!important;gap:16px!important;padding:16px!important;background:#f8fafc!important;align-items:start}.nx-editor-col{min-width:0!important}.nx-work{min-height:650px;display:grid!important;grid-template-columns:110px minmax(0,1fr)!important;background:#e9edf5;border-radius:12px;overflow:hidden}.nx-work>aside{padding:8px;overflow:auto;background:#dbe1eb}.nx-work>section{position:relative;display:flex;align-items:center;justify-content:center;padding:18px;overflow:auto;touch-action:none}.nx-work canvas{max-width:100%;max-height:760px;background:#fff;box-shadow:0 4px 22px #0003;touch-action:none;user-select:none;cursor:crosshair}.nx-thumb{width:100%;margin-bottom:8px;border:3px solid transparent;cursor:pointer}.nx-thumb.on{border-color:#2563eb}.nx-pager{padding:10px;background:#fff;border-radius:0 0 12px 12px}.nx-side-tools{display:flex!important;flex-direction:column!important;gap:12px!important;width:300px!important;min-width:300px!important}.nx-tool-card{display:block!important;width:100%!important;padding:14px!important;border-radius:12px!important;background:#fff!important;box-shadow:0 2px 14px #0001!important}.nx-tool-card h3{margin:0 0 9px!important;font-size:16px}.nx-tool-card button,.nx-tool-card label,.nx-tool-card input,.nx-tool-card select,.nx-tool-card textarea{display:block!important;width:100%!important;margin:6px 0!important;padding:9px!important}.nx-status{margin:10px 0 0;padding:11px 14px;border-radius:8px;background:#ecfdf3;font-weight:700}.nx-work #nxEmpty{display:flex;flex-direction:column;gap:8px;align-items:center;color:#64748b;font-size:28px}.nx-work #nxEmpty b{font-size:18px}.nx-work #nxEmpty small{font-size:13px}#nxEditPanel{position:absolute;left:50%;bottom:20px;transform:translateX(-50%);z-index:30;background:#111827;color:#fff;padding:10px 12px;border-radius:12px;box-shadow:0 6px 22px #0005;white-space:nowrap}#nxEditPanel button{margin-left:7px;padding:8px 11px}#nxApplyEdit{background:#2563eb;color:#fff}.nx-ad{min-height:100px;margin:12px 0;padding:14px;border:2px dashed #cbd5e1;border-radius:12px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#64748b}.nx-ad span{font-size:10px;letter-spacing:1px}.nx-ad b{color:#334155}.nx-ad small{max-width:520px}.nx-side-tools .nx-ad{min-height:250px;margin:0}.nx-ad-live{border:0;padding:0;min-height:auto}
@media(max-width:950px){.nx-main-layout{grid-template-columns:1fr!important}.nx-side-tools{width:100%!important;min-width:0!important;display:grid!important;grid-template-columns:1fr 1fr!important}.nx-work{min-height:520px}}
@media(max-width:600px){.nx-main-layout{padding:7px!important}.nx-side-tools{display:flex!important;flex-direction:column!important}.nx-work{grid-template-columns:72px minmax(0,1fr)!important;min-height:430px}.nx-hero h2{font-size:26px}.nx-bar{top:0}.nx-bar button{padding:9px 10px}#nxEditPanel{white-space:normal;width:92%;text-align:center}.nx-steps{font-size:12px}}
/* 1.9 hard layout override */
.nx-main-layout{display:flex!important;flex-direction:row!important;align-items:flex-start!important;width:100%!important;max-width:none!important}
.nx-editor-col{flex:1 1 auto!important;width:calc(100% - 320px)!important}
.nx-side-tools{flex:0 0 300px!important;width:300px!important;display:flex!important;flex-direction:column!important}
@media(max-width:900px){.nx-main-layout{flex-direction:column!important}.nx-editor-col,.nx-side-tools{width:100%!important;flex:1 1 auto!important}.nx-side-tools{display:flex!important}}
/* v2.0 robust overlay editor */
#nxStage{position:relative!important;overflow:auto!important}
#nxCanvasWrap{position:relative!important;display:inline-block!important;line-height:0!important;max-width:100%!important}
#nxCanvasWrap canvas{display:block!important;max-width:100%!important;height:auto!important}
#nxOverlay{position:absolute!important;z-index:50!important;pointer-events:auto!important;touch-action:none!important;overflow:visible!important}
.nx-handle{position:absolute!important;transform:translate(-50%,-50%)!important;width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;border-radius:50%!important;background:#2563eb!important;color:#fff!important;border:3px solid #fff!important;box-shadow:0 2px 8px #0008!important;z-index:55!important;cursor:grab!important;touch-action:none!important;font-size:13px!important}
.nx-handle:active{cursor:grabbing!important;background:#dc2626!important}
.nx-poly,.nx-cropbox{position:absolute!important;border:4px solid #2563eb!important;background:rgba(37,99,235,.08)!important;pointer-events:none!important;z-index:51!important}
#nxEditPanel{z-index:80!important}
/* force actual desktop two-column layout independent of theme content CSS */
#nxscan .nx-main-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 300px!important;gap:16px!important;align-items:start!important;width:100%!important}
#nxscan .nx-editor-col{width:auto!important;min-width:0!important}
#nxscan .nx-side-tools{display:flex!important;flex-direction:column!important;width:300px!important;min-width:300px!important;position:relative!important;visibility:visible!important;opacity:1!important}
@media(max-width:980px){#nxscan .nx-main-layout{grid-template-columns:1fr!important}#nxscan .nx-side-tools{width:100%!important;min-width:0!important}}

/* v2.1 commerce + share */
.nx-planbox{padding:9px 10px;margin:0 0 8px;background:#eff6ff;border-radius:8px;font-weight:800;color:#1e40af}.nx-share-menu{padding:7px;background:#f8fafc;border:1px solid #dbeafe;border-radius:9px}.nx-upgrade{display:block!important;padding:10px 11px!important;margin:7px 0!important;border-radius:8px!important;background:#172554!important;color:#fff!important;text-decoration:none!important;text-align:center!important;font-weight:800!important}.nx-small{font-size:12px;color:#64748b}.nx-editor-col{order:1}.nx-side-tools{order:2}
/* v2.2 drag/drop + loaded-state cleanup */
#nxscan .nx-drop-hint{margin:0 0 8px;padding:9px 12px;border:2px dashed #93c5fd;border-radius:10px;background:#eff6ff;color:#1e40af;text-align:center;font-weight:800}
#nxscan #nxDropZone{transition:box-shadow .15s,border-color .15s;background .15s;border:2px solid transparent}
#nxscan #nxDropZone.nx-dragover{border-color:#2563eb!important;background:#dbeafe!important;box-shadow:inset 0 0 0 4px rgba(37,99,235,.12)!important}
#nxscan #nxEmpty[hidden]{display:none!important}
#nxscan #nxStage:has(#nxCanvas[width]:not([width="1"])) #nxEmpty{display:none!important}
.nx-share-result{margin-top:8px;padding:9px;background:#f4f7ff;border:1px solid #cfd8f6;border-radius:8px;display:grid;gap:6px}.nx-share-result input{width:100%;font-size:11px}.nx-share-result a{text-align:center;font-weight:700}.nx-upgrades small{display:block;margin-top:8px}
/* v2.4 thumbnail rail: independent scroll; page itself no longer needs to grow for thumbnails */
.nx-work{height:680px;min-height:0!important;overflow:hidden!important}
.nx-work>aside#nxThumbs{height:100%;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:stable;padding-right:7px}
#nxThumbs .nx-thumb{display:block;max-height:150px;object-fit:cover}
.nx-accountbox{padding:10px;margin-bottom:10px;border-radius:9px;background:#eff6ff;color:#172554;font-size:13px;line-height:1.45}.nx-accountbox a{display:block;margin-top:8px;padding:9px;text-align:center;border-radius:8px;background:#172554;color:#fff!important;text-decoration:none;font-weight:800}
@media(max-width:950px){.nx-work{height:560px}}@media(max-width:600px){.nx-work{height:470px}}

.nx-payment-success{margin:8px 0;padding:9px 10px;border-radius:8px;background:#ecfdf5;color:#166534;font-weight:800;font-size:13px}

/* 2.5.1 responsive fit within viewport */
#nxscan #nxStage{height:min(75vh,760px)!important;min-height:420px!important;overflow:hidden!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:12px!important}
#nxscan #nxCanvasWrap{max-width:100%!important;max-height:100%!important;width:auto!important;height:auto!important;display:flex!important;align-items:center!important;justify-content:center!important}
#nxscan #nxCanvasWrap canvas{max-width:100%!important;max-height:min(70vh,720px)!important;width:auto!important;height:auto!important;object-fit:contain!important}
#nxscan .nx-work{height:min(80vh,800px)!important;min-height:460px!important}
#nxscan .nx-work>aside{max-height:100%!important;overflow-y:auto!important}
@media(max-width:600px){#nxscan #nxStage{height:60vh!important;min-height:300px!important}#nxscan .nx-work{height:65vh!important;min-height:340px!important}}

/* 2.8: fixed editing rails on both sides of the scanned image */
#nxscan .nx-work{display:grid!important;grid-template-columns:74px 102px minmax(0,1fr) 102px!important;gap:0!important;align-items:stretch!important}
#nxscan .nx-edit-rail{display:flex!important;flex-direction:column!important;gap:7px!important;padding:10px 7px!important;background:#f1f5ff!important;overflow-y:auto!important;min-width:0!important}
#nxscan .nx-edit-right{background:#eaf1ff!important}
#nxscan .nx-edit-rail h4{font-size:12px!important;text-align:center!important;margin:3px 0 6px!important;color:#17376b!important}
#nxscan .nx-edit-rail button{display:block!important;width:100%!important;white-space:normal!important;min-height:36px!important;padding:7px 3px!important;font-size:11px!important;line-height:1.2!important;background:#172554!important;color:#fff!important;border-radius:6px!important}
#nxscan .nx-edit-right button{background:#2458b8!important}
#nxscan #nxStage{min-width:0!important}
#nxscan .nx-work>aside#nxThumbs{min-width:0!important}
@media(max-width:700px){#nxscan .nx-work{grid-template-columns:48px 70px minmax(0,1fr) 70px!important}#nxscan .nx-edit-rail{padding:6px 3px!important;gap:5px!important}#nxscan .nx-edit-rail button{font-size:9px!important;min-height:32px!important}}

#nxscan .nx-edit-right button[data-act="smartall"]{background:#0f6abf!important;font-weight:700!important}
