:root{
  /* Kleurplak-editor = LICHTE werkruimte in de huisstijl (paper/ink/cyaan), scherpe 2px ink-kaders.
     De oude StickItLab var-namen (purple/pink) wijzen naar cyaan zodat de rest van de CSS meelift. */
  --purple-400:#22d3ee; --purple-500:#06b6d4; --purple-600:#0891b2; --purple-700:#0e7490; --purple-900:#164e63;
  --pink-400:#0891b2; --pink-500:#06b6d4; --pink-600:#0891b2;
  --yellow-400:#0891b2;
  --gray-50:#f9fafb; --gray-100:#f3f4f6; --gray-200:#e5e7eb; --gray-300:#d1d5db;
  --gray-400:#9ca3af; --gray-500:#6b7280; --gray-600:#c3cad2; --gray-700:#374151;
  --gray-800:#1f2937; --gray-900:#111827; --gray-950:#0b0f1a;
  --grad:linear-gradient(110deg, var(--purple-600), var(--purple-700));
  --grad-3:linear-gradient(110deg, var(--purple-600), var(--purple-500), var(--purple-400));
  --bg:#f7f9fb;          /* paper */
  --card:#ffffff;
  --card-2:#eef2f6;
  --border:rgba(19,23,32,.16);
  --text:#131720;        /* ink */
  --muted:#5d6570;
  --cta:#0e7490;         /* knoppen: diepcyaan (wit = AA) */
  --radius:14px;
  --shadow:0 18px 50px -22px rgba(19,23,32,.30);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Inter',system-ui,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:'DM Sans',sans-serif;font-weight:600;line-height:1.15}
a{color:inherit;text-decoration:none}
.grad-text{background:var(--grad-3);-webkit-background-clip:text;background-clip:text;color:transparent}
.grad-link{color:var(--purple-400);font-weight:600}
.grad-link:hover{color:var(--pink-400)}
.muted{color:var(--muted)}
.small{font-size:.82rem}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;gap:.5rem;border:none;cursor:pointer;
  font-family:'DM Sans',sans-serif;font-weight:500;font-size:.95rem;border-radius:999px;
  padding:.7rem 1.3rem;transition:transform .12s ease, box-shadow .2s ease, background .2s;color:#fff}
.btn:active{transform:translateY(1px) scale(.99)}
.btn-primary{background:var(--grad);box-shadow:0 8px 24px -6px rgba(236,72,153,.5)}
.btn-primary:hover{box-shadow:0 10px 30px -4px rgba(236,72,153,.65)}
.btn-outline{background:transparent;border:1.5px solid var(--border);color:var(--text)}
.btn-outline:hover{border-color:var(--text);background:var(--text);color:#fff}
.btn-ghost{background:rgba(255,255,255,.06);width:34px;height:34px;padding:0;justify-content:center;border-radius:50%}
.btn-lg{padding:.85rem 1.7rem;font-size:1.02rem}
.btn-sm{padding:.45rem .8rem;font-size:.85rem;gap:.35rem}

/* ---------- topbar ---------- */
.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;justify-content:space-between;
  padding:.75rem 1.6rem;backdrop-filter:blur(12px);background:rgba(11,15,26,.72);border-bottom:1px solid var(--border)}
.brand{display:flex;align-items:center;gap:.55rem;font-family:'DM Sans',sans-serif;font-weight:600;font-size:1.2rem}
.brand-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--grad);font-size:1.1rem;transform:rotate(-8deg)}
.brand-accent{background:var(--grad-3);-webkit-background-clip:text;background-clip:text;color:transparent}
.brand-tag{font-family:'Inter';font-size:.62rem;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);
  border:1px solid var(--border);padding:.15rem .4rem;border-radius:6px;margin-left:.3rem}
.topnav{display:flex;align-items:center;gap:1.3rem;font-size:.92rem}
.topnav a{color:var(--muted)}.topnav a:hover{color:#fff}

/* ---------- hero ---------- */
.hero{padding:4rem 1.6rem 3rem}
.hero-inner{max-width:1180px;margin:0 auto;display:grid;grid-template-columns:1.1fr .9fr;gap:2.5rem;align-items:center}
.pill{display:inline-block;font-size:.78rem;font-weight:600;color:var(--purple-400);
  background:rgba(168,85,247,.12);border:1px solid rgba(168,85,247,.3);padding:.35rem .8rem;border-radius:999px;margin-bottom:1.2rem}
.hero h1{font-size:clamp(2.1rem,4.5vw,3.4rem);margin-bottom:1rem}
.lead{font-size:1.08rem;color:var(--muted);max-width:36ch;margin-bottom:1.6rem}
.hero-cta{display:flex;gap:.8rem;flex-wrap:wrap;margin-bottom:2rem}
.hero-stats{display:flex;gap:1.8rem}
.hero-stats div{display:flex;flex-direction:column}
.hero-stats b{font-family:'DM Sans';font-size:1.4rem;background:var(--grad-3);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero-stats span{font-size:.78rem;color:var(--muted)}

.hero-art{position:relative;height:380px;display:grid;place-items:center}
.float-sheet{width:230px;height:320px;background:#fff;border-radius:14px;
  box-shadow:0 30px 60px -15px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.05);
  transform:rotate(6deg);display:grid;place-items:center;position:relative}
.float-sheet span{font-family:'Caveat';color:var(--gray-400);font-size:1.4rem;transform:rotate(-6deg)}
.float-sheet::before{content:"";position:absolute;inset:14px;border:1.5px dashed var(--gray-200);border-radius:8px}
.float-sticker{position:absolute;width:74px;height:74px;display:grid;place-items:center;font-size:2.4rem;
  background:#fff;border-radius:16px;box-shadow:0 14px 30px -8px rgba(0,0,0,.45);animation:bob 5s ease-in-out infinite}
.s1{top:6%;left:8%;transform:rotate(-12deg)}
.s2{top:0;right:14%;transform:rotate(10deg);animation-delay:.6s}
.s3{bottom:10%;left:2%;transform:rotate(8deg);animation-delay:1.2s}
.s4{bottom:2%;right:6%;transform:rotate(-9deg);animation-delay:1.8s}
@keyframes bob{0%,100%{translate:0 0}50%{translate:0 -12px}}

/* ---------- sections ---------- */
.section{max-width:1100px;margin:0 auto;padding:3.5rem 1.6rem}
.section-title{font-size:clamp(1.6rem,3vw,2.3rem);text-align:center;margin-bottom:.4rem}
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:1.1rem;margin-top:2.2rem}
.step{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:1.4rem}
.step-no{width:38px;height:38px;border-radius:11px;background:var(--grad);display:grid;place-items:center;
  font-family:'DM Sans';font-weight:600;margin-bottom:.8rem}
.step h3{font-size:1.15rem;margin-bottom:.35rem}
.step p{font-size:.9rem;color:var(--muted)}

/* ---------- designer ---------- */
.designer{max-width:1320px;margin:0 auto;padding:2rem 1.6rem 4rem}
.designer-head{text-align:center;margin-bottom:1.8rem}
.editor{display:grid;grid-template-columns:248px 1fr 274px;gap:1rem;align-items:start}
.panel{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:1rem;position:sticky;top:74px}
.rightcol{position:sticky;top:74px;display:flex;flex-direction:column;gap:1rem}
.rightcol .panel{position:static;top:auto}
.panel-title{font-size:.78rem;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);margin:1rem 0 .6rem}
.panel-title:first-child{margin-top:0}

.tool-btn{width:100%;text-align:left;background:var(--card-2);border:1px solid var(--border);color:var(--text);
  border-radius:10px;padding:.6rem .8rem;font-size:.9rem;cursor:pointer;margin-bottom:.5rem;transition:.15s}
.tool-btn:hover{border-color:var(--purple-500);background:rgba(6,182,212,.10)}
.tool-btn.sm{padding:.45rem .6rem;font-size:.82rem}
.tool-btn.ghost{background:transparent}
.tool-btn.danger{color:#dc2626;border-color:rgba(220,38,38,.35)}
.tool-btn.danger:hover{background:rgba(244,63,94,.12)}
.tool-sub{font-size:.75rem;color:var(--muted);margin:.4rem 0}

/* Mijn uploads - persoonlijke galerij onder de upload-knop */
.upload-mine{margin:.6rem 0 .9rem}
.upload-gallery{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem;margin-top:.45rem}
.upload-gallery:empty{margin-top:0}
.up-tile{position:relative;aspect-ratio:1;border:1px solid var(--border);background:#fff;border-radius:9px;
  padding:3px;cursor:pointer;overflow:hidden;transition:.15s}
.up-tile:hover{border-color:var(--purple-500);transform:translateY(-2px);box-shadow:0 6px 16px -10px rgba(19,23,32,.5)}
.up-tile img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}
.up-del{position:absolute;top:1px;right:1px;width:16px;height:16px;display:grid;place-items:center;
  background:var(--text);color:#fff;border-radius:0 8px 0 8px;font-size:.6rem;line-height:1;opacity:0;transition:opacity .12s}
.up-tile:hover .up-del,.up-del:hover{opacity:1}
.up-del:hover{background:#dc2626}

/* add-element tabs - clean line-icon over a label, in a soft segmented track */
.seg.add-tabs{gap:.3rem;padding:.3rem;background:var(--card-2);border:1px solid var(--border);
  border-radius:12px;overflow:visible;margin-bottom:.9rem}
.seg.add-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.34rem;
  font-size:.72rem;font-weight:600;padding:.62rem .2rem;line-height:1;border-radius:9px;color:var(--muted);
  transition:background .15s,color .15s,box-shadow .15s,transform .1s}
.seg.add-tabs button:hover{color:var(--text);background:rgba(148,163,184,.14)}
.seg.add-tabs button:active{transform:translateY(1px)}
.seg.add-tabs button.active{background:var(--grad);color:#fff;box-shadow:0 5px 14px -5px rgba(6,182,212,.55)}
.add-tabs .tab-ic{width:22px;height:22px;display:block}
.add-tabs .tab-ic svg{width:100%;height:100%;display:block}
.add-pane{animation:fade .2s ease}
@keyframes fade{from{opacity:0;translate:0 4px}to{opacity:1;translate:0 0}}
.divider{border:none;border-top:1px solid var(--border);margin:1.1rem 0 .8rem}
.mini-label{display:block;font-size:.72rem;color:var(--muted);margin:.7rem 0 .35rem;text-transform:uppercase;letter-spacing:.06em}
.seg.three button{font-size:.78rem;padding:.4rem .2rem}
.mode-desc{font-size:.72rem;color:var(--muted);margin-top:.4rem;line-height:1.35}

/* voorbeeldontwerp-banner boven het vel: "dit is een voorbeeld, begin met een leeg vel".
   Verdwijnt na de eerste actie (JS zet [hidden]). */
.default-note{display:flex;align-items:center;justify-content:center;gap:.7rem;flex-wrap:wrap;
  margin:0 0 .5rem;padding:.5rem .8rem;background:var(--card-2);border:1px dashed var(--border);
  border-radius:10px;font-size:.85rem;color:var(--muted);text-align:center}
.default-note[hidden]{display:none}
.default-note b{color:var(--text)}
.default-note .btn{white-space:nowrap}

.field{margin-bottom:.9rem}
.field>label{display:block;font-size:.8rem;color:var(--muted);margin-bottom:.35rem}
.field .val{color:var(--purple-400);font-weight:600}
input[type=range]{width:100%;accent-color:var(--pink-500)}
input[type=color]{width:100%;height:34px;border:1px solid var(--border);border-radius:8px;background:var(--card-2);cursor:pointer}
select,textarea,input[type=number]{width:100%;background:var(--card-2);border:1px solid var(--border);color:var(--text);
  border-radius:8px;padding:.5rem;font-family:inherit;font-size:.88rem}
textarea{resize:vertical}
.seg{display:flex;background:var(--card-2);border:1px solid var(--border);border-radius:9px;overflow:hidden}
.seg button{flex:1;background:transparent;border:none;color:var(--muted);padding:.45rem;cursor:pointer;font-size:.85rem}
.seg button.active{background:var(--grad);color:#fff}
.swatches{display:flex;gap:.35rem;flex-wrap:wrap;margin-bottom:.4rem}
.swatches button{width:24px;height:24px;border-radius:6px;border:2px solid var(--border);cursor:pointer}
.swatches button.active{border-color:#fff;transform:scale(1.1)}
.check{display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--muted);margin:.6rem 0;cursor:pointer}
.check input{accent-color:var(--pink-500);width:16px;height:16px}
.btn-row{display:flex;gap:.5rem;margin:.4rem 0}
.btn-row .tool-btn{margin-bottom:0}

/* ---------- layers panel ---------- */
.layers-head{display:flex;align-items:baseline;justify-content:space-between}
.layers-head .panel-title{margin:0}
.layers-hint{font-size:.68rem;color:var(--muted)}
.layer-list{display:flex;flex-direction:column;gap:.3rem;margin-top:.7rem;max-height:340px;overflow-y:auto}
/* Lagen panel: the "LAGEN" header stays put and only the rows scroll (the list is the single
   scroller), so the scroll-fade lives inside the list and never overlaps the header. */
.app .rightcol .panel.inspector{flex:0 1 auto}
/* Eigenschappen in-/uitklappen (alleen desktop-app): ingeklapt blijft alleen de kopbalk over en krijgt Lagen de ruimte */
.insp-toggle{display:none}
@media(min-width:1001px){
  .app .insp-toggle{display:flex;align-items:center;gap:.4rem;width:100%;margin:0 0 .8rem;padding:.15rem 0;background:none;border:0;
    cursor:pointer;font:inherit;color:var(--muted);text-align:left}
  .app .insp-toggle:hover{color:var(--text)}
  .app .insp-toggle:focus-visible{outline:2px solid var(--purple-400);outline-offset:3px;border-radius:4px}
  .app .insp-toggle-t{font-size:.78rem;text-transform:uppercase;letter-spacing:.1em;font-weight:700}
  .app .insp-toggle-sel{flex:1 1 auto;min-width:0;font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .app .insp-toggle-chev{flex:none;font-size:.85rem;transition:transform .2s}
  .app .panel.inspector.is-collapsed{padding-top:.7rem;padding-bottom:.7rem}
  .app .panel.inspector.is-collapsed .insp-toggle{margin-bottom:0}
  .app .panel.inspector.is-collapsed .insp-toggle-chev{transform:rotate(-90deg)}
  .app .panel.inspector.is-collapsed #insp-body{display:none}
  .app .panel.inspector #insp-title{display:none}
}
@media(prefers-reduced-motion:reduce){.insp-toggle-chev{transition:none}}
.app .rightcol .panel.layers{flex:1 1 0;min-height:140px;display:flex;flex-direction:column;overflow:hidden}
.app .panel.layers .layers-head{flex:0 0 auto}
.app .panel.layers .layer-list{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto}
.layer-empty{font-size:.82rem;color:var(--muted);text-align:center;padding:1rem .5rem}
.layer-row{display:flex;align-items:center;gap:.5rem;background:var(--card-2);border:1px solid var(--border);
  border-radius:9px;padding:.35rem .45rem;cursor:pointer;transition:.12s;position:relative}
.layer-row:hover{border-color:var(--purple-400)}
.layer-row.active{border-color:var(--purple-500);background:rgba(6,182,212,.12);box-shadow:0 0 0 1px var(--purple-500) inset}
.layer-row.drag{opacity:.4}
.layer-row.drop-above::before,.layer-row.drop-below::after{content:"";position:absolute;left:4px;right:4px;height:2px;background:var(--pink-500);border-radius:2px}
.layer-row.drop-above::before{top:-2px}
.layer-row.drop-below::after{bottom:-2px}
/* drag handle: the only place reordering starts, so it must not scroll the list (touch-action:none).
   Bigger hit area (esp. for touch); the rest of the row keeps default pan-y so swiping scrolls. */
.layer-grip{color:var(--gray-500);font-size:1rem;cursor:grab;line-height:1;flex:0 0 auto;align-self:stretch;
  display:flex;align-items:center;padding:0 .35rem;margin:0 -.1rem 0 -.2rem;touch-action:none;user-select:none}
.layer-grip:active{cursor:grabbing}
.layer-row.is-bg .layer-grip{cursor:default;opacity:.4}
.layer-thumb img{pointer-events:none;-webkit-user-drag:none}
.layer-thumb{width:30px;height:30px;flex:0 0 auto;border-radius:6px;background:#fff;display:grid;place-items:center;
  overflow:hidden;border:1px solid var(--border)}
.layer-thumb img{width:100%;height:100%;object-fit:contain}
.layer-thumb.txt{background:var(--card);font-family:'DM Sans';font-weight:700;font-size:1.1rem}
.layer-name{flex:1;min-width:0;font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.layer-btn{flex:0 0 auto;background:transparent;border:none;cursor:pointer;font-size:.85rem;width:22px;height:22px;
  border-radius:5px;opacity:.7;filter:grayscale(.3)}
.layer-btn:hover{opacity:1;background:rgba(255,255,255,.08)}
.layer-row.locked{opacity:.75}
.layer-row.hidden-layer .layer-name,.layer-row.hidden-layer .layer-thumb{opacity:.4}

/* background as a layer */
.layer-row.is-bg{background:#eef2f6;border-color:var(--border)}
.layer-badge{font-size:.55rem;text-transform:uppercase;letter-spacing:.08em;color:var(--accent-deep);
  background:rgba(6,182,212,.12);border:1px solid rgba(6,182,212,.32);padding:.05rem .3rem;border-radius:4px;margin-left:.3rem;flex:0 0 auto}
.layer-thumb.bg-color{border:1px solid var(--border)}

/* a sticker that overlaps another - matches the red fuse-zones on the sheet */
.layer-overlap{display:inline-flex;align-items:center;gap:.2rem;font-size:.55rem;text-transform:uppercase;letter-spacing:.06em;
  color:#b91c1c;background:rgba(244,63,94,.12);border:1px solid rgba(220,38,38,.45);padding:.05rem .3rem;border-radius:4px;margin-left:.3rem;flex:0 0 auto}
.layer-overlap::before{content:"";width:6px;height:6px;border-radius:50%;background:#ff0000;flex:0 0 auto}
.layer-row.overlap{border-color:rgba(244,63,94,.55)}
.layer-row.overlap .layer-thumb{box-shadow:0 0 0 2px rgba(255,0,0,.55)}

/* ---------- chic scroll affordance: hide the scrollbar, fade-to-dark + chevron instead ---------- */
.scrollfade{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden;-webkit-overflow-scrolling:touch;--sf-inset:0px}
.scrollfade::-webkit-scrollbar{width:0;height:0;display:none}
.panel.scrollfade{--sf-inset:1rem}     /* panels have 1rem padding; lists have none */
.sf-fade{position:sticky;height:0;z-index:6;pointer-events:none}        /* 0-height, so it adds no flow space */
.sf-fade.sf-up{top:0}
.sf-fade.sf-down{bottom:0}
/* span the scroller's full inner width (cancel its padding, if any) so the fade is edge-to-edge */
.sf-fade i{position:absolute;left:calc(0px - var(--sf-inset));right:calc(0px - var(--sf-inset));
  height:22px;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .18s ease}
.sf-up i{top:0;background:linear-gradient(to top,transparent 35%,var(--card))}
.sf-down i{bottom:0;background:linear-gradient(to bottom,transparent 35%,var(--card))}
.sf-fade svg{width:18px;height:11px;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;
  filter:drop-shadow(0 1px 1.5px rgba(0,0,0,.7))}
.scrollfade.sf-can-up .sf-up i{opacity:1}
.scrollfade.sf-can-down .sf-down i{opacity:1}

/* the background is inert until its layer is selected - clicks on the sheet pass through it */
.obj.bg-obj{cursor:default;pointer-events:none}
.obj.bg-obj .obj-inner{padding:0 !important}
.obj.bg-obj.movable{cursor:grab}
.obj.bg-obj.movable.dragging{cursor:grabbing}
.obj.bg-obj.selected{outline:2px dashed var(--purple-500);outline-offset:-2px;pointer-events:auto}
.obj.bg-obj img{position:absolute;max-width:none;width:auto;height:auto;object-fit:fill}

.obj.locked{cursor:default}
.obj.locked .handle,.obj.locked .h-del{display:none !important}
.obj.hidden-obj{display:none}

/* ---------- stage / sheet ---------- */
.stage-wrap{display:flex;flex-direction:column}
.stage-toolbar{display:flex;align-items:center;gap:.4rem;margin-bottom:.6rem;flex-wrap:wrap}
.chip{background:var(--card);border:1px solid var(--border);padding:.35rem .7rem;border-radius:999px;font-size:.8rem;color:var(--muted)}
.auto-btn{display:inline-flex;align-items:center;gap:.35rem;background:var(--grad);color:#fff;border:none;
  border-radius:999px;padding:.45rem .9rem;font-family:'DM Sans',sans-serif;font-size:.85rem;font-weight:500;
  cursor:pointer;box-shadow:0 6px 16px -6px rgba(236,72,153,.55);transition:transform .12s, box-shadow .2s;white-space:nowrap}
.auto-btn:hover{transform:translateY(-1px);box-shadow:0 9px 22px -6px rgba(236,72,153,.7)}
.auto-btn:active{transform:translateY(0)}
.auto-wrap{position:relative;display:inline-flex;gap:.25rem;align-items:center}
.auto-cog{width:34px;height:34px;border-radius:50%;background:var(--card);border:1px solid var(--border);
  color:var(--text);cursor:pointer;font-size:.95rem;transition:.15s}
.auto-cog:hover{border-color:var(--purple-400);background:var(--card-2)}
.auto-cog.open{background:var(--purple-700);border-color:var(--purple-500);color:#fff}
.auto-pop{position:absolute;top:calc(100% + .5rem);left:0;z-index:40;width:250px;
  background:var(--card);border:1px solid var(--border);border-radius:14px;padding:.9rem;
  box-shadow:0 16px 40px -10px rgba(0,0,0,.6)}
.auto-pop[hidden]{display:none}
.ao-h{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);
  margin:.7rem 0 .4rem;display:block;font-family:'DM Sans',sans-serif;font-weight:600}
.ao-h:first-child{margin-top:0}
.ao-note{font-size:.72rem;color:var(--muted);line-height:1.4;margin:.6rem 0 .2rem}
.seg.two button{font-size:.84rem;padding:.45rem}
.ao-density{display:flex;align-items:center;gap:.5rem}
.ao-density span{font-size:.68rem;color:var(--muted)}
.ao-density input{flex:1}
.spacer{flex:1}
.mini{width:36px;height:36px;border-radius:9px;background:var(--card);border:1px solid var(--border);color:var(--text);
  cursor:pointer;font-size:1rem;transition:.15s}
.mini:hover{border-color:var(--purple-400);background:var(--card-2)}
.mini.danger:hover{border-color:#f43f5e;color:#fda4af}
.mini:disabled{opacity:.35;cursor:default}
.mini:disabled:hover{border-color:var(--border);background:var(--card)}
/* grouped toolbar buttons (undo/redo · order · dup/del) - one pill per group, no boxy clutter */
.tb-group{display:inline-flex;align-items:center;background:var(--card);border:1px solid var(--border);border-radius:9px;overflow:hidden}
.tb-btn{width:34px;height:34px;display:grid;place-items:center;background:transparent;border:none;color:var(--text);
  cursor:pointer;font-size:1rem;transition:.12s}
.tb-btn + .tb-btn{border-left:1px solid var(--border)}
.tb-btn:hover:not(:disabled){background:var(--card-2);color:var(--text)}
.tb-btn:disabled{opacity:.3;cursor:default}
.tb-btn.danger:hover:not(:disabled){background:rgba(244,63,94,.12);color:#dc2626}

.stage{background-color:#eef2f6;
  background-image:radial-gradient(rgba(19,23,32,.07) 1.1px, transparent 1.1px);
  background-size:16px 16px;
  border:2px solid var(--text);border-radius:0;padding:24px;
  display:grid;place-items:center;min-height:520px;overflow:hidden}
.sheet{position:relative;box-shadow:0 18px 50px -20px rgba(19,23,32,.45);user-select:none;touch-action:none;
  /* transparent "no background" sheet, shown as a light checkerboard (Photoshop-style) */
  background-color:#fff;
  background-image:
    linear-gradient(45deg,#e7e7ef 25%,transparent 25%),
    linear-gradient(-45deg,#e7e7ef 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#e7e7ef 75%),
    linear-gradient(-45deg,transparent 75%,#e7e7ef 75%);
  background-size:18px 18px;
  background-position:0 0,0 9px,9px -9px,-9px 0}
/* Vast vel A5 staand (148 × 210 mm) - de designer kent maar één formaat/oriëntatie */
.sheet.portrait{width:min(360px,72vw);aspect-ratio:148/210}
.sheet.landscape{width:min(360px,72vw);aspect-ratio:148/210}
.bg-layer{position:absolute;inset:0;background-size:cover;background-position:center;pointer-events:none}
/* snijmarge als overlay bovenop de objecten (o.a. een vullende achtergrond), pointer-events:none
   zodat het niks blokkeert; anders zou een full-bleed achtergrond de marge verbergen */
.guide-margin{position:absolute;inset:3.3%;border:1px dashed rgba(8,145,178,.7);pointer-events:none;border-radius:2px;z-index:3}
.guide-margin.hidden{display:none}
.objects{position:absolute;inset:0}
.sheet-watermark{position:absolute;bottom:4px;right:6px;font-size:.55rem;color:rgba(19,23,32,.3);font-family:'Inter';pointer-events:none}
.cut-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:4;
  mix-blend-mode:normal;opacity:1}

.border-note{font-size:.78rem;color:var(--body);line-height:1.45;
  background:rgba(6,182,212,.10);border:1px solid rgba(6,182,212,.32);border-radius:9px;padding:.55rem .65rem;margin-bottom:.6rem}
.border-note b{color:var(--text)}
/* overlap warning, shown inline with the order summary (red, to match the fuse-zones) */
.order-merge{font-size:.78rem;color:#dc2626;line-height:1.35;margin:-.05rem 0 .15rem;
  display:flex;gap:.35rem;align-items:flex-start}
.order-merge:empty{display:none}

/* centered placeholder when nothing is selected */
.insp-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;
  gap:.6rem;color:var(--muted);padding:2.2rem 1rem;min-height:190px}
/* the class sets display:flex, which would otherwise beat the [hidden] attribute - restore it */
.insp-empty[hidden]{display:none}
.insp-empty-icon{font-size:1.9rem;opacity:.85;filter:grayscale(.15)}
.insp-empty p{max-width:24ch;font-size:.9rem;line-height:1.5}

.obj{position:absolute;transform-origin:center center;cursor:grab}
.obj.dragging{cursor:grabbing}
.obj .obj-inner{width:100%;height:100%;display:grid;place-items:center;overflow:hidden}
/* text-sticker box: white rounded label that IS the kiss-cut shape (radius scales with the
   sheet so the on-screen preview matches the exported contour) */
.obj.has-border .obj-inner{background:#fff;border-radius:max(7px, calc(var(--mm) * 1.4));
  box-shadow:0 1px 4px rgba(0,0,0,.18)}
.obj img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}
/* text box sizes to its content, independent of its position on the sheet,
   and never auto-wraps (manual line breaks via Enter are preserved) */
.obj.txt{width:max-content;max-width:none}
.obj.txt .obj-inner{overflow:visible;display:flex;align-items:center;justify-content:center}
.obj .txt-content{white-space:pre;text-align:center;line-height:1.2;width:100%;display:block}

.obj.selected{outline:1.5px solid var(--purple-500);outline-offset:1px}
/* while selected, lift the object (and its handles/outline) above the others so it's
   clearly visible and grabbable even when another sticker overlaps it - never the background */
.obj.selected:not(.bg-obj){z-index:30}
.handle{position:absolute;width:16px;height:16px;background:#fff;border:2px solid var(--purple-600);border-radius:50%;
  display:none;z-index:5}
.obj.selected .handle{display:block}
.h-scale{right:-8px;bottom:-8px;cursor:nwse-resize}
.h-rot{left:50%;top:-30px;margin-left:-8px;cursor:grab;background:var(--purple-600)}
.h-rot::after{content:"";position:absolute;left:50%;top:14px;width:1.5px;height:16px;background:var(--purple-600);transform:translateX(-50%)}
.h-del{left:-8px;top:-8px;cursor:pointer;background:#f43f5e;border-color:#fff;color:#fff;font-size:.65rem;
  display:none;align-items:center;justify-content:center;line-height:1}
.obj.selected .h-del{display:flex}

.stage-hint{text-align:center;font-size:.8rem;color:var(--muted);margin-top:.7rem}

/* ---------- order bar ---------- */
.orderbar{display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(210px,.9fr) auto minmax(0,1fr) auto;
  gap:1.75rem;align-items:center;
  background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem 1.6rem;margin-top:1.3rem}
.order-info{display:flex;flex-direction:column;gap:.05rem;min-width:0}
.order-line{display:flex;gap:.5rem;font-size:.86rem;padding:.12rem 0;color:var(--muted);align-items:baseline}
.order-line>span{flex:0 0 auto;min-width:62px}
.order-line>b{color:var(--text);font-weight:600;min-width:0}
/* sheet-fill / capacity indicator */
.order-cap{margin:.45rem 0 .2rem;max-width:250px}
.cap-bar{height:6px;border-radius:99px;background:var(--card-2);border:1px solid var(--border);overflow:hidden}
.cap-bar i{display:block;height:100%;width:0;border-radius:99px;background:var(--grad-3);transition:width .25s ease}
.cap-bar.over i{background:linear-gradient(90deg,#f59e0b,#ef4444)}
#o-capnote{display:block;margin-top:.34rem;font-size:.72rem}
#o-capnote.warn{color:#dc2626}
/* labelled fields (materiaal, aantal) - label on top, control full width below */
.order-field{min-width:0}
.order-field>label{display:block;font-size:.74rem;letter-spacing:.02em;text-transform:uppercase;color:var(--muted);margin-bottom:.45rem;font-weight:600}
.order-field select{width:100%}
.order-qty{justify-self:start}
.stepper{display:flex;align-items:center;border:1px solid var(--border);border-radius:10px;overflow:hidden;width:max-content}
.stepper button{width:40px;height:40px;background:var(--card-2);border:none;color:var(--text);font-size:1.2rem;cursor:pointer;transition:background .15s}
.stepper button:hover{background:var(--purple-700)}
.stepper input{width:52px;height:40px;text-align:center;border:none;border-left:1px solid var(--border);border-right:1px solid var(--border);border-radius:0}
.order-total{text-align:right;min-width:0}
.price-big{font-family:'DM Sans';font-size:1.85rem;line-height:1.05;background:var(--grad-3);-webkit-background-clip:text;background-clip:text;color:transparent}
.price-per{font-size:.82rem;color:var(--muted);margin-top:.1rem}
.order-total .muted{display:block;margin-top:.1rem;font-size:.74rem}
.order-actions{display:flex;flex-direction:column;gap:.55rem}
.order-actions .btn{justify-content:center;white-space:nowrap}
/* laminaat + akkoordverklaring stapelen in het order-veld (checkboxes, geen uppercase label) */
.order-field>label.check{display:flex;text-transform:none;letter-spacing:0;font-size:.8rem;font-weight:500;margin:0 0 .55rem;color:var(--text)}
.order-field .lam-check .muted{font-weight:400}
.order-field .disc-check{font-size:.72rem;line-height:1.35;align-items:flex-start;color:var(--muted)}
.order-field .disc-check input{margin-top:.15rem;flex:0 0 auto}
.order-warn{font-size:.76rem;color:#fcd34d;line-height:1.35;margin:.15rem 0}
.order-warn:empty,.order-warn[hidden]{display:none}
.btn.busy{opacity:.65;pointer-events:none}

/* ---------- footer ---------- */
.footer{border-top:1px solid var(--border);color:var(--muted);font-size:.9rem;
  background:linear-gradient(to bottom, transparent, rgba(168,85,247,.04))}
.footer-inner{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:2.2fr 1fr 1fr 1fr;gap:2.4rem;
  padding:3rem 1.6rem 2.2rem}
.footer-brand .brand{margin-bottom:.85rem}
.footer-brand p{max-width:36ch;margin-bottom:1.1rem;line-height:1.55}
.footer-col h5{font-family:'DM Sans',sans-serif;font-size:.95rem;font-weight:600;color:var(--text);margin-bottom:.8rem}
.footer-col a,.footer-col span{display:block;color:var(--muted);font-size:.88rem;padding:.22rem 0;text-decoration:none}
.footer-col a:hover{color:var(--purple-400)}
.footer-bottom{max-width:1100px;margin:0 auto;display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:.6rem;padding:1.1rem 1.6rem;border-top:1px solid var(--border)}
.footer-bottom b{background:var(--grad-3);-webkit-background-clip:text;background-clip:text;color:transparent}
@media(max-width:760px){
  .footer-inner{grid-template-columns:1fr 1fr;gap:1.6rem;padding:2.2rem 1.1rem 1.6rem}
  .footer-brand{grid-column:1/-1}
}
@media(max-width:430px){ .footer-inner{grid-template-columns:1fr} }

/* ---------- modals ---------- */
.modal-overlay{position:fixed;inset:0;background:rgba(19,23,32,.5);backdrop-filter:blur(4px);
  display:grid;place-items:center;z-index:100;padding:1.5rem}
.modal-overlay[hidden]{display:none}
.modal{background:var(--card);border:2px solid var(--text);border-radius:14px;padding:2rem;max-width:440px;width:100%;
  position:relative;text-align:center;box-shadow:var(--shadow)}
.modal h3{font-size:1.5rem;margin-bottom:.5rem}
.modal-close{position:absolute;top:1rem;right:1rem;background:var(--card-2);border:1px solid var(--border);
  color:var(--text);width:32px;height:32px;border-radius:50%;cursor:pointer}
.modal-check{width:64px;height:64px;border-radius:50%;background:var(--grad);display:grid;place-items:center;
  font-size:2rem;margin:0 auto 1rem}
.modal-preview{margin:1rem 0;border-radius:12px;overflow:hidden;border:1px solid var(--border);background:#fff;padding:.5rem}
.modal-preview img{max-width:100%;max-height:320px;display:block;margin:0 auto}
.help-list{text-align:left;margin:1rem 0;padding-left:1.1rem;color:var(--muted);font-size:.92rem}
.help-list li{margin-bottom:.4rem}
.help-list b{color:var(--text)}

/* Verzorgde uitleg-modal */
.modal-help{max-width:490px;text-align:left;padding:1.5rem 1.6rem 1.5rem;max-height:90vh;overflow-y:auto}
.help-head{display:flex;align-items:center;gap:.85rem;margin-bottom:1.15rem;padding-bottom:1.1rem;border-bottom:2px solid var(--text)}
.help-mark{flex:none;width:44px;height:44px;display:grid;place-items:center;border:2px solid var(--text)}
.help-mark svg{display:block}
.help-eyebrow{font-family:'Inter',sans-serif;font-size:.66rem;text-transform:uppercase;letter-spacing:.14em;font-weight:700;color:var(--purple-600);margin:0 0 .15rem}
.modal-help h3{font-size:1.4rem;margin:0}
.help-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.8rem}
.help-steps li{display:flex;gap:.75rem;align-items:flex-start}
.help-ic{flex:none;width:34px;height:34px;display:grid;place-items:center;font-size:1.02rem;line-height:1;
  background:rgba(6,182,212,.12);border:1px solid rgba(6,182,212,.28);border-radius:9px}
.help-steps li>div{font-size:.9rem;color:var(--muted);line-height:1.5}
.help-steps li b{display:block;color:var(--text);font-weight:600;margin-bottom:.06rem;font-family:'DM Sans',sans-serif}
.help-foot{margin:1.15rem 0 0;padding-top:.9rem;border-top:1px solid var(--border)}
.help-keys{font-size:.74rem;color:var(--muted)}
.help-keys kbd{font-family:'Inter',sans-serif;font-size:.68rem;background:var(--card-2);border:1px solid var(--border);
  border-bottom-width:2px;border-radius:5px;padding:.05rem .32rem;color:var(--text)}
.help-start{width:100%;justify-content:center;margin-top:1.1rem}
.modal p{color:var(--muted);margin-bottom:.8rem}
.save-actions{display:flex;flex-direction:column;gap:.6rem;margin-top:1.2rem}
.save-actions .tool-btn{text-align:center}

/* ---------- full-screen app shell (designer.html, body.app) ---------- */
body.app{height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
.app-bar{display:flex;align-items:center;gap:.6rem;padding:.6rem 1rem;flex:0 0 auto;z-index:50;
  background:var(--bg);border-bottom:2px solid var(--text)}
.app-bar .brand{font-size:1.1rem}
.app-bar-tag{font-family:'Inter';font-size:.62rem;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);
  border:1px solid var(--border);padding:.15rem .45rem;border-radius:6px}
.app-bar .spacer{flex:1}
.app-iconbtn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;
  flex:none;padding:0;border:2px solid var(--text);background:transparent;color:var(--text);border-radius:0;
  cursor:pointer;font:700 1.05rem/1 'DM Sans',sans-serif;transition:background .15s,color .15s}
.app-iconbtn:hover{background:var(--text);color:#fff}
.app-iconbtn svg{display:block}
.app-cart-count{position:absolute;top:-7px;right:-7px;min-width:19px;height:19px;padding:0 5px;
  display:inline-flex;align-items:center;justify-content:center;background:#06b6d4;color:var(--text);
  border:2px solid var(--bg);border-radius:999px;font-family:'Inter',sans-serif;font-weight:800;font-size:.62rem;line-height:1}
.app .designer{max-width:none;margin:0;padding:0;flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.app .designer-head,.app .stage-hint{display:none}

/* desktop / large tablet: 3 columns fill the viewport, canvas as big as possible */
@media(min-width:1001px){
  .app .editor{flex:1 1 auto;min-height:0;grid-template-columns:272px minmax(0,1fr) 272px;gap:.7rem;padding:.7rem;align-items:stretch}
  .app .panel{position:static;top:auto;max-height:100%;overflow-y:auto}
  .app .rightcol{position:static;top:auto;height:100%;min-height:0;gap:.7rem}
  .app .rightcol .panel{min-height:0}
  .app .stage-wrap{min-height:0}
  .app .stage{flex:1 1 auto;min-height:0;padding:16px}
  .app .sheet.portrait{height:100%;width:auto;max-width:100%;max-height:100%}
  .app .sheet.landscape{width:100%;height:auto;max-width:100%;max-height:100%}
  .app .stage-hint{display:block;text-align:center;margin:.35rem 0 0;font-size:.72rem;opacity:.7}
  /* compact bottom bar */
  .app .orderbar{margin:0;border-radius:0;border-left:none;border-right:none;border-bottom:none;flex:0 0 auto;
    padding:.7rem 1.2rem;gap:1.25rem;align-items:center;
    grid-template-columns:minmax(0,1fr) minmax(238px,.8fr) auto minmax(0,.9fr) auto}
  .app .order-line{padding:.08rem 0;font-size:.82rem}
  .app .order-field>label{margin-bottom:.3rem;font-size:.66rem}
  .app .stepper button{width:34px;height:34px;font-size:1.1rem}
  .app .stepper input{width:46px;height:34px}
  .app .price-big{font-size:1.55rem}
  .app .order-actions{gap:.45rem}
}
/* phone / small tablet / smaller desktop (<1000px): canvas fills, panels worden bottom-sheets */
@media(max-width:1000px){
  /* reserve space for the fixed bottom nav so the sheet never hides under it */
  .app .designer{flex:1;min-height:0;padding:.45rem .45rem calc(60px + env(safe-area-inset-bottom))}
  .app .editor{display:flex;flex-direction:column;flex:1;min-height:0;width:100%}
  .app .stage-wrap{flex:1;min-height:0;width:100%;display:flex;flex-direction:column}
  .app .stage{flex:1;min-height:0;width:100%;padding:10px;display:grid;place-items:center}
  .app .sheet.portrait{width:auto;height:100%;max-width:100%;margin:0 auto}
  .app .sheet.landscape{width:100%;height:auto;max-height:100%;margin:0 auto}
}

/* ---------- saved designs ---------- */
.modal-wide{max-width:840px;text-align:left;max-height:88vh;overflow-y:auto;padding:1.7rem}
.modal-wide h3{text-align:left;margin-bottom:1rem}

/* save panel */
.design-save{background:var(--card-2);border:1px solid var(--border);border-radius:13px;padding:.9rem;margin-bottom:1.5rem}
.design-save-main{display:flex;gap:.6rem}
.design-save-main input{flex:1;min-width:0;font-size:.95rem;padding:.65rem .75rem}
.design-save-main .btn{padding:.65rem 1.2rem;white-space:nowrap}
.design-save-sub{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.65rem;flex-wrap:wrap}
.design-save-sub #designs-current{color:var(--muted)}
.design-save-actions{display:flex;gap:1rem;flex-shrink:0}
.link-btn{background:none;border:none;color:var(--purple-400);cursor:pointer;font-size:.82rem;font-weight:600;padding:0;font-family:'Inter',sans-serif}
.link-btn:hover{color:var(--pink-400)}

/* voorbeeldvellen-kiezer: kaarten zijn knoppen, zelfde look als de ontwerp-kaarten */
.starts-sub{font-size:.85rem;margin:-.4rem 0 1rem}
.start-card{text-align:left;font:inherit;color:inherit;cursor:pointer;padding:0;width:100%}
.start-card:focus-visible{outline:2px solid var(--purple-400);outline-offset:2px}
.start-card .design-body{padding:.55rem .65rem .65rem}
.start-title{font-family:'DM Sans',sans-serif;font-size:.9rem;font-weight:600;line-height:1.25;color:var(--text)}
.start-blank{color:var(--muted);background:var(--card)}
.starts-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
/* cards */
.design-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(178px,1fr));gap:1.1rem}
.design-card{position:relative;background:var(--card-2);border:1px solid var(--border);border-radius:14px;overflow:hidden;
  display:flex;flex-direction:column;transition:transform .15s ease, box-shadow .2s, border-color .15s}
.design-card:hover{border-color:var(--purple-400);transform:translateY(-3px);box-shadow:0 12px 30px -14px rgba(0,0,0,.7)}
.design-card.current{border-color:var(--purple-500);box-shadow:0 0 0 1px var(--purple-500) inset}
.design-thumb{aspect-ratio:148/210;background:#fff;display:grid;place-items:center;overflow:hidden}
.design-thumb img{width:100%;height:100%;object-fit:contain}
.design-badge-cur{position:absolute;top:.5rem;left:.5rem;font-size:.58rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
  background:var(--grad);color:#fff;padding:.2rem .45rem;border-radius:6px;box-shadow:0 3px 10px rgba(0,0,0,.35)}
.design-body{padding:.6rem .65rem .7rem;display:flex;flex-direction:column}
.design-card-name{width:100%;background:transparent;border:1px solid transparent;color:var(--text);
  font-family:'DM Sans',sans-serif;font-size:.95rem;font-weight:600;padding:.15rem .3rem;border-radius:6px;margin:0 0 0 -.3rem}
.design-card-name:hover{background:var(--card)}
.design-card-name:focus{outline:none;border-color:var(--purple-500);background:var(--card)}
.design-date{font-size:.66rem;color:var(--muted);padding:.05rem .3rem .55rem}
/* two rows: a full-width primary "Openen", then the secondary icon actions evenly split -
   so a narrow card can never clip a button (cards have overflow:hidden) */
.design-card-actions{display:flex;flex-direction:column;gap:.42rem;margin-top:auto}
.design-card-actions svg{width:16px;height:16px;display:block;flex:0 0 auto}
.dc-open{display:flex;align-items:center;justify-content:center;gap:.42rem;width:100%;
  background:var(--card);border:1px solid var(--border);color:var(--text);border-radius:8px;
  padding:.5rem;font-size:.82rem;font-weight:600;cursor:pointer;transition:.12s}
.dc-open:hover{border-color:var(--purple-500);background:var(--purple-700);color:#fff}
.dc-icons{display:flex;gap:.42rem}
.dc-icons button{flex:1;min-width:0;height:32px;display:grid;place-items:center;background:var(--card);border:1px solid var(--border);
  border-radius:8px;color:var(--text);cursor:pointer;transition:.12s}
.dc-icons button:hover{border-color:var(--purple-400);background:var(--card-2)}
.dc-icons button.danger:hover{border-color:#f43f5e;background:rgba(244,63,94,.14);color:#fda4af}
.dc-icons button.confirm{background:#f43f5e;border-color:#f43f5e;color:#fff;font-weight:700}
.design-empty{text-align:center;padding:2.5rem 1rem;color:var(--muted)}
@media(max-width:600px){
  .modal-wide{padding:1.2rem}
  .starts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .design-save-sub{align-items:flex-start;flex-direction:column;gap:.5rem}
  .design-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.8rem}
}
@media(max-width:760px){ .topbtn .label{display:none} .topbtn{padding:.5rem .6rem} .app-bar-tag{display:none} .app-bar .brand-accent{display:none} }
@media(max-width:480px){ .app-bar{gap:.4rem;padding:.6rem .6rem} .app-bar .brand-name{display:none} }

/* ---------- toast ---------- */
.toast{position:fixed;bottom:1.5rem;left:50%;transform:translateX(-50%);background:var(--text);
  border:2px solid var(--text);color:#fff;padding:.7rem 1.2rem;border-radius:999px;z-index:120;
  box-shadow:var(--shadow);font-size:.9rem;animation:toastIn .25s ease}
@keyframes toastIn{from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0}}

/* ---------- mobile bottom-sheet chrome (hidden on desktop) ---------- */
.sheet-head{display:none;align-items:center;justify-content:center;position:sticky;top:0;
  padding:.35rem 0 .8rem;margin:-.2rem 0 .4rem;background:inherit;z-index:2}
.sheet-grip{width:42px;height:5px;border-radius:3px;background:var(--gray-600)}
.sheet-close{position:absolute;right:.2rem;top:.1rem;width:32px;height:32px;border-radius:50%;
  background:var(--card-2);border:1px solid var(--border);color:var(--text);cursor:pointer;font-size:.9rem}
.sheet-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:94;
  opacity:0;pointer-events:none;transition:opacity .25s,background .25s}
.sheet-backdrop.show{opacity:1;pointer-events:auto}
/* while editing (focus-zoom), keep the canvas clear so the zoomed sticker is fully visible;
   the backdrop still catches a tap to close the editor */
.sheet-backdrop.focus{background:rgba(0,0,0,.12)}
.mnav{display:none;position:fixed;left:0;right:0;bottom:0;z-index:96;gap:.25rem;
  background:var(--card);border-top:2px solid var(--text);
  padding:.4rem .4rem calc(.4rem + env(safe-area-inset-bottom))}
.mnav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:.18rem;
  background:transparent;border:none;color:var(--muted);font-size:.66rem;font-weight:600;
  padding:.4rem 0;cursor:pointer;border-radius:11px;transition:.15s}
.mnav .mnav-ic{font-size:1.18rem;line-height:1}
.mnav button.active{color:var(--purple-700);background:rgba(6,182,212,.14)}
.mnav button.badge-dot{position:relative}
.mnav button.badge-dot::after{content:"";position:absolute;top:.25rem;right:28%;width:7px;height:7px;
  border-radius:50%;background:var(--pink-500);box-shadow:0 0 0 2px var(--card)}

/* ---------- larger hit targets on touch devices ---------- */
@media(pointer:coarse){
  .handle{width:26px;height:26px;border-width:3px}
  .h-scale{right:-13px;bottom:-13px}
  .h-rot{top:-46px;margin-left:-13px}
  .h-rot::after{top:23px;height:28px}
  .h-del{left:-13px;top:-13px;font-size:.8rem}
  .mini{width:44px;height:44px;font-size:1.15rem}
  .tb-btn{width:42px;height:42px;font-size:1.1rem}
  .layer-btn{width:32px;height:32px;font-size:1rem}
  .layer-row{padding:.5rem .5rem}
  .tool-btn{padding:.8rem .85rem}
  .seg button{padding:.6rem .2rem}
  .stepper button{width:44px;height:44px}
}

/* ---------- responsive layout ---------- */
@media(max-width:1080px) and (min-width:1001px){
  .editor{grid-template-columns:210px 1fr 240px}
  .hero-inner{grid-template-columns:1fr}
  .hero-art{display:none}
}

/* < 1000px: canvas-first, panels worden bottom-sheets (omslag naar mobiele weergave) */
@media(max-width:1000px){
  .hero{padding:2.4rem 1.1rem 1.4rem}
  .hero-inner{grid-template-columns:1fr}
  .hero-art{display:none}
  .hero h1{font-size:clamp(1.9rem,7vw,2.6rem)}
  .section{padding:2.2rem 1.1rem}
  .steps{grid-template-columns:1fr 1fr}
  .designer{padding:1rem .7rem 1.5rem}
  .designer-head{margin-bottom:.9rem}

  .editor{display:block}
  .stage{min-height:auto;padding:14px;border-radius:14px}
  .stage-toolbar{margin-bottom:.5rem}
  .sheet.portrait{width:min(94vw,calc(78vh * 148/210))}
  .sheet.landscape{width:min(94vw,calc(78vh * 148/210))}
  .stage-hint{font-size:.72rem;margin-top:.5rem}

  /* panels → bottom sheets */
  .rightcol{position:static;display:contents}
  .panel.tools,.panel.inspector,.panel.layers,.orderbar{
    position:fixed;left:0;right:0;bottom:0;top:auto;margin:0;
    border-radius:22px 22px 0 0;max-height:80vh;overflow-y:auto;
    transform:translateY(112%);transition:transform .3s cubic-bezier(.32,.72,0,1);
    z-index:95;box-shadow:0 -14px 50px rgba(0,0,0,.65);
    /* clear the fixed bottom-nav (~58px) so the last content (e.g. the order button) stays visible */
    padding:1rem 1rem calc(84px + env(safe-area-inset-bottom))}
  .panel.sheet-open,.orderbar.sheet-open{transform:translateY(0)}
  .panel.tools{top:auto}
  .sheet-head{display:flex}
  .sheet-backdrop{display:block}
  .mnav{display:flex}

  .layer-list{max-height:52vh}
  .orderbar{grid-template-columns:1fr;gap:1.1rem;margin-top:0}
  .order-total{text-align:left}
  .order-total .price-big{display:inline-block}
  .order-actions{flex-direction:row}
  .order-actions .btn{flex:1;justify-content:center}

  /* keep page content clear of the fixed bottom nav */
  .footer{padding-bottom:calc(2.2rem + 70px)}
}

@media(max-width:560px){
  .steps{grid-template-columns:1fr}
  .topnav a{display:none}
}

/* ---------- contextmenu (lagen + vel): rechtsklik, dubbelklik, ⋯ of lang vasthouden ---------- */
.layer-row,.obj{-webkit-touch-callout:none}
.layer-row{user-select:none;-webkit-user-select:none}
.layer-more{font-weight:700;letter-spacing:.05em;opacity:.6;filter:none}
.ctx-menu{position:fixed;z-index:130;min-width:232px;max-width:calc(100vw - 16px);padding:.3rem;
  background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:12px;
  box-shadow:0 14px 40px -12px rgba(19,23,32,.35),0 2px 6px rgba(19,23,32,.08);
  font-size:.86rem;animation:ctxIn .12s ease}
.ctx-menu[hidden]{display:none}
@keyframes ctxIn{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}
.ctx-head{padding:.4rem .65rem .35rem;font-size:.74rem;font-weight:600;color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
.ctx-menu button{display:flex;align-items:center;justify-content:space-between;gap:1.2rem;width:100%;
  background:transparent;border:0;border-radius:8px;padding:.45rem .65rem;font:inherit;color:inherit;
  text-align:left;cursor:pointer}
.ctx-menu button:focus-visible{background:rgba(6,182,212,.12);outline:none}
@media(hover:hover){.ctx-menu button:hover:not([disabled]){background:rgba(6,182,212,.12)}}
.ctx-menu button[disabled]{opacity:.4;cursor:default}
.ctx-menu button.danger{color:#b91c1c}
.ctx-menu button.danger:focus-visible{background:rgba(185,28,28,.09)}
@media(hover:hover){.ctx-menu button.danger:hover{background:rgba(185,28,28,.09)}}
.ctx-menu kbd{font:inherit;font-size:.74rem;color:var(--muted);white-space:nowrap}
.ctx-sep{height:1px;background:var(--border);margin:.25rem .4rem}
/* smalle schermen: actievel onderin, grote tikvlakken, geen sneltoetsen */
.ctx-menu.as-sheet{left:8px!important;right:8px;top:auto!important;bottom:calc(8px + env(safe-area-inset-bottom));
  min-width:0;max-width:none;max-height:86vh;overflow-y:auto;overscroll-behavior:contain;border-radius:16px;padding:.35rem;
  font-size:1rem;box-shadow:0 0 0 100vmax rgba(19,23,32,.28),0 -8px 30px -10px rgba(19,23,32,.3);animation:ctxUp .16s ease}
@keyframes ctxUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
.ctx-menu.as-sheet .ctx-head{max-width:none;font-size:.82rem;text-align:center}
.ctx-menu.as-sheet button{padding:.62rem .9rem;min-height:42px}
.ctx-menu.as-sheet .ctx-sep{margin:.15rem .4rem}
.ctx-menu.as-sheet kbd{display:none}
@media(hover:none){.ctx-menu kbd{display:none}}
