.tool-container.studio {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px 60px;
}

.tool-container.studio h1 {
  font-size: 26px;
  margin-bottom: 6px;
}

.tool-container.studio > p {
  color: #666;
  margin-bottom: 24px;
}

.studio-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  align-items: start;
}

.studio-panel,
.studio-preview-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-block {
  background: white;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px 16px;
}

.panel-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 10px;
}

.link-btn {
  background: none;
  border: none;
  color: #185fa5;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Elements list */
.element-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.element-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.element-row.active {
  border-color: #185fa5;
  background: #eef4fb;
}

.element-row .name {
  flex: 1;
}

.element-row button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: #999;
  padding: 2px 6px;
}

.element-row button:hover {
  color: #a71a1a;
}

.no-elements {
  font-size: 13px;
  color: #999;
}

/* Controls */
.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.control {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #555;
  gap: 4px;
}

.control span {
  color: #185fa5;
  font-weight: 600;
}

.control input[type="range"] {
  width: 100%;
}

.control select {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 13px;
}

.control input[type="color"] {
  width: 100%;
  height: 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.checkbox-control {
  flex-direction: row;
  align-items: center;
  grid-column: span 2;
}

/* Preview stage */
.preview-block {
  min-height: 340px;
}

.preview-stage {
  position: relative;
  height: 320px;
  background: repeating-linear-gradient(45deg, #fafafa, #fafafa 10px, #f2f2f2 10px, #f2f2f2 20px);
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.studio-shape {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90px;
  height: 90px;
  margin: -45px 0 0 -45px;
}

.code-output {
  padding: 12px;
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 8px;
  font-family: monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}

@media (max-width: 900px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
}