/* Moduł Rysunki: pełny ekran nad aplikacją. Układ pod tablet w poziomie, w pionie i na telefonie pasek symboli schodzi na dół. */
#sz{position:absolute;inset:0;z-index:1000;container-type:size;display:none;background:#eef1f5;color:#18212f;font-family:'Nunito',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,.06);overscroll-behavior:none}
#sz.on{display:flex;flex-direction:column}
body.sz-on{overflow:hidden}
:where(#sz) :where(button){font:inherit;color:inherit;background:none;border:0;cursor:pointer;touch-action:manipulation}
#sz input,#sz textarea{font:inherit;font-size:16px;-webkit-user-select:text;user-select:text;color:#18212f}
#sz svg{display:block}

/* górny pasek */
.sz-top{flex:0 0 auto;display:flex;align-items:center;gap:6px;min-height:60px;padding:8px max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left));padding-top:max(8px,env(safe-area-inset-top));background:#0f172a;color:#fff}
.sz-top button{flex:0 0 auto;min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:10px;padding:0 10px;font-weight:700;font-size:14px;color:#e2e8f0!important}
.sz-top button:disabled{opacity:.32;cursor:default}
.sz-top button:not(:disabled):active{background:rgba(255,255,255,.14)}
.sz-top button.on{background:#1b5daa;color:#fff!important}
.sz-top .sz-wroc{background:#1b5daa;color:#fff!important;padding:0 14px;white-space:nowrap}
.sz-top svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.sz-top .sz-nazwa{flex:1 1 auto;min-width:0;justify-content:flex-start!important;text-align:left;padding:0 8px!important}
.sz-nazwa span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sz-nazwa b{display:block;font-size:15px;font-weight:800;color:#fff;overflow:hidden;text-overflow:ellipsis}
.sz-nazwa small{display:block;font-size:12px;font-weight:600;color:#94a3b8;overflow:hidden;text-overflow:ellipsis}
.sz-sep{width:1px;height:28px;background:rgba(255,255,255,.16);margin:0 3px;flex:0 0 auto}
.sz-zoom{font-variant-numeric:tabular-nums;font-size:13px!important;min-width:56px!important}

.sz-cialo{flex:1 1 auto;min-height:0;display:flex;position:relative}

/* lewy pasek */
.sz-rail{flex:0 0 96px;overflow:auto;background:#fff;border-right:1px solid #dce1e8;padding:6px 6px max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.sz-rail h5{font-size:10.5px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;color:#64748b;margin:10px 2px 4px}
.sz-rail h5:first-child{margin-top:2px}
.sz-narz{width:100%;min-height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:10px;padding:5px 2px;font-size:11px!important;line-height:1.15;font-weight:700;color:#334155!important;text-align:center;touch-action:pan-y!important}
.sz-narz svg{width:30px;height:30px;overflow:visible;pointer-events:none}
.sz-narz .ik{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}
.sz-narz.on{background:#1b5daa;color:#fff!important}
.sz-narz:not(.on):active{background:#eef1f5}
.sz-narz .sym *{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sz-narz .sym .pel{fill:currentColor}

/* rysunek */
.sz-plot{flex:1 1 auto;min-width:0;position:relative;overflow:hidden;background:#f8fafc}
.sz-svg{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:default}
.sz-svg.reka{cursor:grab}.sz-svg.krzyz{cursor:crosshair}
.sz-chipy{position:absolute;left:10px;top:10px;display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;pointer-events:none;max-width:calc(100% - 20px)}
.sz-chip{flex:0 0 auto;width:max-content;pointer-events:auto;min-height:44px;display:inline-flex;align-items:center;padding:0 14px 0 12px;border-radius:12px;background:#fff;border:1px solid #dce1e8;box-shadow:0 2px 10px rgba(15,23,42,.1);font-weight:800;font-size:13.5px;color:#18212f!important;max-width:320px}
.sz-chip i{flex:0 0 12px;height:12px;border-radius:50%;margin-right:8px}
.sz-chip span{flex:0 0 auto;max-width:270px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sz-chip.pusty{color:#566174!important;font-weight:700}
.sz-toast{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);background:#0f172a;color:#fff;border-radius:10px;padding:10px 14px;font-weight:700;font-size:14px;max-width:90%;pointer-events:none;opacity:0;transition:opacity .15s}
.sz-toast.on{opacity:1}

/* elementy tylko w edytorze */
.sz-duch{opacity:.7;pointer-events:none}
.sz-duch-l{fill:none;stroke:#1d4ed8;stroke-width:2.5;vector-effect:non-scaling-stroke;stroke-dasharray:7 5}
.sz-duch-t{font:800 13px 'Nunito',Arial,sans-serif;fill:#1d4ed8;paint-order:stroke;stroke:#fff;stroke-width:3.5}
.sz-uch{fill:#fff;stroke:#1d4ed8;stroke-width:2.5;vector-effect:non-scaling-stroke}

/* prawy panel */
.sz-panel{position:absolute;top:0;right:0;bottom:0;width:min(372px,100%);background:#fff;border-left:1px solid #dce1e8;box-shadow:-10px 0 30px rgba(15,23,42,.12);transform:translateX(105%);transition:transform .2s cubic-bezier(.2,.8,.2,1);display:flex;flex-direction:column;z-index:5;visibility:hidden}
.sz-panel.on{transform:none;visibility:visible}
.sz-pg{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:8px 8px 8px 14px;border-bottom:1px solid #eef1f5;min-height:60px}
.sz-pg .ic{flex:0 0 44px;height:44px;border-radius:10px;background:#f1f5f9;display:flex;align-items:center;justify-content:center}
.sz-pg .ic svg{width:34px;height:34px;overflow:visible}
.sz-pg .ic .sym *{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.sz-pg .ic .sym .pel{fill:currentColor}
.sz-pg h4{flex:1;min-width:0;font-size:16px;font-weight:800}
.sz-pg h4 small{display:block;font-size:12.5px;font-weight:600;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sz-x{flex:0 0 44px;height:44px;border-radius:10px;font-size:22px;color:#566174!important}
.sz-x:active{background:#eef1f5}
.sz-pt{flex:1 1 auto;overflow:auto;padding:12px 14px calc(16px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch;overscroll-behavior:contain;user-select:none}
.sz-et{display:block;font-size:12px;font-weight:800;letter-spacing:.2px;color:#566174;margin:14px 0 6px}
.sz-et:first-child{margin-top:0}
.sz-pole{width:100%;min-height:48px;padding:10px 12px;border:1.5px solid #dce1e8;border-radius:10px;background:#fff;outline:none}
.sz-pole:focus{border-color:#1b5daa}
.sz-pole.g{border-color:#16a34a;background:#f0fdf4}.sz-pole.b{border-color:#dc2626;background:#fef2f2}
.sz-wie{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sz-wyb{display:flex;flex-wrap:wrap;gap:6px}
.sz-wyb button{min-height:44px;min-width:44px;padding:0 12px;border-radius:10px;border:1.5px solid #dce1e8;font-weight:700;font-size:14px;display:inline-flex;align-items:center;gap:7px;color:#18212f!important}
.sz-wyb button.on{border-color:#1b5daa;background:#e3eef9;color:#134a8a!important}
.sz-wyb i{flex:0 0 11px;height:11px;border-radius:50%}
.sz-lista-ob{display:grid;gap:6px}
.sz-ob{width:100%;min-height:52px;display:flex;align-items:center;gap:10px;padding:6px 10px;border:1.5px solid #dce1e8;border-radius:10px;text-align:left}
.sz-ob.on{border-color:#1b5daa;background:#e3eef9}
.sz-ob i{flex:0 0 13px;height:13px;border-radius:50%}
.sz-ob span{flex:1;min-width:0}
.sz-ob b{display:block;font-size:14px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sz-ob small{display:block;font-size:12px;color:#566174;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sz-ob em{font-style:normal;font-size:12px;font-weight:800;color:#566174;white-space:nowrap}
.sz-ob em.ok{color:#15803d}.sz-ob em.zle{color:#b91c1c}
.sz-link{min-height:44px;width:100%;margin-top:6px;border-radius:10px;border:1.5px dashed #b6c2d2;font-weight:800;font-size:14px;color:#1b5daa!important}
.sz-wyn{margin-top:8px;border-radius:10px;padding:9px 11px;font-size:13.5px;font-weight:700;line-height:1.35}
.sz-wyn.g{background:#e6f4ea;color:#166534}.sz-wyn.b{background:#fde2e2;color:#991b1b}.sz-wyn.i{background:#eef1f5;color:#475569}
.sz-pom{border:1.5px solid #dce1e8;border-radius:12px;padding:10px 12px;margin-top:14px}
.sz-pom h6{font-size:13px;font-weight:800;margin-bottom:8px}
.sz-pom label{display:block;font-size:12px;font-weight:800;color:#566174;margin-bottom:4px}
.sz-pom label sub{font-size:.8em}
.sz-go{min-height:48px;width:100%;border-radius:10px;background:#1b5daa;color:#fff!important;font-weight:800;margin-top:6px}
.sz-akcje{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:16px}
.sz-akcje button{min-height:48px;border-radius:10px;border:1.5px solid #dce1e8;font-weight:800;font-size:13px}
.sz-akcje button:active{background:#eef1f5}
.sz-akcje .us{color:#b91c1c!important;border-color:#f3c2c2}
.sz-suwak{width:100%;height:44px}
.sz-kar{display:grid;grid-template-columns:96px 1fr;gap:8px;margin-bottom:4px}
.sz-fot{height:76px;border-radius:10px;border:1.5px dashed #b6c2d2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11.5px;font-weight:800;color:#1b5daa!important;overflow:hidden;padding:0}
.sz-fot svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sz-fot img{width:100%;height:100%;object-fit:cover;display:block}
.sz-spr{height:76px;border-radius:10px;border:1.5px solid #dce1e8;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:6px 12px;text-align:left}
.sz-spr b{font-size:14px;font-weight:800}
.sz-spr span{font-size:12px;color:#566174}
.sz-spr.on{border-color:#16a34a;background:#f0fdf4}
.sz-spr.on b{color:#15803d}
.sz-hist{display:grid;gap:6px}
.sz-hist button{min-height:48px;border-radius:10px;border:1.5px solid #dce1e8;padding:4px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}
.sz-hist b{font-weight:800}
.sz-hist sub{font-size:.8em}
.sz-hist span{color:#566174;font-size:12px}
.sz-duze{display:block;width:100%;max-height:60vh;object-fit:contain;border-radius:10px;background:#f1f5f9}
.sz-dwa{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
.sz-dwa button{min-height:48px;border-radius:10px;border:1.5px solid #dce1e8;font-weight:800;font-size:13px;color:#1b5daa!important;padding:4px 6px}
.sz-link-p{border-style:solid;margin-top:14px}
.sz-st{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:12px}
.sz-st button{min-height:64px;border-radius:10px;border:1.5px solid #dce1e8;padding:6px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.sz-st b{font-size:17px;font-weight:800}
.sz-st span{font-size:11.5px;color:#566174;line-height:1.2;text-align:center}
.sz-st sub{font-size:.8em}
.sz-st .uw{border-color:#f5c26b;background:#fff8e8}
.sz-pk{border:1.5px solid #dce1e8;border-radius:12px;padding:12px;margin-top:10px}
.sz-pk.gl{border-color:#1b5daa}
.sz-pk b{display:block;font-size:15px;font-weight:800}
.sz-pk small{display:block;font-size:12.5px;color:#566174;margin:2px 0 8px;line-height:1.3}
.sz-wysok{display:grid;grid-template-columns:96px 1fr;gap:8px;align-items:center}

/* lista rysunków */
.sz-lst{flex:1 1 auto;overflow:auto;padding:16px max(16px,env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));-webkit-overflow-scrolling:touch}
.sz-siatka{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px;max-width:1240px;margin:0 auto}
.sz-karta{position:relative;display:flex;flex-direction:column;background:#fff;border:1px solid #dce1e8;border-radius:14px;overflow:hidden;text-align:left;width:100%}
.sz-karta:active{border-color:#1b5daa}
.sz-min{height:178px;background:#f8fafc;border-bottom:1px solid #eef1f5;padding:10px}
.sz-min svg{width:100%;height:100%}
.sz-kt{padding:11px 13px 13px}
.sz-kt b{display:block;font-size:15.5px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sz-kt small{display:block;font-size:13px;color:#566174;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:1px}
.sz-kt .dol{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;align-items:center}
.sz-pig{font-size:12px;font-weight:800;padding:3px 8px;border-radius:7px;background:#eef1f5;color:#475569}
.sz-pig.a{background:#fff4d6;color:#9a6700}.sz-pig.g{background:#e6f4ea;color:#2e7d32}.sz-pig.b{background:#fde2e2;color:#b91c1c}
.sz-min .pk .sym *,.sz-sek-k .pk .sym *{stroke-width:1}
.sz-min .pk-w,.sz-sek-k .pk-w,.sz-min .pk-nr,.sz-min .pk-ob,.sz-min .pok-m,.sz-sek-k .pk-nr,.sz-sek-k .pk-ob,.sz-sek-k .pok-n,.sz-sek-k .pok-m{display:none}
.sz-brak{max-width:520px;margin:12vh auto;text-align:center;color:#566174;font-size:15px}
.sz-brak b{display:block;font-size:19px;color:#18212f;margin-bottom:6px}

/* okno */
.sz-okno{position:absolute;inset:0;background:rgba(15,23,42,.5);display:none;align-items:center;justify-content:center;padding:16px;z-index:20}
.sz-okno.on{display:flex}
.sz-okno>div{width:min(460px,100%);max-height:100%;overflow:auto;background:#fff;border-radius:16px;padding:18px}
.sz-okno h4{font-size:18px;font-weight:800;margin-bottom:10px}
.sz-okno .przyc{display:flex;gap:8px;margin-top:16px}
.sz-okno .przyc button{flex:1;min-height:48px;border-radius:10px;font-weight:800;border:1.5px solid #dce1e8}
.sz-okno .przyc .gl{background:#1b5daa;border-color:#1b5daa;color:#fff!important}
.sz-okno .przyc .us{color:#b91c1c!important;border-color:#f3c2c2}

/* sekcja w protokole */
.sz-narys{display:block;width:100%;min-height:44px;margin-top:6px;border-radius:10px;border:1.5px solid var(--ln);font-weight:800;font-size:13.5px;color:var(--p)!important;background:#fff}
.sz-sek-k{display:flex;gap:12px;align-items:stretch;border:1px solid var(--ln);border-radius:12px;overflow:hidden;background:#fff;margin-top:8px;width:100%;text-align:left;min-height:88px}
.sz-sek-k .m{flex:0 0 112px;background:#f8fafc;border-right:1px solid var(--ln2);padding:6px}
.sz-sek-k .m svg{width:100%;height:100%;display:block}
.sz-sek-k .t{flex:1;min-width:0;padding:10px 12px 10px 0;display:flex;flex-direction:column;justify-content:center}
.sz-sek-k .t b{font-weight:800;font-size:15px}
.sz-sek-k .t small{font-size:12.5px;color:var(--tx2)}
.zal-plan svg{width:100%;max-height:150mm;border:1px solid #cbd5e1;display:block;margin:6px 0 8px}
.zal-leg{display:flex;flex-wrap:wrap;gap:3px 14px;font-size:9pt;margin:0 0 8px}
.zal-leg span{display:inline-flex;align-items:center;gap:5px}
.zal-leg svg{width:18px;height:18px;border:0;margin:0;display:inline-block;overflow:visible}
.zal-leg .sym *{fill:none;stroke:#111;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.zal-leg .sym .pel{fill:#111}

/* tablet w pionie i telefon: pasek na dole, panel od dołu. Liczy się rozmiar urządzenia z dema, a nie okna przeglądarki. */
@container (max-width:760px),(orientation:portrait){
  .sz-cialo{flex-direction:column-reverse}
  .sz-rail{flex:0 0 auto;display:flex;gap:4px;overflow-x:auto;overflow-y:hidden;border-right:0;border-top:1px solid #dce1e8;padding:6px max(6px,env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom))}
  .sz-rail h5{display:none}
  .sz-narz{flex:0 0 72px;width:72px;touch-action:pan-x!important}
  .sz-plot{flex:1 1 auto;min-height:0}
  .sz-panel{top:auto;left:0;width:100%;height:min(62%,560px);border-left:0;border-top:1px solid #dce1e8;border-radius:16px 16px 0 0;transform:translateY(105%);box-shadow:0 -10px 30px rgba(15,23,42,.14)}
}
@container (max-width:980px){
  .sz-ukryj-w{display:none!important}
}
@container (max-width:760px){
  .sz-top .sz-wroc span{display:none}
}
@media print{#sz{display:none!important}}
