.zbk,.zbk-hero{--zb-ink:var(--global-palette3,#1C2B4A);--zb-muted:var(--global-palette5,#5B6B85);--zb-line:#D5E1EE;--zb-surface:#fff;--zb-accent:var(--global-palette1,#E8642C);--zb-accent-ink:#fff;--zb-sun:#F5C542;--zb-stage-a:#FFFDF7;--zb-stage-b:#DCE8F5;--zb-ui:"Bricolage Grotesque",var(--global-body-font-family,system-ui),sans-serif;--zb-hand:"Caveat","Comic Sans MS",cursive}
.zbk{color:var(--zb-ink);font-family:var(--zb-ui);font-size:16px;line-height:1.5;max-width:1400px;margin:0 auto;padding:1.5rem clamp(1rem,4vw,2.5rem) 3rem;box-sizing:border-box}
.zbk *,.zbk *::before,.zbk *::after{box-sizing:border-box}
.zbk button,.zbk input,.zbk select{font:inherit;color:inherit}
.zbk :focus-visible{outline:3px solid var(--zb-accent);outline-offset:2px;border-radius:6px}
.zbk-intro h1{font-family:var(--zb-hand);font-weight:700;font-size:clamp(2.2rem,5vw,3.2rem);line-height:1;margin:0 0 .35rem}
.zbk-intro p{margin:0 0 1.25rem;color:var(--zb-muted);max-width:52ch}
.zbk-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:clamp(1rem,3vw,2.5rem)}
.zbk-stage-col{position:sticky;top:1rem;align-self:start}
.zbk-stage,.zbk-hero{position:relative;border-radius:28px;overflow:hidden;background:radial-gradient(120% 90% at 50% 15%,var(--zb-stage-a),var(--zb-stage-b))}
.zbk-stage{height:min(72vh,680px)}
.zbk-hero{width:100%;aspect-ratio:4/5;max-height:620px}
.zbk-stage canvas,.zbk-hero canvas{display:block;width:100%;height:100%}
.zbk-stage canvas{touch-action:pan-y;cursor:grab}
.zbk-hint{position:absolute;left:1rem;top:.9rem;font-size:.85rem;color:var(--zb-muted)}
.zbk-views{position:absolute;left:50%;bottom:1rem;transform:translateX(-50%);display:flex;gap:.25rem;background:var(--zb-surface);padding:.25rem;border-radius:999px;box-shadow:0 2px 10px rgba(28,43,74,.12)}
.zbk-views button{border:0;background:transparent;padding:.4rem .9rem;border-radius:999px;cursor:pointer;font-size:.9rem;color:var(--zb-ink)}
.zbk-views button[aria-pressed="true"]{background:var(--zb-ink);color:#fff}
.zbk-flat{margin-top:1rem}
.zbk-flat-head{display:flex;justify-content:space-between;font-size:.85rem;color:var(--zb-muted);margin-bottom:.35rem}
.zbk-flat-wrap,.zbk-thumb{border:1.5px dashed var(--zb-line);border-radius:12px;overflow:hidden;background-color:#fff;background-image:linear-gradient(45deg,#EEF1F5 25%,transparent 25%,transparent 75%,#EEF1F5 75%),linear-gradient(45deg,#EEF1F5 25%,transparent 25%,transparent 75%,#EEF1F5 75%);background-size:16px 16px;background-position:0 0,8px 8px}
.zbk-flat-wrap canvas{display:block;width:100%;height:auto}
.zbk-flat-marks{display:flex;justify-content:space-between;font-size:.78rem;color:var(--zb-muted);margin-top:.25rem}
.zbk-flat-marks span{width:0;display:flex;justify-content:center;white-space:nowrap}
.zbk-panel{display:flex;flex-direction:column;gap:1.75rem}
.zbk-step h2{font-family:var(--zb-ui);font-size:1.15rem;font-weight:800;margin:0 0 .75rem;display:flex;gap:.6rem;align-items:center;color:var(--zb-ink)}
.zbk-n{font-family:var(--zb-hand);font-size:1.7rem;font-weight:700;color:var(--zb-accent);width:1.2rem;line-height:1}
.zbk-note{font-size:.85rem;color:var(--zb-muted);margin:.5rem 0 0}
.zbk-glasses{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem}
.zbk-choice{border:1.5px solid var(--zb-line);background:var(--zb-surface);border-radius:16px;padding:.75rem .6rem;cursor:pointer;text-align:left;display:flex;flex-direction:column;gap:.15rem;color:var(--zb-ink)}
.zbk-choice:hover{border-color:var(--zb-muted);background:var(--zb-surface);color:var(--zb-ink)}
.zbk-choice[aria-pressed="true"]{border-color:var(--zb-accent);box-shadow:0 0 0 2px var(--zb-accent) inset}
.zbk-choice svg{width:42px;height:52px;margin-bottom:.3rem;color:var(--zb-ink)}
.zbk-choice strong{font-weight:600}
.zbk-choice small{color:var(--zb-muted);font-size:.8rem;line-height:1.3}
.zbk-layouts{display:flex;flex-direction:column;gap:.5rem}
.zbk-layouts .zbk-choice{flex-direction:row;align-items:center;gap:.75rem;padding:.6rem .8rem}
.zbk-layouts svg{width:64px;height:28px;flex:none;margin:0}
.zbk-slots{display:grid;grid-template-columns:1fr 1fr;gap:.6rem;margin-top:.75rem}
.zbk-slot{border:1.5px dashed var(--zb-line);border-radius:16px;padding:.6rem;background:var(--zb-surface);display:flex;flex-direction:column;gap:.5rem;align-items:center;text-align:center}
.zbk-slot[hidden]{display:none}
.zbk-thumb{width:100%;aspect-ratio:4/3;display:grid;place-items:center;background-size:12px 12px;background-position:0 0,6px 6px}
.zbk-thumb canvas{max-width:100%;max-height:100%}
.zbk-label{font-size:.85rem;color:var(--zb-muted)}
.zbk-row{display:flex;gap:.4rem;flex-wrap:wrap;justify-content:center}
.zbk-btn{border:0;border-radius:999px;padding:.5rem 1rem;cursor:pointer;font-weight:600;background:var(--zb-ink);color:#fff;font-size:.9rem;line-height:1.3}
.zbk-btn:hover{filter:brightness(1.1);color:#fff;background:var(--zb-ink)}
.zbk-ghost,.zbk-ghost:hover{background:transparent;color:var(--zb-ink);border:1.5px solid var(--zb-line)}
.zbk-small{padding:.35rem .8rem;font-size:.82rem}
.zbk-file{position:relative;overflow:hidden;margin:0}
.zbk-file input{position:absolute;inset:0;opacity:0;cursor:pointer}
.zbk-toggle{display:flex;gap:.6rem;align-items:flex-start;margin-top:.75rem;cursor:pointer;font-weight:400}
.zbk-toggle input{width:1.1rem;height:1.1rem;margin-top:.2rem;accent-color:var(--zb-accent);flex:none}
.zbk-toggle small{display:block;color:var(--zb-muted);font-size:.82rem}
.zbk fieldset{border:0;margin:0;padding:0;min-width:0}
.zbk fieldset:disabled{opacity:.45}
.zbk-field{display:flex;flex-direction:column;gap:.3rem;margin-bottom:.75rem}
.zbk-field label{font-size:.9rem;font-weight:600}
.zbk-field input,.zbk-field select{border:1.5px solid var(--zb-line);background:var(--zb-surface);border-radius:12px;padding:.6rem .75rem;width:100%;min-height:2.75rem}
.zbk-count{font-size:.78rem;color:var(--zb-muted);align-self:flex-end}
.zbk-inline{display:flex;gap:1rem;flex-wrap:wrap;align-items:center}
.zbk-seg{display:flex;border:1.5px solid var(--zb-line);border-radius:999px;padding:.2rem;background:var(--zb-surface)}
.zbk-seg button{border:0;background:transparent;padding:.35rem .9rem;border-radius:999px;cursor:pointer;color:var(--zb-ink)}
.zbk-seg button[aria-pressed="true"]{background:var(--zb-ink);color:#fff}
.zbk-seg .zbk-hand{font-family:var(--zb-hand);font-size:1.25rem;line-height:1.1}
.zbk-swatches{display:flex;gap:.45rem}
.zbk-swatches button{width:30px;height:30px;padding:0;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1.5px var(--zb-line);cursor:pointer}
.zbk-swatches button[aria-pressed="true"]{box-shadow:0 0 0 2.5px var(--zb-accent)}
.zbk-qty{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}
.zbk-stepper{display:flex;align-items:center;border:1.5px solid var(--zb-line);border-radius:999px;background:var(--zb-surface)}
.zbk-stepper button{border:0;background:transparent;width:2.5rem;height:2.5rem;font-size:1.3rem;cursor:pointer;border-radius:999px;color:var(--zb-ink);padding:0}
.zbk-stepper input{width:3rem;text-align:center;border:0;background:transparent;font-weight:700;font-size:1.1rem;-moz-appearance:textfield;padding:0}
.zbk-stepper input::-webkit-inner-spin-button{-webkit-appearance:none}
.zbk-chips{display:flex;gap:.4rem;flex-wrap:wrap}
.zbk-chips button{border:1.5px solid var(--zb-line);background:var(--zb-surface);border-radius:999px;padding:.35rem .75rem;cursor:pointer;font-size:.85rem;color:var(--zb-ink)}
.zbk-chips button[aria-pressed="true"]{border-color:var(--zb-accent);color:var(--zb-accent);font-weight:600}
.zbk-tiers{font-size:.85rem;color:var(--zb-muted);margin:.6rem 0 0}
.zbk-summary{background:var(--zb-surface);border-radius:20px;padding:1.1rem 1.2rem;display:flex;flex-direction:column;gap:.75rem;border:1.5px solid var(--zb-line)}
.zbk-line{display:flex;justify-content:space-between;gap:1rem;font-size:.95rem}
.zbk-line[hidden]{display:none}
.zbk-line span:first-child{color:var(--zb-muted)}
.zbk-totalline{align-items:baseline}
.zbk-total{font-size:1.6rem;font-weight:800}
.zbk-cta,.zbk-cta:hover{padding:.85rem 1rem;font-size:1rem;background:var(--zb-accent);color:var(--zb-accent-ink)}
.zbk-cta[disabled]{opacity:.6;cursor:progress}
.zbk-saving{color:#1E8E5A;font-weight:600}
.zbk-error{color:#B3261E;font-size:.9rem;margin:0}
@media (max-width:860px){.zbk-grid{grid-template-columns:1fr}.zbk-stage-col{position:static}.zbk-stage{height:56vh;min-height:340px}}
@media (max-width:420px){.zbk-choice small{display:none}.zbk-slots{grid-template-columns:1fr}}

.zbk-stage,.zbk-hero{transition:background .3s ease}
.zbk-stage.zbk-dark,.zbk-hero.zbk-dark{background:radial-gradient(120% 90% at 50% 15%,#2B3A5C,#0C1426)}
.zbk-dark .zbk-hint{color:#A9BCD3}
.zbk-modes{position:absolute;right:1rem;top:.75rem;display:flex;gap:.2rem;background:rgba(255,255,255,.85);padding:.2rem;border-radius:999px;box-shadow:0 2px 10px rgba(28,43,74,.12)}
.zbk-modes button{border:0;background:transparent;padding:.3rem .75rem;border-radius:999px;cursor:pointer;font-size:.82rem;color:var(--zb-ink)}
.zbk-modes button[aria-pressed="true"]{background:var(--zb-ink);color:#fff}
.zbk-dark .zbk-modes{background:rgba(20,30,50,.75)}
.zbk-dark .zbk-modes button{color:#DDE7F3}
.zbk-dark .zbk-modes button[aria-pressed="true"]{background:#fff;color:#0F2C4F}

.zbk-alt,.zbk-alt:hover{background:var(--zb-accent);color:#fff}
.zbk-left{justify-content:flex-start}
html.zbk-noscroll{overflow:hidden}
.zbk-modal{position:fixed;inset:0;z-index:100000;background:rgba(10,20,40,.55);display:flex;align-items:center;justify-content:center;padding:calc(env(safe-area-inset-top,0px) + 12px) 12px calc(env(safe-area-inset-bottom,0px) + 12px)}
.zbk-modal[hidden]{display:none}
.zbk-modal-box{background:#fff;border-radius:20px;width:min(1200px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.zbk-modal-head,.zbk-modal-foot{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid var(--zb-line)}
.zbk-modal-foot{border-bottom:0;border-top:1px solid var(--zb-line);justify-content:flex-end}
.zbk-x{border:0;background:transparent;font-size:1.6rem;line-height:1;cursor:pointer;color:var(--zb-ink);padding:.2rem .5rem}
.zbk-modal-body{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:1rem;padding:1rem;overflow:auto;min-height:0}
.zbk-canvaswrap{display:flex;align-items:center;justify-content:center;min-height:0;border-radius:12px;background-color:#fff;background-image:linear-gradient(45deg,#EEF1F5 25%,transparent 25%,transparent 75%,#EEF1F5 75%),linear-gradient(45deg,#EEF1F5 25%,transparent 25%,transparent 75%,#EEF1F5 75%);background-size:16px 16px;background-position:0 0,8px 8px}
.zbk-canvasstack{position:relative;display:inline-block;max-width:100%;line-height:0}
.zbk-canvasstack canvas{display:block;max-width:100%;max-height:min(68vh,760px);width:auto;height:auto}
.zbk-overlay{position:absolute;inset:0;width:100%!important;height:100%!important;max-height:none!important;touch-action:none;cursor:crosshair}
.zbk-side{display:flex;flex-direction:column;gap:.7rem}
.zbk-toolgrid{display:grid;grid-template-columns:1fr 1fr;gap:.4rem}
.zbk-toolgrid button{border:1.5px solid var(--zb-line);background:#fff;border-radius:12px;padding:.5rem .6rem;cursor:pointer;font-size:.85rem;text-align:left;color:var(--zb-ink)}
.zbk-toolgrid button[aria-pressed="true"]{border-color:var(--zb-accent);box-shadow:0 0 0 2px var(--zb-accent) inset}
.zbk-toolgrid button[data-tool="keep"]::before,.zbk-toolgrid button[data-tool="keepFill"]::before{content:"";display:inline-block;width:.6rem;height:.6rem;border-radius:50%;background:#22C55E;margin-right:.4rem}
.zbk-toolgrid button[data-tool="erase"]::before,.zbk-toolgrid button[data-tool="eraseFill"]::before{content:"";display:inline-block;width:.6rem;height:.6rem;border-radius:50%;background:#EF4444;margin-right:.4rem}
.zbk-range{display:flex;flex-direction:column;gap:.2rem;font-size:.85rem;font-weight:600}
.zbk-range[hidden]{display:none}
.zbk-range input{width:100%;accent-color:var(--zb-accent)}
.zbk-paper{background:#F4F6F9}
.zbk-drawcanvas{display:block;width:100%;max-width:100%;max-height:min(70vh,760px);aspect-ratio:4/3;object-fit:contain;touch-action:none;background:#FBFBF8;border-radius:10px;box-shadow:0 1px 6px rgba(0,0,0,.08);cursor:crosshair}
.zbk-colors{display:grid;grid-template-columns:repeat(6,1fr);gap:.4rem}
.zbk-colors button{aspect-ratio:1;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1.5px var(--zb-line);cursor:pointer;padding:0}
.zbk-colors button[aria-pressed="true"]{box-shadow:0 0 0 3px var(--zb-accent)}
.zbk-draw-tools .zbk-seg{flex-wrap:wrap}
@media (max-width:860px){
  .zbk-modal{padding:0}
  .zbk-modal-box{border-radius:0;height:100%}
  .zbk-modal-body{display:flex;flex-direction:column;gap:.75rem;padding:.6rem}
  .zbk-canvaswrap{flex:none;position:sticky;top:-.6rem;z-index:2;padding:.4rem;box-shadow:0 6px 10px -8px rgba(0,0,0,.25)}
  .zbk-canvasstack canvas{max-height:40vh}
  .zbk-drawcanvas{max-height:56vh}
  .zbk-draw-tools{flex:none}
  .zbk-side{flex:none}
  .zbk-colors{grid-template-columns:repeat(12,1fr)}
}

.zbk-modal.zbk-ask{z-index:100001;padding:16px}
.zbk-modal-box.zbk-askbox{width:min(440px,100%);height:auto;border-radius:20px}
.zbk-askbox p{margin:0;padding:1.25rem 1.25rem .25rem;font-size:1rem;line-height:1.5}
.zbk-askbox .zbk-modal-foot{border-top:0}

.zbk-ok{color:#1E6B45;background:#E7F6EE;border-radius:10px;padding:.5rem .7rem}
.zbk-ok[hidden]{display:none}

[data-slotopts][hidden]{display:none}
.zbk-rlabel{display:flex;justify-content:space-between;gap:.5rem}
.zbk-val{font-weight:400;color:var(--zb-muted)}
.zbk-addgrid{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-top:.5rem}
.zbk-addgrid[hidden]{display:none}
.zbk-addgrid button{border:1.5px dashed var(--zb-line);background:var(--zb-surface);border-radius:14px;padding:.7rem .6rem;cursor:pointer;color:var(--zb-ink);font-weight:600;display:flex;align-items:center;gap:.5rem;text-align:left}
.zbk-addgrid button:hover{border-color:var(--zb-accent);border-style:solid;background:var(--zb-surface);color:var(--zb-ink)}
.zbk-addgrid button span{display:inline-grid;place-items:center;width:2rem;height:2rem;border-radius:8px;background:#EAF2FC;color:var(--zb-accent);font-weight:800;flex:none}
.zbk-layerpanel{border:1.5px solid var(--zb-accent);border-radius:16px;padding:.9rem;background:var(--zb-surface);display:flex;flex-direction:column;gap:.7rem;margin-top:.5rem}
.zbk-layerpanel[hidden]{display:none}
.zbk-ptitle{font-size:1rem}
.zbk-layerpanel textarea{border:1.5px solid var(--zb-line);border-radius:12px;padding:.6rem .75rem;width:100%;font:inherit;resize:vertical}
.zbk-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:.3rem;max-height:220px;overflow:auto;padding:.2rem;border:1px solid var(--zb-line);border-radius:12px}
.zbk-pick{border:1.5px solid transparent;background:transparent;border-radius:10px;padding:.25rem;cursor:pointer;aspect-ratio:1;display:grid;place-items:center}
.zbk-pick:hover{background:#F1F6FC}
.zbk-pick[aria-pressed="true"]{border-color:var(--zb-accent);background:#EAF2FC}
.zbk-pick img,.zbk-pick canvas{width:100%;height:100%;object-fit:contain}
.zbk-segwrap{flex-wrap:wrap;border-radius:14px}
.zbk-wrap{flex-wrap:wrap;align-items:center}
.zbk-colorpick{width:34px;height:34px;padding:0;border:1.5px solid var(--zb-line);border-radius:50%;background:none;cursor:pointer}
.zbk-layerlistwrap{display:flex;flex-direction:column;gap:.4rem;margin-top:.5rem}
.zbk-layerlistwrap[hidden]{display:none}
.zbk-layerlist{margin:0;padding-left:1.4rem;font-size:.9rem}
.zbk-layerpanel .zbk-field{margin:0}

.zbk-select{border:1.5px solid var(--zb-line);border-radius:10px;padding:.45rem .6rem;background:#fff;font:inherit;font-weight:400}
@media (max-width:860px){
  .zbk-stage-col{display:contents}
  .zbk-stage{position:sticky;top:0;z-index:30;height:36vh;min-height:230px;max-height:340px;align-self:start;border-radius:0 0 22px 22px;box-shadow:0 8px 16px -10px rgba(15,44,79,.35)}
  .zbk-flat{margin-top:0}
}

.zbk-rcbox{display:flex;flex-direction:column;gap:.5rem;padding:.6rem;border:1px solid var(--zb-line);border-radius:12px}
.zbk-rcbox[hidden]{display:none}
.zbk-rcpresets{display:flex;gap:.35rem;flex-wrap:wrap}
.zbk-rcpresets button{width:34px;height:34px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1.5px var(--zb-line);cursor:pointer;padding:0}
.zbk-rccolors{display:flex;gap:.4rem;flex-wrap:wrap}
.zbk-rcbox.zbk-quad .zbk-rccolors{display:grid;grid-template-columns:repeat(2,44px)}
.zbk-rccolors input{width:44px;height:36px;padding:0;border:1.5px solid var(--zb-line);border-radius:8px;background:none;cursor:pointer}
.zbk-rccolors input[hidden]{display:none}

.zbk-aibtn{width:100%}
.zbk-aibtn[hidden]{display:none}
.zbk-aibox{display:flex;flex-direction:column;gap:.35rem;font-size:.85rem;color:var(--zb-muted)}
.zbk-aibox[hidden]{display:none}
.zbk-aibox i{display:block;height:4px;border-radius:4px;background:linear-gradient(90deg,transparent,var(--zb-accent),transparent) 0 0/40% 100% no-repeat #EAF2FC;animation:zbkbar 1.2s linear infinite}
@keyframes zbkbar{from{background-position:-40% 0}to{background-position:140% 0}}
@media (prefers-reduced-motion:reduce){.zbk-aibox i{animation:none;background:var(--zb-accent)}}

/* tło „powierzchni szklanki” zamiast szachownicy – czytelne dla osób nieznających programów graficznych */
.zbk-flat-wrap,.zbk-thumb,.zbk-canvaswrap:not(.zbk-paper){background-color:#E2EDF8!important;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22300%22%20height%3D%22110%22%3E%3Ctext%20x%3D%2210%22%20y%3D%2262%22%20transform%3D%22rotate%28-12%20150%2055%29%22%20font-family%3D%22Arial%2Csans-serif%22%20font-size%3D%2215%22%20fill%3D%22%23B9D0EA%22%3Etutaj%20b%C4%99dzie%20powierzchnia%20szklanki%3C%2Ftext%3E%3C%2Fsvg%3E")!important;background-size:300px 110px!important;background-position:0 0!important}

/* edytor: zdjęcie przyklejone u góry, przewija się tylko kolumna narzędzi */
.zbk-aibox i[hidden]{display:none}
@media (min-width:861px){
  .zbk-modal-box{height:calc(100vh - 24px)}
  .zbk-modal-body{overflow:hidden;align-items:start;grid-template-rows:minmax(0,1fr);flex:1}
  .zbk-modal-body>.zbk-canvaswrap{align-self:start;align-items:flex-start;max-height:100%}
  .zbk-modal-body>.zbk-side{overflow-y:auto;max-height:100%;padding-right:.25rem;align-self:stretch}
  .zbk-canvasstack canvas{max-height:calc(100vh - 190px)}
}
