.studio-binding-editor {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  min-height: 240px;
  min-width: min(92vw, 420px);
}

.studio-binding-editor__tabs {
  display: flex;
  gap: 4px;
  padding-bottom: var(--spacing-xs);
  border-bottom: 1px solid var(--color-border-light);
}

.studio-binding-editor__tab {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  cursor: pointer;
}

.studio-binding-editor__tab.is-active {
  border-color: var(--color-border);
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  font-weight: 600;
}

.studio-binding-editor__panel {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  max-height: min(55vh, 480px);
  overflow: auto;
}

.studio-binding-editor__status,
.studio-binding-editor__empty,
.studio-binding-editor__hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.studio-binding-editor__status--error {
  color: #f5576c;
}

.studio-binding-editor__hint--success {
  color: #22c55e;
  font-weight: 500;
}

.studio-binding-editor__hero {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.studio-binding-editor__avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--color-border-light);
}

.studio-binding-editor__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  font-size: 1.2rem;
}

.studio-binding-editor__name {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-primary);
}

.studio-binding-editor__meta {
  margin: 2px 0 0;
  font-size: 0.68rem;
  color: var(--color-text-muted);
}

.studio-binding-editor__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-binding-editor__field-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.studio-binding-editor__input,
.studio-binding-editor__textarea {
  width: 100%;
  padding: var(--spacing-xs);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  font-size: 0.72rem;
  line-height: 1.45;
  resize: vertical;
  box-sizing: border-box;
}

.studio-binding-editor__save-btn {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  color: var(--color-text-primary);
  font-size: 0.72rem;
  cursor: pointer;
}

.studio-binding-editor__save-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-accent) 20%, transparent);
}

.studio-binding-editor__save-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.studio-binding-editor__entries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-binding-editor__entry {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.studio-binding-editor__entry.is-highlighted {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px color-mix(in srgb, #22c55e 35%, transparent);
}

.studio-binding-editor__entry-head {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: var(--spacing-xs) var(--spacing-sm);
  border: none;
  background: var(--color-bg-tertiary);
  cursor: pointer;
  text-align: left;
}

.studio-binding-editor__entry-head:hover {
  background: color-mix(in srgb, var(--color-accent) 8%, var(--color-bg-tertiary));
}

.studio-binding-editor__entry-title {
  font-size: 0.78rem;
  color: var(--color-text-primary);
  font-weight: 500;
}

.studio-binding-editor__entry-meta {
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

.studio-binding-editor__entry-body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm);
  border-top: 1px solid var(--color-border-light);
  background: var(--color-bg-secondary);
}
