.st-designsteps {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--fg-muted);
}
.st-designsteps .active {
  color: var(--pop);
  font-weight: 600;
}
.st-designer-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: start;
}
.st-designer-grid[hidden] {
  display: none;
}
.st-design-assets,
.st-design-props {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: calc(100dvh - 260px);
  overflow: auto;
  overscroll-behavior: contain;
}
.st-panelhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.st-panelhead h2 {
  font-size: 16px;
  font-weight: 500;
}
.st-panelhead button {
  display: none;
}
.st-patterns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.st-pattern {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-soft);
  padding: 6px;
  cursor: pointer;
  aspect-ratio: 1;
}
.st-pattern img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.st-pattern:hover {
  border-color: var(--pop);
}
.st-design-stage {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
}
#productCanvas {
  width: 100%;
  touch-action: none;
  min-height: 260px;
}
.st-canvasbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-card);
  gap: 8px;
  font-size: 13px;
}
.st-canvasbar .st-actions {
  margin: 0;
  gap: 6px;
}
.st-design-mobilebar {
  display: none;
}
.st-design-props .st-empty {
  padding: 24px 12px;
}
.st-design-props .st-empty h3 {
  font-size: 14px;
}
.st-design-props .st-empty p {
  font-size: 12px;
}
.st-design-props .st-actions {
  gap: 8px;
}
.st-design-assets .st-filterbar {
  gap: 6px;
}
.st-design-assets .st-filterbar .st-button {
  font-size: 11px;
  padding: 6px 9px;
}
@media (max-width: 1100px) {
  .st-designer-grid {
    grid-template-columns: 170px minmax(0, 1fr) 220px;
    gap: 12px;
  }
  .st-design-assets,
  .st-design-props {
    padding: 14px;
  }
  .st-designsteps {
    gap: 22px;
  }
}
@media (max-width: 800px) {
  .st-designer-grid {
    grid-template-columns: 1fr;
  }
  .st-design-assets,
  .st-design-props {
    display: none;
    position: fixed;
    inset: auto 0 calc(58px + env(safe-area-inset-bottom));
    z-index: 145;
    background: var(--bg-card);
    border-radius: 18px 18px 0 0;
    max-height: 65dvh;
    box-shadow: 0 -12px 50px rgba(0, 0, 0, 0.14);
    padding: 22px;
  }
  .show-assets .st-design-assets,
  .show-props .st-design-props {
    display: block;
  }
  .st-design-assets .st-patterns {
    grid-template-columns: repeat(4, 1fr);
  }
  .st-panelhead button {
    display: block;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: var(--bg-soft);
    border-radius: 50%;
    font-size: 22px;
    color: var(--fg);
  }
  .st-design-mobilebar {
    display: flex;
    justify-content: space-around;
    padding: 12px;
    gap: 12px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
  }
  .st-design-mobilebar .st-button {
    flex: 1;
  }
  .st-designsteps {
    gap: 0;
    justify-content: space-between;
    font-size: 11px;
  }
  .st-canvasbar .st-note {
    font-size: 10px;
  }
  .st-designer .st-field input[type="range"] {
    padding: 0;
    min-height: 44px;
  }
  .st-design-props .st-actions {
    margin: 16px 0;
  }
}
.st-model-dialog {
  max-width: 800px;
  width: calc(100% - 32px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--fg);
  padding: 24px;
  margin: auto;
  max-height: 92dvh;
  overflow: auto;
}
.st-model-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}
.st-model-dialog .st-panelhead button {
  display: block;
  border: 0;
  background: var(--bg-soft);
  color: var(--fg);
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  font-size: 22px;
}
.st-model-stage {
  height: min(52dvh, 480px);
  touch-action: none;
  border-radius: 8px;
  overflow: hidden;
}
.st-model-stage canvas {
  display: block;
}
