.khashab-designer {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.khashab-controls {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;

  /* reserve no space; we will overlay props */
  padding-bottom: 0;
}


.khashab-props{
  display: flex;
  gap: 12px;
  align-items: end;

  /* hide without collapsing space */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  background: #fff;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 12px;
  padding: 10px;
}

.khashab-props.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.khashab-props-slot{
  flex-basis: 100%;
  min-height: 86px;          /* fixed reserved space (adjust) */
  display: flex;
  align-items: flex-end;
}

.khashab-controls label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.khashab-input {
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 8px;
  width: 160px;
}

.khashab-readout {
  font-size: 13px;
  opacity: .8;
  padding: 8px 10px;
}

.khashab-canvas-wrap {
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 12px;
  padding: 8px;
  overflow: hidden;
}

.khashabSvg{
  width: 100%;
  height: 520px;      /* keep your desired height */
  display: block;
}
.khashab-btn.danger{
  border-color: rgba(200,0,0,.3);
}
.khashabSvg { touch-action: none; }
/* Make the SVG area fully touch-draggable */
.khashab-canvas-wrap,
.khashabSvg {
  touch-action: none;                 /* critical */
  -ms-touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Prevent the browser from treating drags as page scroll */
.khashab-canvas-wrap {
  overscroll-behavior: contain;
}
.khashab-canvas-wrap { position: relative; }

.khashab-zoom-btn{
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  touch-action: manipulation;
}
.khashab-zoom-btn:active{ transform: translateY(1px); }
@media (pointer: coarse), (max-width: 900px) {
  .khashabSvg { height: 70vh; max-height: 620px; min-height: 420px; }
  .khashab-btn { padding: 12px 14px; }
  .khashab-input { width: 140px; }
  .khashab-zoom-btn { width: 52px; height: 52px; font-size: 26px; }
}
/* Handles (bigger on mobile) */
.khashab-handle {
  cursor: grab;
}
.khashab-handle:active {
  cursor: grabbing;
}
