/* Kept outside the app root so previews survive harmless background refreshes. */
.nsv-overlay{position:fixed;inset:0;z-index:10020;display:grid;place-items:center;padding:24px;background:#0b1f1ae8;backdrop-filter:blur(10px);overscroll-behavior:contain;font-family:"Vazirmatn",sans-serif;color:#f5f7ed;line-height:1.7;isolation:isolate;box-sizing:border-box}
.nsv-overlay *{box-sizing:border-box}.nsv-overlay [hidden]{display:none!important}
.nsv-dialog{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(1100px,100%);max-height:calc(100dvh - 48px);min-height:0;border:1px solid #a7c5b53d;border-radius:18px;background:#142c25;box-shadow:0 24px 100px #0008;overflow:hidden;outline:none}
.nsv-header{display:flex;align-items:center;gap:20px;min-height:78px;padding:16px 24px;border-bottom:1px solid #aec0b325;flex:none}
.nsv-title{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 14px/1.9 "Vazirmatn",sans-serif;margin:0;color:#eff5e6}
.nsv-close{flex:none;display:grid;place-items:center;min-width:46px;width:46px;height:46px;padding:0;border:1px solid #b1c5b94d;border-radius:50%;background:#eff7e911;color:#f6f8ef;cursor:pointer;touch-action:manipulation;transition:background .15s,border-color .15s;font:300 32px/1 Arial,sans-serif}
.nsv-close:hover{background:#e5f3d726;border-color:#d6eabc9c}.nsv-close span{display:block;transform:translateY(-1px)}
.nsv-stage{display:grid;place-items:center;min-height:100px;overflow:auto;background:#091c16;padding:16px;overscroll-behavior:contain}
.nsv-media{display:block;max-width:100%;max-height:calc(100dvh - 248px);width:auto;height:auto;object-fit:contain;margin:auto;border-radius:3px;background:#0c211a}
.nsv-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 24px;min-height:64px;border-top:1px solid #aec0b325;background:#19352b}
.nsv-footer p{margin:0;color:#bacdbd;font:400 11px/1.9 "Vazirmatn",sans-serif}
.nsv-download{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:7px 16px;border:1px solid #cce1b95e;border-radius:8px;text-decoration:none;color:#e3f1cd;background:#cce6ad0a;font:500 11px/1.8 "Vazirmatn",sans-serif;white-space:nowrap;touch-action:manipulation}
.nsv-download:hover{background:#cce6ad1a}.nsv-error{padding:30px;text-align:center;font-size:13px;color:#e9d5ba;line-height:2.1;max-width:480px}
.nsv-overlay :focus-visible{outline:3px solid #dbf3ab;outline-offset:4px}
[data-ns-preview]:not(a):not(button){cursor:zoom-in}[data-ns-preview]:focus-visible{outline:3px solid #739553;outline-offset:4px}
@media(max-width:640px){.nsv-overlay{padding:10px}.nsv-dialog{max-height:calc(100dvh - 20px);border-radius:13px}.nsv-header{min-height:72px;padding:12px 14px;gap:12px}.nsv-title{font-size:12px}.nsv-stage{padding:8px}.nsv-media{max-height:calc(100dvh - 220px)}.nsv-footer{padding:12px 14px;gap:12px}.nsv-footer p{font-size:10px;max-width:185px}.nsv-download{padding-inline:11px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.nsv-overlay *{transition:none!important}}
